|
Cookbook /
RandomQuoteWikiSummary: 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
QuestionHow 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 ? AnswerCopy RandomQuoteWiki.phpΔ to the cookbook directory and add Notes and CommentsThis 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 AlsoThe latest version is available here. ContributorsChristophe David original script |