[xwiki-users] A question about XWiki concept
Hey guys. I'm still having trouble figuring out the XWiki platform. I have a project to do. The main goal is publish information about lectures and allow users to register to those lectures. The headache for me is, how to connect these things. I mean in normal php/mysql project I would know how to do it, there is some tables, I add information of the user and when I need that information I just make a query. What could be the methods to do that in XWiki? How to connect that specific user has registered to that lecture? What would be the best way to store that kind of information? Thank you in advance Marius Vizbaras-- View this message in context: http://xwiki.475771.n2.nabble.com/A-question-about-XWiki-concept-tp6317490p6... Sent from the XWiki- Users mailing list archive at Nabble.com.
Hi Marius, On Fri, Apr 29, 2011 at 18:22, mar3lis <[email protected]> wrote:
Hey guys. I'm still having trouble figuring out the XWiki platform. I have a project to do. The main goal is publish information about lectures and allow users to register to those lectures. The headache for me is, how to connect these things. I mean in normal php/mysql project I would know how to do it, there is some tables, I add information of the user and when I need that information I just make a query. What could be the methods to do that in XWiki? How to connect that specific user has registered to that lecture? What would be the best way to store that kind of information?
You can find more information about the XWiki data model and how it works here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/ And developing a sample application here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorial Guillaume Thank you in advance
Marius Vizbaras-- View this message in context: http://xwiki.475771.n2.nabble.com/A-question-about-XWiki-concept-tp6317490p6... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Dear Marius, Xwiki is quite complex so the recommendation to read up on the development guide is probably a wise one. If you can save your lectures in PDF format then the following quick solution might help with part of your problem: 1. Create a space in Xwiki called PDFs. 2. Create a Document in that space called, e.g. "genericPDFs" 3. Insert the following code in the Edit wiki mode: Edit.Wiki =========================== (COPY and PASTE THE FOLLOWING LINES) ======================================= {{velocity}} #set($l=$doc.getAttachmentList()) #if ($l.size() > 0) #set($attach=${l.get(0)}) ## this always takes only the first attachment, so increment this zero to change the attachment being selected #set($fname=${attach.getAttachment().getFilename()}) #set ($url=$doc.getAttachmentURL($fname)) {{html}}<iframe name="PDF" src="$url" width="95%" height="800" /></body>{{/html}} #end {{/velocity}} =========================== For every new page you create, edit it in Wiki mode inserting: =========================== (COPY and PASTE THE FOLLOWING LINE) ======================================= {{include document="genericPDFs"}} =========================== Attach the PDF to the page, and no matter how the PDF attachment is named, the attachment is shown. You can call genericPDFs something else, just be sure the name of the page corresponds to the the reference on the previous line. Kind regards, Steven Calkins -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von mar3lis Gesendet: Freitag, 29. April 2011 18:22 An: [email protected] Betreff: [xwiki-users] A question about XWiki concept Hey guys. I'm still having trouble figuring out the XWiki platform. I have a project to do. The main goal is publish information about lectures and allow users to register to those lectures. The headache for me is, how to connect these things. I mean in normal php/mysql project I would know how to do it, there is some tables, I add information of the user and when I need that information I just make a query. What could be the methods to do that in XWiki? How to connect that specific user has registered to that lecture? What would be the best way to store that kind of information? Thank you in advance Marius Vizbaras-- View this message in context: http://xwiki.475771.n2.nabble.com/A-question-about-XWiki-concept-tp6317490p6... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
hi Marius, To avoid misunderstandings, part of the previous email should read: ======================================= COPY and PASTE THE FOLLOWING LINES from "{{velocity}}" to "{{/velocity}}") ======================================= {{velocity}} #set($l=$doc.getAttachmentList()) #if ($l.size() > 0) #set($attach=${l.get(0)}) ## this always takes only the first attachment, so increment this zero to change the attachment being selected #set($fname=${attach.getAttachment().getFilename()}) #set ($url=$doc.getAttachmentURL($fname)) {{html}}<iframe name="PDF" src="$url" width="95%" height="800" /></body>{{/html}} #end {{/velocity}} =========================== greetings, Steven Calkins IT-Beratung und Vertrieb CMS - Cross Media Solutions GmbH Beethovenstraße 5 A 97080 Würzburg Tel: +49 (931) 385 - 351 Fax: +49 (931) 385 - 364 Mobil: +49 (175) 5758790 E-Mail: [email protected] Internet: http://www.crossmediasolutions.de Handelsregister: Würzburg HRB 8950 Geschäftsführer: Michael Schardt member of Euradius -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Steven Calkins Gesendet: Dienstag, 3. Mai 2011 10:00 An: XWiki Users Betreff: Re: [xwiki-users] A question about XWiki concept Dear Marius, Xwiki is quite complex so the recommendation to read up on the development guide is probably a wise one. If you can save your lectures in PDF format then the following quick solution might help with part of your problem: 1. Create a space in Xwiki called PDFs. 2. Create a Document in that space called, e.g. "genericPDFs" 3. Insert the following code in the Edit wiki mode: Edit.Wiki =========================== (COPY and PASTE THE FOLLOWING LINES) ======================================= {{velocity}} #set($l=$doc.getAttachmentList()) #if ($l.size() > 0) #set($attach=${l.get(0)}) ## this always takes only the first attachment, so increment this zero to change the attachment being selected #set($fname=${attach.getAttachment().getFilename()}) #set ($url=$doc.getAttachmentURL($fname)) {{html}}<iframe name="PDF" src="$url" width="95%" height="800" /></body>{{/html}} #end {{/velocity}} =========================== For every new page you create, edit it in Wiki mode inserting: =========================== (COPY and PASTE THE FOLLOWING LINE) ======================================= {{include document="genericPDFs"}} =========================== Attach the PDF to the page, and no matter how the PDF attachment is named, the attachment is shown. You can call genericPDFs something else, just be sure the name of the page corresponds to the the reference on the previous line. Kind regards, Steven Calkins -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von mar3lis Gesendet: Freitag, 29. April 2011 18:22 An: [email protected] Betreff: [xwiki-users] A question about XWiki concept Hey guys. I'm still having trouble figuring out the XWiki platform. I have a project to do. The main goal is publish information about lectures and allow users to register to those lectures. The headache for me is, how to connect these things. I mean in normal php/mysql project I would know how to do it, there is some tables, I add information of the user and when I need that information I just make a query. What could be the methods to do that in XWiki? How to connect that specific user has registered to that lecture? What would be the best way to store that kind of information? Thank you in advance Marius Vizbaras-- View this message in context: http://xwiki.475771.n2.nabble.com/A-question-about-XWiki-concept-tp6317490p6... Sent from the XWiki- Users mailing list archive at Nabble.com. _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Thank you very much, Steven, for such a informative reply. Saving lectures as PDF maybe not the best way to do It for me. I was probably not clear about my project. I made a class for lectures with necessary properties and created some documents. Like First Lecture, Second Lecture etc. Now I need the users to be able to register them to these lectures. And I need a way to link these relations between users and lectures. Show how many users ar registered to the specific lecture, and to which lectures a specific user is registered to. Does it have to do something with the on-to-many relations? What would be the best way to do this? Sincerely Marius Vizbaras -- View this message in context: http://xwiki.475771.n2.nabble.com/A-question-about-XWiki-concept-tp6317490p6... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Guillaume Lerouge -
mar3lis -
Steven Calkins