BOUSQUET Jeremie wrote:

Hi Ricardo,


Hi!

In first instance I copied the sample (the timeline) in a WIKI page, but of course as in the sample are defined <html>, <head> and <body> tags, it could not work. In a wiki page we already are inside the <body> tag, and the browser does not like redefining such tags very much.


I have not a clear idea about how to have this kind of <head> and <body> nested tags affect the rendering of the page.

Take a look at this...

http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/GoogleMaps

Here the code...

http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/GoogleMaps?viewer=code&showlinenumbers=0&language=en

<head> and <body> are also defined in the Google Maps snippet, but the page is correctly rendered. No errors at all.

I then tried the trick from the TIMELINE-24 issue also, but it failed to work. I don't know if I left this "patch" on the page, because my wiki is currently broken ... :/ It removed the URL prefiks issue, but nothing was displayed.


I didn't succeed by specifying a value for Timeline_urlPrefix. And I don't know how to apply the patch proposed by Sami Radi last October. Of course I can put timeline-api.js in one of our servers and modify it, but I don't know how to call all the dependencies.

So the trick was to have a page WikiDev.TimeLine, with the sample, another page WikiDev.TimeLineFeed with the sample script to generate the XML (it works well, I only added new things inside it). Basically the timeline feed page generates XML with a root <data> tag, and a number of <event> tags inside, with a date ("start") and a "description". So it's very easy to generate using any events as entries. In the WikiDev.TimeLine page you have to put URL of WikiDev.TimeLineFeed as first parameter of the tl.loadxml() method.


This is another point I fail at. I am not a programmer, so I have to learn how to produce this XML output from XWiki items.

Let's write down here a couple of simple examples showing the structure you describe...

http://simile.mit.edu/timeline/docs/example1.xml

http://simile.mit.edu/timeline/docs/example2.xml

And the HOW-TO from Simile...

http://simile.mit.edu/timeline/docs/create-timelines.html

Then, in the page where I want to show the timeline, I added a <iframe>, with "src" equals URL of WikiDev.TimeLine. Also had to give it a height and width for proper display. Inside the <iframe> it's like in another page, so there is no problem of <head> or <body> tags anymore. The WikiDev.TimeLine page does not show up (you get the URL prefiks error), but the <iframe> in the other page should display correctly.


The <iframe> way works perfectly. I am only still curious to understand why Google Maps work without it.

Hope this helps ...


Yes, it does! Thanks for your message, Jeremi. I keep working to produce a clear page about how to use Simile TimeLine in XWiki, although I think you are the one for this task! :-)

Regards,


Cheers,

--
Ricardo Rodríguez
Your XEN ICT Team

_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to