When install the old versión, some problem occurrs in file Subs.php. The code was added to start of the file, out of the php tag. This text is visible in index page always.
Also, the code used a trigger.
I change all this code and use one similar than dice mod.
<file name="$sourcedir/Subs.php">
<operation>
<search position="after"><![CDATA[ array(
'tag' => 'blue',
]]></search>
<add><![CDATA[ array(
'tag' => 'randomquote',
'before' => '<div style="font-size:x-small; background-color:#ffffff; margin:5px 20px; border:1px dashed black; filter:alpha(opacity=50); opacity:0.5;">',
'after' => '</div>',
),
]]></add>
</operation>
</file>
In Subs-Post.php I added new code for check someone is editing the result. This code was copied from dice mod too.
<file name="$sourcedir/Subs-Post.php">
<operation>
<search position="before"><![CDATA[// Now let's quickly clean up things that will slow our parser (which are common in posted code.)
$message = strtr($message, array('[]' => '[]', '['' => '[''));]]></search>
<add><![CDATA[
// remove anyone who posted with the [randomquote] tag, bah, ye cheating riffraff
global $txt, $settings;
$message = preg_replace('~\[/randomquote\]~i', '', $message);
$message = preg_replace('~\[randomquote[^\]]*\]~i', "
{$txt['random_cheat']}\n", $message);
// random them values!
$message = preg_replace_callback('~\[random\]([^\[]*)\[/random\]~i', 'random_bbcode', $message);]]></add>
</operation>
I also changed the function random_bbcode, move funcion from file Subs.php to Subs-Post.php.