[xwiki-users] Is velocidoc-bin-0.3.zip a prerequisite to install and run velocity documentation from within XWiki Enterprise?
I tried to follow the following instructions from http://dev.xwiki.org/xwiki/bin/view/Drafts/Documenting+XWiki+Velocity+Ma cros : How to install and run from within XWiki Enterprise * Download xwiki-plugin-velocidoc-0.3.jar and xwiki-core-xmlrpc-client-1.5.jar from this page * Install them in your WEB-INF/lib installation and restart your XWiki Enterprise * Import velocidoc-0.3.xar in your Wiki * Visit XWiki.Velocidoc. You can choose 3 parameters to generate your documentation: o Name: name of your wiki: Test o Filename: name of your output zip file: test.zip o Spaces: list of spaces to analyse: leave empty if your wiki is small * The output will be a zip file attached in XWiki.Velocidoc and a macro will automatically display it in the page The Xwiki.Velocity page has the following input boxes, which indicates that something has changed from the instructions above: "File name: EGS.zip Spaces: EGS EGSroot Package Name: EGS Documentation" When I filled the document out as above no attachments and no new display are produced. In Xwiki.VelocityGroovy the following is displayed: ======================= [DISPLAY] ============================= import net.sourceforge.velocidoc.Velocidoc; import com.xpn.xwiki.*; import com.xpn.xwiki.api.*; import com.xpn.xwiki.doc.*; public class VelocidocGroovy4 { public byte[] generateZip(name, filename, spaces, context) { def gen = new net.sourceforge.velocidoc.Velocidoc(); gen.setDefaultName(name); if (spaces!="") gen.setSpaceList(spaces); gen.setOutputDir(filename); gen.setZip(true); gen.setContext(context.getContext()) return gen.generateZip(); } public int addAttachment(pagename, filename, zipdata, context1) { if (!context1.hasProgrammingRights()) return -10; def context = context1.context; if (context==null) return -10; def xwiki = context.getWiki(); def doc = xwiki.getDocument(pagename, context); def attachment = doc.getAttachment(filename); if (attachment==null) { attachment = new XWikiAttachment(); doc.getAttachmentList().add(attachment); // Add the attachment to the document attachment.setDoc(doc); } attachment.setContent(zipdata); attachment.setFilename(filename); // TODO: handle Author attachment.setAuthor(context1.user); doc.saveAttachmentContent(attachment, context); return 1; } } ============================[END DISPLAY]======================== Does the line "import net.sourceforge.velocidoc.Velocidoc;" indicate that the velocidoc-bin-0.3.zip also needs to be installed first as a prerequisite to "Xwiki" version? Here the signature at the bottom of the page: "Creator: LudovicDubost on 2008/08/20 23:38 This wiki is licensed under a Creative Commons 2.0 license XWiki Enterprise 1.9.1.21780 - Documentation" Greetings, Steven Calkins
Dear XWiki users, I just wanted to share a workaround for a PDF rendering problem. I was copying and pasting html from a knowledgeroot system into xwiki. In the process I was changing the image paths to relative URLs. Normally nothing speaks against using the absolute URLs, but we may need to move the wiki soon, so I decided that relative paths are better. They display fine in Xwiki Enterprise, but then the disappointment came when I tried the PDF print. The first image appeared but the following were empty! So I needed an absolute path which I can change easily if we move the wiki. I went into the xwiki/skins/Albatross/template directory to the the xwikivars.vm file and added a variable of the form: #set($domain = "http://domain:port") After adding it, I saved the file, restarted Tomcat and tested by typing somewhere in a page "$domain". That took care of it. The PDFs were just fine now. Now I can replace the relative URL everywhere by "${domain}/[ here relative URL]". When we move the wiki to another server it will work as soon as I make a single change in the xwiki/skins/Albatross/template/xwikivars.vm file. I am new at XWiki, so if anyone has a better solution I'd be very glad to hear it. Greetings, Steven Calkins
Steven Calkins wrote:
Dear XWiki users,
I just wanted to share a workaround for a PDF rendering problem. I was copying and pasting html from a knowledgeroot system into xwiki. In the process I was changing the image paths to relative URLs. Normally nothing speaks against using the absolute URLs, but we may need to move the wiki soon, so I decided that relative paths are better. They display fine in Xwiki Enterprise, but then the disappointment came when I tried the PDF print. The first image appeared but the following were empty! So I needed an absolute path which I can change easily if we move the wiki.
I went into the xwiki/skins/Albatross/template directory to the the xwikivars.vm file and added a variable of the form: #set($domain = "http://domain:port") After adding it, I saved the file, restarted Tomcat and tested by typing somewhere in a page "$domain". That took care of it. The PDFs were just fine now. Now I can replace the relative URL everywhere by "${domain}/[ here relative URL]". When we move the wiki to another server it will work as soon as I make a single change in the xwiki/skins/Albatross/template/xwikivars.vm file.
I am new at XWiki, so if anyone has a better solution I'd be very glad to hear it.
If the images are attachments to the wiki, you can use the {image} macro for the 1.0 syntax, or the image: syntax for 2.0 documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/
Hi Sergiu, Yes, of course you can use the {image} macro for the 1.0 syntax, or the image: syntax for 2.0 documents, if they are attached, but to save time the images were not attached. I copied the folder with hundreds of files from knowledgeroot (where the images were) to the xwiki folder and changed the URLs with an UltraEdit macro using regular expressions. The point is then, that manually importing the files as attachments is the work that can, in this case, be avoided. So the workaround is for external file references from, e.g., another system. It would be nice to be able to declare a folder in XE to be a resource folder for those cases in which resources from other systems must be used. Or do you already have such a facility? Greetings, Steven Calkins -----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Sergiu Dumitriu Gesendet: Freitag, 28. August 2009 12:49 An: XWiki Users Betreff: Re: [xwiki-users] A workaround for a PDF rendering problem Steven Calkins wrote:
Dear XWiki users,
I just wanted to share a workaround for a PDF rendering problem. I was copying and pasting html from a knowledgeroot system into xwiki. In the process I was changing the image paths to relative URLs. Normally nothing speaks against using the absolute URLs, but we may need to move the wiki soon, so I decided that relative paths are better. They display fine in Xwiki Enterprise, but then the disappointment came when I tried the PDF print. The first image appeared but the following were empty! So I needed an absolute path which I can change easily if we move the wiki.
I went into the xwiki/skins/Albatross/template directory to the the xwikivars.vm file and added a variable of the form: #set($domain = "http://domain:port") After adding it, I saved the file, restarted Tomcat and tested by typing somewhere in a page "$domain". That took care of it. The PDFs were just fine now. Now I can replace the relative URL everywhere by "${domain}/[ here relative URL]". When we move the wiki to another server it will work as soon as I make a single change in the xwiki/skins/Albatross/template/xwikivars.vm file.
I am new at XWiki, so if anyone has a better solution I'd be very glad to hear it.
If the images are attachments to the wiki, you can use the {image} macro for the 1.0 syntax, or the image: syntax for 2.0 documents. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
Hi Steven, On Fri, Aug 28, 2009 at 1:09 PM, Steven Calkins < [email protected]> wrote:
Hi Sergiu,
Yes, of course you can use the {image} macro for the 1.0 syntax, or the image: syntax for 2.0 documents, if they are attached, but to save time the images were not attached. I copied the folder with hundreds of files from knowledgeroot (where the images were) to the xwiki folder and changed the URLs with an UltraEdit macro using regular expressions.
The point is then, that manually importing the files as attachments is the work that can, in this case, be avoided. So the workaround is for external file references from, e.g., another system. It would be nice to be able to declare a folder in XE to be a resource folder for those cases in which resources from other systems must be used. Or do you already have such a facility?
Not quite. However, using XWiki's WebDAV interface you could quite easily drag & drop files from a location on the filesystem to XWiki pages. If knowledgeroot can be accessed through a filesystem, moving image files between both platforms would be extremely easy. Guillaume
Greetings, Steven Calkins
-----Ursprüngliche Nachricht----- Von: [email protected] [mailto:[email protected]] Im Auftrag von Sergiu Dumitriu Gesendet: Freitag, 28. August 2009 12:49 An: XWiki Users Betreff: Re: [xwiki-users] A workaround for a PDF rendering problem
Steven Calkins wrote:
Dear XWiki users,
I just wanted to share a workaround for a PDF rendering problem. I was copying and pasting html from a knowledgeroot system into xwiki. In the process I was changing the image paths to relative URLs. Normally nothing speaks against using the absolute URLs, but we may need to move the wiki soon, so I decided that relative paths are better. They display fine in Xwiki Enterprise, but then the disappointment came when I tried the PDF print. The first image appeared but the following were empty! So I needed an absolute path which I can change easily if we move the wiki.
I went into the xwiki/skins/Albatross/template directory to the the xwikivars.vm file and added a variable of the form: #set($domain = "http://domain:port") After adding it, I saved the file, restarted Tomcat and tested by typing somewhere in a page "$domain". That took care of it. The PDFs were just fine now. Now I can replace the relative URL everywhere by "${domain}/[ here relative URL]". When we move the wiki to another server it will work as soon as I make a single change in the xwiki/skins/Albatross/template/xwikivars.vm file.
I am new at XWiki, so if anyone has a better solution I'd be very glad to hear it.
If the images are attachments to the wiki, you can use the {image} macro for the 1.0 syntax, or the image: syntax for 2.0 documents.
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Product Manager - XWiki Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/
Dear All, How do I create an ImageMap in Xwiki with Syntax 2.0? I already have the image map created with an open source tool. I can include an image in syntax 2 with the [[image:URL||width="xxx"]] syntax. But where do I tell it to use the image map? And where can I put the image map? Thanks for any help. Steven Calkins
Hi Steven, On Aug 31, 2009, at 10:50 AM, Steven Calkins wrote:
Dear All, How do I create an ImageMap in Xwiki with Syntax 2.0?
I already have the image map created with an open source tool. I can include an image in syntax 2 with the [[image:URL||width="xxx"]] syntax. But where do I tell it to use the image map? And where can I put the image map?
You'll need to use the HTML macro: http://code.xwiki.org/xwiki/bin/view/Macros/HTMLMacro Thanks -Vincent
participants (4)
-
Guillaume Lerouge -
Sergiu Dumitriu -
Steven Calkins -
Vincent Massol