There are many topics on why the word censor does not work with code tags. This article will cover how to do it.
Tools needed:
FTP Client (like FileZilla), Text editor (like Notepad++)
Procedure:
First of all, you need to download the following file:
root/includes/bbcode.php
Before you begin editing it, you must make a backup of the file.
Open the file "bbcode.php" in a text editor.
Find: (Tip: Press F3 to start searching part of code which you are looking for.)
- Code: Select all
// Remove the uid from tags that have not been transformed into HTML
if ($this->bbcode_uid)
{
$message = str_replace(':' . $this->bbcode_uid, '', $message);
After, add:
- Code: Select all
$message = censor_text($message);
After editing, that part of code should look like the following.
- Code: Select all
// Remove the uid from tags that have not been transformed into HTML
if ($this->bbcode_uid)
{
$message = str_replace(':' . $this->bbcode_uid, '', $message);
$message = censor_text($message);
Tested on phpBB v3.0.7-PL1
Thanks!