Add new attachment

Only authorized users are allowed to upload new attachments.

This page (revision-26) was last changed on 27-Mar-2009 15:09 by Janne Jalkanen  

This page was created on 30-May-2003 16:49 by JanneJalkanen

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Difference between version and

At line 1 changed one line
''This page still under construction''
[{TableOfContents}]
At line 3 changed one line
Current known JSPWiki embedders:
!!How does it all work?
At line 5 removed 5 lines
* [Roller Weblogger|http://rollerweblogger.org/wiki/Wiki.jsp?page=RollerWikiPlugin]. [Sample code|http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/roller/roller/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java?rev=1.4&content-type=text/vnd.viewcvs-markup]
* [JabberMessageArchiving]
!How does it all work?
At line 16 changed one line
!How to get a WikiEngine?
!!How to get a WikiEngine?
At line 38 changed one line
!How do I get a WikiContext
!!How do I get a WikiContext?
At line 57 changed one line
!How to use the TranslatorReader?
!!How to get rendered page data?
At line 59 changed one line
After you have the WikiContext, you can simply create a new TranslatorReader by using
If your page data is stored inside a JSPWiki repository, you can use the JSPWiki rendering code directly via the method ~WikiEngine.getHTML():
At line 57 added 9 lines
String rendereddata = myWikiEngine.getHTML( wikiContext, page );
}}}
The reason why you need to respecify the WikiPage you want to render is that in some occasions you may want to render a page within the context of another page, for example, the LeftMenu wants the ReferringPagesPlugin to get the referring pages of the page are viewing, not LeftMenu.
!!How to use the TranslatorReader?
If you have just a chunk of WikiMarkup, you don't want to store it in the Wiki page repository, but you want to render it directly. This can be accomplished by directly accessing a TranslatorReader. After you have the WikiContext, you can simply create a new TranslatorReader by using
{{{
At line 69 changed one line
!How can I vary the rendering?
%%note
Note: You will need to call any PageFilters manually, if you are directly accessing the TranslatorReader, as normally this is done by the WikiEngine.
%%
At line 71 changed one line
TBA.
!!How can I vary the rendering?
At line 73 changed one line
!What other information can I get from the TranslatorReader?
Take a look at the Javadoc of TranslatorReader to get the most up-to-date information, but here are some things you can do. You can control some features by setting variables in the WikiContext before rendering, and some others by directly accessing the TranslatorReader.
At line 75 changed one line
TBA.
!Switching off the plugin rendering
At line 77 changed one line
!What libraries (Jars) do I need?
Say
{{{
wikiContext.setVariable( TranslatorReader.PROP_RUNPLUGINS, "false" );
}}}
At line 89 added 34 lines
Alternatively, use
{{{
translatorReader.enablePlugins( false );
}}}
!Turn off image inlining
No matter what jspwiki.properties says, this turns off any image inlining.
{{{
translatorReader.enableImageInlining( false );
}}}
!!What other information can I get from the TranslatorReader?
TranslatorReader has a bunch of places where you can hook. I'm calling them hooks, because, well, I'm an old Amiga guy, and that word just sits better with me than "Listener". (This is a stub, more info needed.)
!Modifying link text
Hook to {{{ addLinkTransmutator() }}}
!Collecting local links
Add a listener with {{{addLocalLinkHook()}}}.
!Collecting external hyperlinks
Add a listener with {{{addExternalLinkHook()}}}.
!Collecting attachment links
Add a listener with {{{addAttachmentLinkHook()}}}.
!!What libraries (Jars) do I need?
At line 81 changed one line
!How do I make JSPWiki's logging play nice with my app's Log4j setup?
!!How do I make JSPWiki's logging play nice with my app's Log4j setup?
At line 131 added 6 lines
!!!Current known JSPWiki embedders:
* [Roller Weblogger|http://rollerweblogger.org/wiki/Wiki.jsp?page=RollerWikiPlugin]. [Sample code|http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/roller/roller/src/org/roller/presentation/velocity/plugins/jspwiki/WikiPlugin.java?rev=1.4&content-type=text/vnd.viewcvs-markup]
* [JabberMessageArchiving]
Version Date Modified Size Author Changes ... Change note
26 27-Mar-2009 15:09 5.52 kB Janne Jalkanen to previous Please don't post questions in the middle, they are very confusing to others.
25 27-Mar-2009 04:00 5.763 kB 69.26.32.67 to previous | to last
24 21-Jan-2009 10:42 5.52 kB 80.62.161.39 to previous | to last Fixed typo in code example.
23 18-Apr-2007 09:51 5.519 kB David Au to previous | to last restored; please use the Sandbox for testing
22 18-Apr-2007 07:54 5.519 kB 202.144.61.68 to previous | to last
21 18-Apr-2007 07:53 5.523 kB 202.144.61.68 to previous | to last
« This page (revision-26) was last changed on 27-Mar-2009 15:09 by Janne Jalkanen