Cookbook /
RandomQuoteWiki
Summary: How to display a random quote from a list stored in a PmWiki page
Version:
Prerequisites: requires at least PmWiki version: 2.0; last tested on PmWiki version: 2.0.0
Status:
Maintainer: cda (other recipes)
Categories: Administration
Question
How can I display a random quote from a list stored in a PmWiki page, and not from a flat file that I cannot access easily ?
Answer
Copy RandomQuoteWiki.phpΔ to the cookbook directory and add include_once("cookbook/RandomQuoteWiki.php"); to config.php.
Notes and Comments
This script adds two markups (:RandomQuoteWiki_quote:) and (:RandomQuoteWiki_author:) that contain a random quote stored in a pmwiki page (instead of a flat file that cannot be accessed by most users).
The quotes must be structured like
<quotes>
<quote>
<text>quote text 1</text>
<author> quote author 1</author>
</quote>
<quote>
<text>quote text 2</text>
<author>quote author 2</author>
</quote>
...
</quotes>
See Also
The latest version is available here.
Contributors
Christophe David original script