Ok, a couple of easy things to do:
Edit /admin/options.php:
On or about line 68 you'll see
Code:
<li><a href=\"#styles\">Styles Options</a></li>
Add the following line to the bottom of the big list of options. Really, it doesn't matter where it goes, just somewhere in the list is fine.
Code:
<li><a href=\"#html\">HTML Censoring Options</a></li>
Ok. Further on down in options.php (around line 610) you will see
Code:
</table>
<div align=\"center\"><center><table border=\"0\">
<tr>
<td><p><p align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Submit\"></p></p></td>
<td><p><p align=\"center\"><input type=\"reset\" name=\"reset\" value=\"Reset\"></p></p></td>
</tr>
</table>
</center></div>
</form>";
That is the end of the table. Place the following code anywhere above that:
Code:
<!--/// Start HTML Censoring -->
<tr><td colspan=2><hr></td></tr>
<tr><td><a name=\"html\"></a><b>HTML </b></td></tr>
<tr>
<td><p><b>enable html censoring</b></p></td>
<td><p>Yes<input type=\"radio\" name=\"newoption[censorhtml]\" ".iif($censorhtml==1,"checked","")." value=\"1\"> No <input type=\"radio\" name=\"newoption[censorhtml]\" ".iif($censorhtml==0,"checked","")." value=\"0\"></p></td>
</tr>
<tr>
<td><p><b>HTML censor text</b></p></td>
<td><p><input type=\"text\" size=\"35\" name=\"newoption[htmlcensortext]\" value=\"$htmlcensortext\"></p></td></tr>
<!--/// End HTML Censoring -->
Ok. Save, close, and upload the file to your server.
Now open
/global.php (not the one in /admin). Find (around line 421) the line that reads:
Code:
$bbcode=censortext($bbcode);
Add this right after that:
Code:
if( $dohtml == 1 ) {
$bbcode = censorhtml( $bbcode );
} // end if
Ok. That is the call to the censorhtml function.. Now all you have to do is add the function anywhere inside of global.php. I placed mine directly after the censortext( ) function (near line 457).
Here is the function:
Code:
// ###################### Start censorhtml #######################
function censorhtml( $text ) {
global $censorhtml, $htmlcensortext;
if( $censorhtml == 1 ) {
$censorword = explode( " ", $htmlcensortext );
while( list( $key, $val ) = each( $censorword ) ) {
if( $val != "" ) {
$clean_val = substr( $val, 1 );
$text = str_replace( $val, "<" . $clean_val, $text );
} // end if
} // end while
} // end if
return $text;
} // end function censorhtml
That's it! Then save, close, and upload global.php to the server.
Now you can play around in the options control panel to make changes. You have to dot the "Enable Censoring" thing in the HTML Censoring section or otherwise it will skip censoring the HTML. Also, you enter in your censor tags like this:
Code:
<bgsound <sometag <someothertag
Should be straightforward. Works ok on our server / boards.