Flash Button only show on HTML-enabled forums
by Velocd |
Install time: Maybe 5 minutes
It took me about an hour, but I figured out how to do this (myself ^_^) This enhancement will allow only HTML enabled forums to have the flash button (makes sense), which means there is no reason for everyone not to use this hack (unless ofcourse your lazy

)
-----------------------------------------------------------------------
1. Go into your
functions.php, find the following:
PHP Code:
eval ("\$vbcode_colorbits = \"".gettemplate("vbcode_colorbits")."\";");
Now below it place this:
PHP Code:
if ($flashenabled)
{
eval("\$flashcode .= \"".gettemplate("vbcode_flash")."\";");
}
2. In
newthread.php, find the following:
PHP Code:
$vbcode_smilies = '';
Now above it place this:
PHP Code:
if($foruminfo[allowhtml])
{
$flashenabled = true;
}
Still in
newthread.php, find the following:
PHP Code:
$vbcode_buttons = getcodebuttons();
Replace it with the following:
PHP Code:
$vbcode_buttons = getcodebuttons($flashenabled);
3. Do the same in
step 2 to
newreply.php, and also
editpost.php
4. Create a new template, and call it
vbcode_flash. Place the following in it:
Code:
<input type="button" class="bginput" value="swf" title="Insert Flash" onclick="flash(this.form,swf)" onmouseover="stat('swf')">
5. Go into the template
vbcode_buttons, and find the following:
Code:
<input type="button" class="bginput" value="IMG" title="Insert Image" onclick="vbcode(this.form,'IMG','http://')" onmouseover="stat('img')">
And place this right after it:
-----------------------------------------------------------------------
Thats it! Hope you enjoy