View Full Version : Word censor / profanity filter for guests only?
Guest210212002
07-11-2013, 07:28 PM
I run a metal forum, and as such my guys swear a lot. I'd like to have the profanity filter turned on for guests only, to prevent f-bombs and such from showing up in things like Google results.
I searched the mods and didn't see anything that really fit the bill - does anyone know of a way that I can toggle it on for guests only?
Thanks!
Simon Lloyd
07-11-2013, 08:27 PM
If your members posts are indexed by search engines and they have profanities then those will show up in the results. Are only guest posts available to search engines?
You could have a plugin that uses regex to check the content and xxx out any that are in a list (or replace them for a daft word of your own).
--------------- Added 1373579416 at 1373579416 ---------------
You can try this, create a plugin using hook "newpost_process" and enter the followingif (!is_member_of($vbulletin->userinfo, 1, 2, 3)){
$badwords = array("monday", "tuesday", "wednesday", "thursday", "friday");
$post['message'] = str_replace($badwords, "flowers", $post['message']);
}
replace and add to the bad words list, the usergroup staement says if the user is NOT in usergroup 1,2 or 3 then perform the replacement.
Change the usergroups and give it a go in a test environment as i haven't tested it :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.