Yes this is indeed a code snippet. As for using Jeremi's code, since he is one of XWiki's committer I'm sure he would agree. As I said it already I will be meeting him on wednesday and I'll get a confirmation from him. Do not hesitate to start if you wish to, I'll get back to you so that you know about his feedback. Guillaume
On 03/12/2007, BOUSQUET Jeremie <[EMAIL PROTECTED]> wrote: > > > > 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. > > Ok, this means I was wrong ;) Maybe the difference is in the header (with > the <!DOCTYPE ), and also I believe that the //<![CDATA[ might play a > role … But I'm really not a good web developer … > > > > 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. > To make it work I modified timeline-api.js as described in the issue (just > replaced the block indicated), attached the timeline-api.js in a wiki > page, and replaced its URL in the WikiDev.TimeLine. But I'm not sure it's > needed in fact … Or maybe it's needed if you don't use <iframe> > > > > 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 > > The sample from Jeremi is quite simple and works very well to display all > News elements in the timeline : > > {pre} > > <data wiki-url="$xwiki.getURL('Main.WebHome', 'view')" wiki-section=""> > > #set($feed = $xwiki.feed.getFeed("$xwiki.getURL('Main.BlogRss', 'view', > 'xpage=rdf')")) > > #foreach($entry in $feed.entries) > > <event start="$entry.getPublishedDate().toLocaleString()" > title="$entry.title" > color="blue">$xwiki.getXMLEncoded($entry.description.value) ... > $xwiki.getXMLEncoded("<a href=$entry.link target='_blank'>Suite</a>") > > </event> > > #end > > > > Note : ADD CODE HERE TO ADD OTHER EVENTS IN THE XML > > > > </data> > > {/pre} > > The #foreach parses all entries in the feed (constructed with your wiki > blog), and writes down an <event> entry with date and description. It's not > too complicated, but it's development … In the ADD CODE HERE … , I put the > groovy code to generate the XML from the page updates and the FAQ entries > and such, but it's more complicated, not very readable, and most of all > there are many hard-coded specific things inside it. Once I'll get something > clearer I'll share it with you or add it in xwiki wiki ;-) > > > > > > 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. > I am too (see above). I believe it would be nicer to be able to do as for > Google Maps, but we would have to understand better why it works … > > > > 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! :-) > If you prefer I can get the point ;-) But is this a code snippet, an > application, macros … ? I believe it belongs to snippets … And can I make > use of Jeremi's modified sample, because HE is the creator of this xwiki > timeline after all …. > > > > Regards, > > > > > Cheers, > > > -- > > Ricardo Rodríguez > > Your XEN ICT Team > > > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > > -- http://wikibc.blogspot.com/
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users