MyBB Community Forums

Full Version: bad word filter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Where can I find the bad word filter.
Can I use it also for pm's.
Someone is making links to other forums that I do not want.
ACP - Message Filters - Manage Bad Words

Edit;

If you want to filter badwords in the PM Message; you need to edit (private.php) and parse the message with $parser->parse_badwords($message) ;
LeX- Wrote:ACP - Message Filters - Manage Bad Words

Edit;

If you want to filter badwords in the PM Message; you need to edit (private.php) and parse the message with $parser->parse_badwords($message) ;
The word filters dont work in PMs?
xcx Wrote:
LeX- Wrote:ACP - Message Filters - Manage Bad Words

Edit;

If you want to filter badwords in the PM Message; you need to edit (private.php) and parse the message with $parser->parse_badwords($message) ;
The word filters dont work in PMs?

By default ? As far i've seen in the code, just the subject gets filtered.
That doesn't make sense Toungue If it's filtered for the subject, it should be filtered for the body lol. I don't have time to check this right now though...
As far as I remember, subjects don't get filtered, just messages themselves
spinning Wrote:Where can I find the bad word filter.
Can I use it also for pm's.
Someone is making links to other forums that I do not want.
This bad words filter is not that practical a solution. You should nib such users in the bud. I find TikiTiki's great plugin, Akismet, the only possible solution to fight those idiots who post bad words:
http://mods.mybboard.net/view/akismet-(spam-protection)

Regards
Akismet only prevents spam, not inappropriate language Toungue
In the read action (private.php)
	$pm['subject'] = htmlspecialchars_uni($parser->parse_badwords($pm['subject']));
	$message = build_postbit($pm, "2");

And if you follow the build_postbit function
		case "2": // Private message
			global $message, $pmid;
			$parser_options['allow_html'] = $mybb->settings['pmsallowhtml'];
			$parser_options['allow_mycode'] = $mybb->settings['pmsallowmycode'];
			$parser_options['allow_smilies'] = $mybb->settings['pmsallowsmilies'];
			$parser_options['allow_imgcode'] = $mybb->settings['pmsallowimgcode'];
			$parser_options['me_username'] = $post['username'];
			$id = $pmid;
			break;
//******************
	// Dont want any little 'nasties' in the subject
	$post['subject'] = $parser->parse_badwords($post['subject']);

So i don't see where the message gets filtered for badwords, just the subject ...
LeX- Wrote:And if you follow the build_postbit function

$post['message'] = $parser->parse_message($post['message'], $parser_options);

which in turns parses the bad words in the parse_message function

Also it appears I was wrong. Both are filtered
Pages: 1 2