Big Brother v1.2 beta 2

Release Notes

Enables a word-based censor for all user input.  Optionally can report offensive language via the
Reported Content plugin.

Mal-formed word lists will have unexpected results!  Word lists *must* be comma separated in
one of the two formats:

Format 1:
word1,
word2,
word3

Format 2:
word1, word2, word3

The plugin will automatically convert all word lists into the first format upon saving.
Extra whitespace will be trimmed.

As of 1.2, regexp is supported in the words list.

** INSTALLATION **
        * Unzip the file to the elgg/mods/ directory.
        * Go to your Elgg tools administration section, find the uncaptcha tool, and
          enable it.
        * Customize the settings if desired.


** TODO **
        * Make censoring by certain types / subtypes work.
        * Make the "visit reported link" link more accurate.


** CHANGES **

v1.2b2 (2/20/2009)
        * Added 'enabled_plugins' to list of ignored subtypes.
        * Reduced reported content width to 35 chars.

v1.2b1 (2/13/2009)
        * Added basic support for regexp word lists.
        * Corrected errors that could result in reporting content for reported content.
        * Code cleanup.
        * Added a ginormous red notices about HTML editors and malformed word lists.

  • thanks brett - do you have a list of nasties or a smart list that we can use..?

     

  • @Sunirmalya - My client agreed to allow this plugin to be released with the stipulation that it not include our default word list, so unfortunately I can't do this.  http://www.noswearing.com/ offers a list and an API if you contact them, though...

  • @sunirmalya -- before this plug-in was available, I edited a core file (engine/lib/input.php) with a bad words filter.  I'm not sure if big brother supports regular expressions, but if it does, you can use this list that I compiled from many sources.... includes English and Spanish bad words. It works really well!

     

            //theme_OakPages modification: remove bad words
        function filterBadWords($str){

     // words to filter
     $badwords=array('(\b|\W|\d)put(a|o|as|os)+(\b|\W|\d)','(\b|\W|\d)mie(r|l)+das?(\d)?','(\d)?(s|c)+erot(e|a|es|as|io|ia)+(\d)?',
                                         '(\d)?pajer(o|a|os|as)+(\d)?','(\d)?paj(eo|ea|ar|ea|ear|ie)+(\d)?','(\d)?pi(s|z)+ad(o|a|os|as)+(\d)?','(\d)?ching(o|a|ue|e|as|adera)+(\d)?',
                                         '(\b|\W|\d)chim(o|a|ar|as)+(\b|\W|\d)', '(\b|\W|\d)trin(c|q)+(a|ar|ue|ues|ada|adera)+s?(\b|\W|\d)', 'desgraciad',
                                         'bastard(a|o)?','f(o|u)+ck','sanaba', 'jodid(o|a)+', 'jodist','wanna lick','lick.?your','lick ur','(\b|\W|\d)chupam',
                                         '(\b|\W|\d)verg(ea|a)+','(\b|\W|\d)cul(o|a|ero|era|ito|ita)+s?(\b|\W|\d)',
                                        '(\b|\W|\d)nigger(\b|\W|\d)','(\b|\W|\d)gring(o|a)+','(\b|\W|\d)pakis?(\b|\W|\d)','panooch','(\b|\W|\d)pecker','peckerhead','tracero','(\b|\W|\d)ass(es)?(\b|\W|\d)',
                                        '((\b|\W|\d)pis?s(ed|es|t|d)?.off?)|((\b|\W|\d)piss?(ed|es|t|d)?(\b|\W|\d))', 'ass.?cra(ck|c|k)+',
                                        'pollock','(\b|\W|\d)poon(\b|\W|\d)','poonami','poonany','de perr(o|a)?s?','(\b|\W|\d)prick','punammy',
                                        'puss(i|a|y|e)+(s|es|cat|lick(s|ings|ing)?)?','(\b|\W|\d)shit','(\b|\W|\d)crap',
                                        'ass.?holes?','(\b|\W|\d)wank','wet.?back','(\d)?whore(s|\d|.)?','(\b|\W|\d)hussy','(wanna|want to)+ touch (your|ur)+','va-j-j','vjayjay',
                                        '(\b|\W|\d)t(a|u)+rd(\b|\W|\d)', 'thunder.?cunt','(\b|\W|\d)tit(\b|\W|\d|s|t|i|y)+(\d)?',
                                        '(\b|\W|\d)twats?(\b|\W|\d)', '(\b|\W|\d)twatlips?', 'twatwaff?l?es?l?', '(\b|\W|\d)huec(o|a)+', '(\b|\W|\d)lesbo', 'sand.?nigger', '(\b|\W|\d)schlong',
                                        '(\b|\W|\d)pija(so|zo|s|da)?', '(\b|\W|\d)verga', 'perlar(me|se|nos)+.?(el|la)+', 'meter(me|se|nos|le)+.?(el|la)+',
                                        '(\b|\W|\d)dick', 'dick.?head', 'shit.?di(ck|c|k)+', 'shit.?fa(c|s)+e', 'shit.?hea?d', 'shit.?hole?s?', 'shit.?house?s?',
                                        'shit.?stains?','shitt','shit.?spit','(\b|\W|\d)shizs?(\b|\W|\d)','shemale','maldit(os|as|o|a)+', 'get(t?ing)?.?high', 'el.?culo','(\b|\W|\d)hell(\b|\W|\d)',
                                        'splooge','(\b|\W|\d)cum(\b|\W|\d|m|s)?', 'stiff?y', '(\b|\W|\d)renob(\b|\W|\d)', 'erec(t|c)+ion', 'rim.?job', 'hand.?job', '(\b|\W|\d)runski(\b|\W|\d)',
                                        '(\b|\W|\d)queef(\b|\W|\d)','(\b|\W|\d)queer(s|ed|er|ing|ded)?(\b|\W|\d)','(\b|\W|\d)nigga','(\b|\W|\d)niglet','nut.?sack',
                                        '(\b|\W|\d)(mc|mac)?fagg(e|o)+t','(\b|\W|\d)minge(\b|\W|\d)', 'mo(th|ht|t)+(a|ar|e|er).?fu(ck|c|k)+(a|e)?r?s?', '(\b|\W|\d)muff(\b|\W|\d)',
                                        'muff/?driv','(\b|\W|\d)munging','lezzie','(\b|\W|\d)k(i|y)+ke(\b|\W|\d)',
                                        '(\b|\W|\d)koot?ch','jack.?ass?(\b|\W|\d)','jerk.?off?','jigaboo','(\b|\W|\d)jizz?(\b|\W|\d)','lechita','jungle.?bunn?(y|i|ie)+s?', 'blo(w|u|ws|us)+.?jobs?',
                                        '(homo.?)?dum?b?.?shit(\b|\W|\d)','(\b|\W|\d)shet(\b|\W|\d)','(\b|\W|\d)honkey(\b|\W|\d)','(\b|\W|\d)horny','god.?dam', '(\b|\W|\d)gook(\b|\W|\d)',
                                        '(\b|\W|\d)guid(o|a|os|as)+(\b|\W|\d)','(\b|\W|\d)fat.?ass?(\b|\W|\d)','fuck.?brain','fucked','fuck.?hole','(\b|\W|\d)dildo','(\b|\W|\d)douche',
                                        '(\b|\W|\d)(c|k)+rou?ch','(\b|\W|\d)bampot(\b|\W|\d)','marijuana','marihuana','(\b|\W|\d)b(i|ea|ia)+tch', '(\b|\W|\d)bull?.?shit', '(\b|\W|\d)bs(\b|\W|\d)',
                                        '(\b|\W|\d)pendej','tarantad','(\b|\W|\d)diab(ol|la|lo)+','(\b|\W|\d)satan(\b|\W|\d)','lucifer','(\b|\W|\d)demoni',
                                        'ann?al.?sex', 'sexo?.?ann?(o|al)+', 'oral.?sex', 'sexo?.?oral', 'crack.?coc', 'cocainn?(a|e)+', 'smok(e|ed|ing)+s?.?pot', 'fuma(r|s|ndo|ba|mo|ste|e)?s?.?mari');

     for($i=0; $i<sizeof($badwords); $i++){
      $str = eregi_replace($badwords[$i], '[!]', $str);
     }

     return $str;
    }

Brett

Elgg Core Developer

Stats

  • Category: User admin
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 3768
  • Recommendations: 2

Other Projects

View Brett's plugins