|
Cookbook /
FortuneSummary: Insert a fortune cookie into a wiki page
Version: 2007-09-17
Status: Stable
Prerequisites: pmwiki-2.x
Maintainer: Dfaure
Categories: Includes
Download: fortune.phpΔ
DescriptionFortune adds the
Put
include_once("$FarmD/cookbook/fortune.php");
Then, depending to your hosting os, you may either:
NotesFortune quotes are often multiline raw text which don't render very well when injected into html. They are (by default) rendered into
The quotes may be selected from a subset of the referenced files with the Limitations/Implementation considerationsThe The following code in your configuration file would handle the rendering of utf8 encoded fortune files:
$FortuneFilter = 'FortuneUtf8Filter';
function FortuneUtf8Filter($pagename, $opt, &$file, &$txt, &$rank) {
$file = basename($file);
$txt = htmlspecialchars(utf8_decode($txt), ENT_NOQUOTES);
}
See AlsoContributorsHistory
CommentsUser notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki. |