Extension:Bashfr

What can this extension do?
Like Extension:RandomInclude or RandomText it provides a random quote from a file preformated.

Installation
require_once("$IP/extensions/bashfr/bashfr.php");
 * 1) Create bashfr/ in extensions/
 * 2) Paste php code into bashfr.php
 * 3) get bashfr_fortunes from
 * 4) Alter LocalSettings.php, add :
 * 1) Put tag on desired pages

Parameters
None.

Changes to LocalSettings.php
require_once("$IP/extensions/bashfr/bashfr.php");

Code
setHook( "bashfr", "renderBashfr" ); }

function renderBashfr( $input, $argv, &$parser ) { //$fortunes = explode(chr(13).chr(10)."%".chr(13).chr(10), file_get_contents('bashfr_fortunes')); $fortunes = explode("\n%\n", file_get_contents('extensions/bashfr/bashfr_fortunes')); $fortune = htmlentities($fortunes[rand(0, count($fortunes) - 1)], ENT_QUOTES); $output = nl2br(ereg_replace('alpha:+://[^<>[:space:]]+[[:alnum:]/]', '\\0', $fortune)); return $output; } ?>