Censors posts for bad words, replacing them with asterisk or disallowing them as tags. Includes an initial word list and admin interface for modifications. Created in conjunction with b5media. Based on censor by Michael Nolan.
bbPress Plugin Browser »
C*nsor (0.1)
Download
Version: 0.1
Last Updated: 2009-2-10
Requires bbPress Version: 0.9 or higher
Compatible up to: 1.0-alpha-6
Average Rating





Your Rating
Author: Terry Smith
-
Excellent, thanks for this. Had some trouble swearing in tags. Nice list of pre-defined swearing too!
Posted: 1 year ago # -
Speedup tips:
for($i = 0; $i < sizeof($words); $i++) {In some versions of PHP, that sizeof (count) will be executed on every pass in the loop. Do it once outside the loop.
if(in_array($tag->name, $words))in_array is horribly slow - do an ISSET instead against keys which is incredibly fast - prep the array by doing an array_flip during the plugin init (ie.
$words=array_flip($word);If someone wanted to be clever, they could just look at the list of forbidden words in the plugin directory directly - then just do a variant. Only ways around this are storing the words.txt outside the webroot (difficult given how many people dont know how to do this) or store it in the db options as a serialized list and edit from the admin panel.
Posted: 1 year ago # -
Thanks for the feedback, _ck_! I've made the changes to speed things up. I have also changed words.txt to a php file. The file is only there to provide an initial list, which is indeed serialized into the database and can be edited from there.
Thanks again!
Posted: 1 year ago # -
Do swear words have any negative effects concerning SEO?
Thanks
Posted: 1 year ago # -
No, Google doesn't count swear words against you. It's pretty agnostic that way. Only potential issue would be with "family friend" search engines or services.
Posted: 1 year ago # -
Yah I don't think swear words hurt your SEO... but I've seen firsthand that certain swear words do result in Public Service Announcements in your AdSense slots! So this plugin could actually help improve your CPM... :-)
I haven't tried it out though, so can't say for sure...
Posted: 1 year ago # -
You know what would be nice, if you don't mind me adding to the wishlist. If it did reg-ex through the entire post, rather than through the words.
For example, it parses word1 word2 word3
but wouldn't catch word1word2word3
Sometimes these mouthbreathers don't use spaces properly in their cursing.Posted: 8 months ago # -
Hi, just wondering how it would be possible to exclude one category from censoring?
Posted: 8 months ago # -
Hi there,
I would like to report a bug on this plugin.
I tried your plugin with a custom list of words, some of them accented ones (french swear words, some containing/ending with "é"...)
it turns out that the bad word isn't censored.Seems like there's a problem using preg_replace with UTF-8 chars but i have no further explanations so far.
Will post back here if i found a solution for that, but i'd appreciate anyone who's aware about this giving some tips on how to fix the issue.Cheers!
Posted: 7 months ago # -
Fresh install of 1.0.2
"Words to censor:" textbox filled with error, the PHP implode failed due to invalid args!
Posted: 7 months ago #
Add a Comment
You must log in to post.