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.
Is there any way to make the filtered words to be replaced only in the public posts but to be allowed to display normally in pm's ?
Try this:

Open inc/functions_post.php.
Find:
function postify($message, $allowhtml="no", $allowmycode="yes", $allowsmilies="yes", $allowimgcode="yes")
Replace with:
function postify($message, $allowhtml="no", $allowmycode="yes", $allowsmilies="yes", $allowimgcode="yes", $pmprevann = 0)
Find:
	$message = dobadwords($message);
Replace with:
	if ($pmprevann != 1) { $message = dobadwords($message); }
Find:
$post['message'] = postify($post['message'], $forum['allowhtml'], $forum['allowmycode'], $allowsmilies, $forum['allowimgcode']);
Replace with:
$post['message'] = postify($post['message'], $forum['allowhtml'], $forum['allowmycode'], $allowsmilies, $forum['allowimgcode'], $pmprevann);
and if i want to dissallow bad words in displaying in the profiles? Cause some members use them in their "Bio" field

thanx