Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
java
FortuneCookie.java 4.0 kB 1 25-Sep-2008 04:35 Maik Scheibler
java
FortuneCookiePlugin.java 3.2 kB 1 25-Sep-2008 14:02 Maik Scheibler moved source code from page to attachment
jar
FortuneCookiePlugin_v2.6.4.jar 3.3 kB 1 25-Sep-2008 04:14 Maik Scheibler
jar
FortuneCookiePluginv2.0.52.jar 2.3 kB 1 18-Mar-2005 22:41 Mbarcia
jar
FortuneCookies.jar 3.1 kB 2 05-Oct-2004 18:27 BradfordHolcombe

This page (revision-28) was last changed on 25-Sep-2008 16:02 by Maik Scheibler  

This page was created on 19-Nov-2003 06:23 by 171.75.64.141

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 plugin will return a random single line from any Wiki page. I use this to implement 'fortune cookies' on my [wiki|http://colbadhombre.net/SecularWiki/] (See the bottom of the page).
[{TableOfContents }]
%%commentbox
__Versions :__\\
-----
[Latest|1] (most up to date )\\
[Archive|2] (previous versions)
%%
At line 9 added 37 lines
!! Description
This plugin will return a random single line from any designated Wiki page on each call. Thus each line of this page becomes a "[fortune|Wikipedia:Fortune_cookie]".
!! Download
Please choose your plugin version:
! Latest
This is the most up to date version of the plugin.
25-Sep-2008: [FortuneCookiePlugin_v2.6.4.jar] package. [FortuneCookie.java] source.\\
''(Tested with JSPWiki 2.6.4 and Sun JDK 1.6.0)''
Here are the changes:
* Changed the plugin package and classname, it is now {{{de.ldj.jspwiki.plugin.FortuneCookie}}}
* The fortunes will be cached and only reloaded if the fortunes page becomes modified. A count of fortunes as first line is no longer required/used.
* Removed the usage of deprecated API. ''(I tested with JSPWiki v2.6.4 & JDK 1.6.0, but it should also work with later versions.)''
* Overall source cleanup. ''(see [FortuneCookie.java])''
! Archive
Here you can find more recent versions of the plugin.
18-Mar-2005: [FortuneCookiePluginv2.0.52.jar] package. [FortuneCookiePlugin.java] source.\\
--[MBarcia]: ''(This plugin was not working for the 2.0.52 stable version. Also attached to this page is the JAR for this version. HTH)''
05-Oct-2004: [FortuneCookies.jar] package.\\
-- user: ''(I have added code to remove list wiki markup from each line. This allows the [original page|http://colbadhombre.net/SecularWiki/Wiki.jsp?page=Sayings] to use the wiki list syntax, so the fortune line looks better when rendered in its own page. Thanks to [suggestions|EmbeddingJSPWiki] from Janne, I have added a call to the wiki tranlation engine so that each line (minus its original list markup) renders any wiki markup in the returned fortune. The new source is above, and the JAR reflects these changes.)''
!! Usage
The fortunes may be styled like any regular
At line 33 removed one line
I have added code to remove list wiki markup from each line. This allows the [original page|http://colbadhombre.net/SecularWiki/Wiki.jsp?page=Sayings] to use the wiki list syntax, so the fortune line looks better when rendered in its own page. Thanks to [suggestions|EmbeddingJSPWiki] from Janne, I have added a call to the wiki tranlation engine so that each line (minus its original list markup) renders any wiki markup in the returned fortune. The new source is above, and the JAR reflects these changes.
At line 77 added one line
At line 167 removed 3 lines
This plugin was not working for the 2.0.52 stable version. Also attached to this page is the JAR for this version.\\
HTH\\
--[MBarcia]
At line 174 removed 6 lines
Here are the changes:
* Changed the plugin package, the class is now {{{de.ldj.jspwiki.plugin.FortuneCookie}}}
* The sayings will be cached and only reloaded if the sayings page becomes modified. A count of sayings as first line is no longer required/used.
* Removed the usage of deprecated API. ''(I tested with JSPWiki v2.6.4 & JDK 1.6.0, but it should also work with later versions.)''
* Overall source cleanup. ''(see [FortuneCookie.java])''
Version Date Modified Size Author Changes ... Change note
28 25-Sep-2008 16:02 4.608 kB Maik Scheibler to previous
27 25-Sep-2008 15:41 4.606 kB Maik Scheibler to previous | to last
26 25-Sep-2008 14:00 7.717 kB Maik Scheibler to previous | to last
25 25-Sep-2008 12:45 7.025 kB Maik Scheibler to previous | to last
24 25-Sep-2008 04:58 7.031 kB Maik Scheibler to previous | to last
23 25-Sep-2008 04:52 6.75 kB Maik Scheibler to previous | to last
22 26-Sep-2007 23:21 5.456 kB JanneJalkanen to previous | to last
21 26-Sep-2007 02:18 5.478 kB 221.233.134.87 to previous | to last
« This page (revision-28) was last changed on 25-Sep-2008 16:02 by Maik Scheibler