[xwiki-users] Getting rendered content of a page with a specific template
Hello, I have a page showing a timeline, to display it I need to do the following because this page redefines <head> and <body> : http://mywiki/xwiki/bin/view/WikiDev/TimeLine?xpage=plain It's a simile timeline, and I got the sample from here <http://www.jeremi.info/index.php/post/2006/11/28/Simile-Timeline> , from Jeremi's site (thank you if you read it to make me discover the simile timeline ! ;) ). I would like to insert this rendered page in another wiki page. I wrote this: $xwiki.getDocument('WikiDev.TimeLine').getRenderedContent() Of course it's not correct, because I would like plain template to be applied to retrieve the rendered content. How can I proceed ? Another way would be for this very page to be able to redefine <head> and <body> properly, but I don't know how to make it (and to make it correctly, and for this only page). Thanks , Jeremie
Hello, I can answer myself, sorry for bothering you ... ;) In fact I merely had to use a <iframe> and it works perfectly (and very nicely). Regards, Jeremie ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of BOUSQUET Jeremie Sent: jeudi 29 novembre 2007 15:44 To: [email protected] Subject: [xwiki-users] Getting rendered content of a page with a specifictemplate Hello, I have a page showing a timeline, to display it I need to do the following because this page redefines <head> and <body> : http://mywiki/xwiki/bin/view/WikiDev/TimeLine?xpage=plain It's a simile timeline, and I got the sample from here <http://www.jeremi.info/index.php/post/2006/11/28/Simile-Timeline> , from Jeremi's site (thank you if you read it to make me discover the simile timeline ! ;) ). I would like to insert this rendered page in another wiki page. I wrote this: $xwiki.getDocument('WikiDev.TimeLine').getRenderedContent() Of course it's not correct, because I would like plain template to be applied to retrieve the rendered content. How can I proceed ? Another way would be for this very page to be able to redefine <head> and <body> properly, but I don't know how to make it (and to make it correctly, and for this only page). Thanks , Jeremie
BOUSQUET Jeremie wrote:
Hello,
I can answer myself, sorry for bothering you ... ;)
In fact I merely had to use a <iframe> and it works perfectly (and very nicely).
Regards,
Jeremie
Hi Jeremi, This TimeLine stuff is simply great. I have been lucky that you have had this problem and decided to bring it in here! Thanks. Please, accept my apologies if this question is too basic but, where must I use the <iframe> tag? I am trying to use Jeremi's example. By using ?xpage=plain it works without a glitch, but I am not able to use the <iframe> to include it in a another xwiki page. Thanks for your help, Ricardo -- Ricardo Rodríguez Your XEN ICT Team
Have you tried something like: <iframe src="http:// <http://mywiki/xwiki/bin/view/WikiDev/TimeLine><yourserver> <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>/xwiki/bin/view/WikiDev/TimeLine <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>*?xpage=plain*" frameborder=0 width=100% height=600px></iframe> Simply paste this on a page while in wiki edition mode and it should work fine. Guillaume On 29/11/2007, Your XEN ICT Team - Ricardo Rodriguez <[email protected]> wrote:
BOUSQUET Jeremie wrote:
Hello,
I can answer myself, sorry for bothering you … ;)
In fact I merely had to use a <iframe> and it works perfectly (and very nicely).
Regards,
Jeremie
Hi Jeremi,
This TimeLine stuff is simply great. I have been lucky that you have had this problem and decided to bring it in here! Thanks.
Please, accept my apologies if this question is too basic but, where must I use the <iframe> tag? I am trying to use Jeremi's example. By using ?xpage=plain it works without a glitch, but I am not able to use the <iframe> to include it in a another xwiki page.
Thanks for your help,
Ricardo
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Guillaume Lerouge wrote:
Have you tried something like:
<iframe src=" http:// <http://mywiki/xwiki/bin/view/WikiDev/TimeLine> <yourserver> <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>/xwiki/bin/view/WikiDev/TimeLine <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>*?xpage=plain*" frameborder=0 width=100% height=600px></iframe> Simply paste this on a page while in wiki edition mode and it should work fine.
Guillaume
Perfect. Thank you so much, Guillaume. I've been trying all kind of esoteric options... :-( Best, -- Ricardo Rodríguez Your XEN ICT Team
Could someone turn this into a code snippet on xwiki.org? Thanks -Vincent On Nov 29, 2007, at 9:46 PM, Your XEN ICT Team - Ricardo Rodriguez wrote:
Guillaume Lerouge wrote:
Have you tried something like:
<iframe src=" http:// <yourserver>/xwiki/bin/view/WikiDev/TimeLine ? xpage=plain" frameborder=0 width=100% height=600px></iframe>
Simply paste this on a page while in wiki edition mode and it should work fine.
Guillaume
Perfect.
Thank you so much, Guillaume. I've been trying all kind of esoteric options... :-(
Best, -- Ricardo Rodríguez
Actually the <iframe> trick is already mentioned on the DIsplay an Office Document page (here: http://www.xwiki.org/xwiki/bin/Code/ViewOfficeDocument ). Jeremie / Ricardo, it would be cool if you could create a page with all the explanations needed to get the timeline to work with XWiki. Would one of you 2 mind doing it? Guillaume On 30/11/2007, Vincent Massol <[email protected]> wrote:
Could someone turn this into a code snippet on xwiki.org?
Thanks -Vincent
On Nov 29, 2007, at 9:46 PM, Your XEN ICT Team - Ricardo Rodriguez wrote:
Guillaume Lerouge wrote:
Have you tried something like:
<iframe src=" http:// <http://mywiki/xwiki/bin/view/WikiDev/TimeLine> <yourserver> <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>/xwiki/bin/view/WikiDev/TimeLine <http://mywiki/xwiki/bin/view/WikiDev/TimeLine>*?xpage=plain*" frameborder=0 width=100% height=600px></iframe>
Simply paste this on a page while in wiki edition mode and it should work fine.
Guillaume
Perfect.
Thank you so much, Guillaume. I've been trying all kind of esoteric options... :-(
Best,
-- Ricardo Rodríguez
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Guillaume Lerouge wrote:
Actually the <iframe> trick is already mentioned on the DIsplay an Office Document page (here: http://www.xwiki.org/xwiki/bin/Code/ViewOfficeDocument ).
Jeremie / Ricardo, it would be cool if you could create a page with all the explanations needed to get the timeline to work with XWiki.
Would one of you 2 mind doing it?
Guillaume
Hi Guillaume, I think that to have timeline working here will be of major interest for our group. So, let me try to generalize its usefulness. I think that the reference given by Jeremi in the original entry (http://www.jeremi.info/index.php/post/2006/11/28/Simile-Timeline) plus the <iframe> trick in his second message solve the issue. If Jeremie agrees, I will try to understand the whole thing and create ASAP an /ad hoc/ page. Cheers, -- Ricardo Rodríguez Your XEN ICT Team
Hi Guillaume,
I think that to have timeline working here will be of major interest for our group. So, let me try to generalize its usefulness. I think that the reference given by Jeremi in the original entry ( http://www.jeremi.info/index.php/post/2006/11/28/Simile-Timeline) plus the <iframe> trick in his second message solve the issue. If Jeremie agrees, I will try to understand the whole thing and create ASAP an *ad hoc* page.
Great, I'm sure both Jeremi and Jeremie will be ok (I'm seeing Jeremi on Wednesday, I'll check with him just in case)
Has any of you tested Simile Timeline's sister project Timeplot ( http://simile.mit.edu/timeplot/) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-) Guillaume _______________________________________________
users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi all, I, of course, completely agree, as said I merely put 2 things together ;-) The timeline is a great feature, I'm currently working on adding all this information in the same timeline (using groovy), and use it in the homepage: - of course, blog news - page updates - FAQ entries - comments on pages The result is not yet perfect, but it's working quite nicely, using different bullets colors depending on type of item. I still have a problem in Jeremi's part (XML generation), because it seems that most recent entry in RSS is not taken into account in generated XML, and I really don't understand why (it's a for $entry in $entries with xwiki.feed.getFeeds(url), it should retrieve everything !?) Also, when your timeline is "rich" it's quite unreadable, because newer things go too far in the bottom and don't display at all. I'm trying to make the timeline automatically "magnify" itselfs for current period of time (+- n hours), so items will be able to show up side-by-side, but I'm still failing to do it. The timeplot also seems very cool ;-) Only problem (for both timeline & timeplot) is that if it's rich it can take long to show up ... But it's a very nice and synthetic display. Regards, Jeremie ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Guillaume Lerouge Sent: vendredi 30 novembre 2007 15:57 To: XWiki Users Subject: Re: [xwiki-users] Getting rendered content of a page with aspecifictemplate Hi Guillaume, I think that to have timeline working here will be of major interest for our group. So, let me try to generalize its usefulness. I think that the reference given by Jeremi in the original entry (http://www.jeremi.info/index.php/post/2006/11/28/Simile-Timeline) plus the <iframe> trick in his second message solve the issue. If Jeremie agrees, I will try to understand the whole thing and create ASAP an ad hoc page.
Great, I'm sure both Jeremi and Jeremie will be ok (I'm seeing Jeremi on Wednesday, I'll check with him just in case)
Has any of you tested Simile Timeline's sister project Timeplot ( http://simile.mit.edu/timeplot/ <http://simile.mit.edu/timeplot/> ) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-) Guillaume _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users -- http://wikibc.blogspot.com/
Guillaume Lerouge wrote:
Has any of you tested Simile Timeline's sister project Timeplot ( http://simile.mit.edu/timeplot/) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-)
Guillaume
Nope! I've just enjoyed the sample at the MIT site. There is a number of quite interesting projects within Simile. By the way, I know this is not the best way to jump into a different topic but, is there any initiative to add Semantic Web tools to XWiki? Well, you can perfectly think that I am completely lost :-) Best, -- Ricardo Rodríguez Your XEN ICT Team
Here is a semantic project XWiki is taking part in: http://nepomuk.semanticdesktop.org/xwiki/bin/view/Main1/ Cheers, Guillaume On 30/11/2007, Your XEN ICT Team - Ricardo Rodriguez <[email protected]> wrote:
Guillaume Lerouge wrote:
Has any of you tested Simile Timeline's sister project Timeplot (http://simile.mit.edu/timeplot/) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-)
Guillaume
Nope! I've just enjoyed the sample at the MIT site. There is a number of quite interesting projects within Simile.
By the way, I know this is not the best way to jump into a different topic but, is there any initiative to add Semantic Web tools to XWiki?
Well, you can perfectly think that I am completely lost :-)
Best,
-- Ricardo Rodríguez Your XEN ICT Team
_______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
On Nov 30, 2007, at 5:08 PM, Guillaume Lerouge wrote:
Here is a semantic project XWiki is taking part in:
Just to be clear this is a research project done by XPertNet with partners and research labs. The end goal of course is to put back in the open source community the result of the work. Right now this project is using different communication channels than the standard xwiki ones (own mailing list, etc). It's led by Stephane Lauriere and In any case if anyone is interested in helping out, I'm sure Stephane would love that. In any case feel free to ask any question you want. Thanks -Vincent
Cheers, Guillaume
On 30/11/2007, Your XEN ICT Team - Ricardo Rodriguez < [email protected]
wrote: Guillaume Lerouge wrote:
Has any of you tested Simile Timeline's sister project Timeplot ( http://simile.mit.edu/timeplot/) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-)
Guillaume
Nope! I've just enjoyed the sample at the MIT site. There is a number of quite interesting projects within Simile.
By the way, I know this is not the best way to jump into a different topic but, is there any initiative to add Semantic Web tools to XWiki?
Well, you can perfectly think that I am completely lost :-)
Best,
-- Ricardo Rodríguez Your XEN ICT Team
Vincent Massol wrote:
On Nov 30, 2007, at 5:08 PM, Guillaume Lerouge wrote:
Here is a semantic project XWiki is taking part in:
http://nepomuk.semanticdesktop.org/xwiki/bin/view/Main1/ <http://nepomuk.semanticdesktop.org/xwiki/bin/view/Main1/>
Just to be clear this is a research project done by XPertNet with partners and research labs.
The end goal of course is to put back in the open source community the result of the work.
Right now this project is using different communication channels than the standard xwiki ones (own mailing list, etc).
It's led by Stephane Lauriere and In any case if anyone is interested in helping out, I'm sure Stephane would love that.
In any case feel free to ask any question you want.
Thanks -Vincent
Cheers, Guillaume
On 30/11/2007, *Your XEN ICT Team - Ricardo Rodriguez* < [email protected] <mailto:[email protected]>> wrote:
Guillaume Lerouge wrote:
Has any of you tested Simile Timeline's sister project Timeplot ( http://simile.mit.edu/timeplot/) ? Apparently it uses the same xml format for its data files, I thought it might be used to generate statistics from a wiki use by turning a XWiki Instance own RSS feed into the RSS plugin, creating the XML and displaying the timeplot. Actually, I might try and do it as well :-)
Guillaume
Nope! I've just enjoyed the sample at the MIT site. There is a number of quite interesting projects within Simile.
By the way, I know this is not the best way to jump into a different topic but, is there any initiative to add Semantic Web tools to XWiki?
Well, you can perfectly think that I am completely lost :-)
Best,
-- Ricardo Rodríguez Your XEN ICT Team
Guillaume, Vincent, thanks for the input. I'd reach the home of this page of this project by googling xwiki + semantic. Once more time I am far from being able to contribute. Even from being able what all this semantic stuff means! Just trying to understand how this new web tendencies universe is constructed. I feel like if this Interactive Semantic Wiki would be the killer application we need to help our group to articulate the data/information/knowledge we generate. And it will be great to know XWiki is in this path. Thanks. Ricardo -- Ricardo Rodríguez Your XEN ICT Team
BOUSQUET Jeremie wrote:
Hi all,
I, of course, completely agree, as said I merely put 2 things together ;-)
The timeline is a great feature, I'm currently working on adding all this information in the same timeline (using groovy), and use it in the homepage:
- of course, blog news
- page updates
- FAQ entries
- comments on pages
The result is not yet perfect, but it's working quite nicely, using different bullets colors depending on type of item. I still have a problem in Jeremi's part (XML generation), because it seems that most recent entry in RSS is not taken into account in generated XML, and I really don't understand why (it's a for $entry in $entries with xwiki.feed.getFeeds(url), it should retrieve everything !?)
Also, when your timeline is "rich" it's quite unreadable, because newer things go too far in the bottom and don't display at all. I'm trying to make the timeline automatically "magnify" itselfs for current period of time (+- n hours), so items will be able to show up side-by-side, but I'm still failing to do it.
The timeplot also seems very cool ;-) Only problem (for both timeline & timeplot) is that if it's rich it can take long to show up ... But it's a very nice and synthetic display.
Regards,
Jeremie
Hi, I've been trying to understand why the <iframe> trick is needed. Just to help to follow this issue... http://simile.mit.edu/issues/browse/TIMELINE-24 But I am still far from being able to contribute with an useful page about the use Timeline within XWiki. I am not even able to feed a sample Timeline with any thing different than the Jeremi's example at http://www.jeremi.info/index.php/feed/rss2! Please, Jeremi, could you provide some example about how to feed the timeline simply with xwiki blog news? Thank you so much, Ricardo -- Ricardo Rodríguez Your XEN ICT Team
Hi Ricardo, 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 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. 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. 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. Hope this helps ... Regards, Jeremie ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Your XEN ICT Team - Ricardo Rodriguez Sent: dimanche 2 décembre 2007 13:13 To: XWiki Users Subject: Re: [xwiki-users] Getting rendered content of a pagewith aspecifictemplate BOUSQUET Jeremie wrote: Hi all, I, of course, completely agree, as said I merely put 2 things together ;-) The timeline is a great feature, I'm currently working on adding all this information in the same timeline (using groovy), and use it in the homepage: of course, blog news page updates FAQ entries comments on pages The result is not yet perfect, but it's working quite nicely, using different bullets colors depending on type of item. I still have a problem in Jeremi's part (XML generation), because it seems that most recent entry in RSS is not taken into account in generated XML, and I really don't understand why (it's a for $entry in $entries with xwiki.feed.getFeeds(url), it should retrieve everything !?) Also, when your timeline is "rich" it's quite unreadable, because newer things go too far in the bottom and don't display at all. I'm trying to make the timeline automatically "magnify" itselfs for current period of time (+- n hours), so items will be able to show up side-by-side, but I'm still failing to do it. The timeplot also seems very cool ;-) Only problem (for both timeline & timeplot) is that if it's rich it can take long to show up ... But it's a very nice and synthetic display. Regards, Jeremie Hi, I've been trying to understand why the <iframe> trick is needed. Just to help to follow this issue... http://simile.mit.edu/issues/browse/TIMELINE-24 But I am still far from being able to contribute with an useful page about the use Timeline within XWiki. I am not even able to feed a sample Timeline with any thing different than the Jeremi's example at http://www.jeremi.info/index.php/feed/rss2! Please, Jeremi, could you provide some example about how to feed the timeline simply with xwiki blog news? Thank you so much, Ricardo -- Ricardo Rodríguez Your XEN ICT Team
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... <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
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... <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
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... <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 [email protected] http://lists.xwiki.org/mailman/listinfo/users
BOUSQUET Jeremie wrote:
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 ...
Sorry, but I can not help you with this doubts now... :-( But I keep studying!
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>
As far as I can understand, the <iframe> trick is under our scope and to modify the timeline-api.js script in this origin it is not at the moment.
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}
Please, let me play a bit with this piece of code. It surely simple as you say, but not for me :-)
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 ....
A code snippet, as far as I know. It is a piece of code that can be included in a XWiki page. The problem here is that, in the current state, more than one page is needed to display the timeline. But I think it is still a snippet. This is clearly a Jeremy&Jeremy issue :-) ! Cheers, -- Ricardo Rodríguez Your XEN ICT Team
participants (4)
-
BOUSQUET Jeremie -
Guillaume Lerouge -
Vincent Massol -
Your XEN ICT Team - Ricardo Rodriguez