Changeset 691271
- Timestamp:
- 04/03/2013 05:09:44 PM (13 years ago)
- Location:
- ultimate-wp-filter/trunk
- Files:
-
- 5 edited
-
filter.php (modified) (3 diffs)
-
form.php (modified) (4 diffs)
-
functions.php (modified) (1 diff)
-
panel.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ultimate-wp-filter/trunk/filter.php
r678590 r691271 1 1 <?php 2 2 3 4 3 function uwpf_clean() { 5 4 … … 9 8 10 9 if (isset($tmp['rdo_group_filtering'])) { 11 if($tmp['rdo_group_filtering']=='off'){ return; }} 12 10 if($tmp['rdo_group_filtering']=='off'){ return; }} 11 13 12 if (isset($tmp['chk_comment_author'])) { 14 13 if($tmp['chk_comment_author']=='1'){ add_filter('get_comment_author', 'CleanWords'); }} 15 14 16 15 if (isset($tmp['chk_comment_text'])) { 17 16 if($tmp['chk_comment_text']=='1'){ add_filter('comment_text', 'CleanWords'); }} 18 17 19 18 if (isset($tmp['chk_post_content'])) { 20 if($tmp['chk_post_content']=='1'){ add_filter('the_content', 'CleanWords'); }} 21 19 if($tmp['chk_post_content']=='1'){ add_filter('the_content', 'CleanWords'); }} 20 21 /* 22 ================= under development ================= 22 23 if (isset($tmp['chk_post_tags'])) { 23 24 if($tmp['chk_post_tags']=='1'){ add_filter('term_links-post_tag', 'CleanWords'); }} 24 25 */ 26 25 27 if (isset($tmp['chk_post_title'])) { 26 28 if($tmp['chk_post_title']=='1'){ add_filter('the_title', 'CleanWords'); }} … … 38 40 } 39 41 } 42 43 function wg_encode($text){ 44 $text = str_ireplace("&", "a1n14d4", $text ); 45 $text = str_ireplace("'", "a1p16s19t20", $text ); 46 $text = str_ireplace("#", "s19h8a1r18p16", $text ); 47 $text = str_ireplace("<", "l12e5s19s19", $text ); 48 $text = str_ireplace(">", "m12o15r18e5", $text ); 49 return $text; 50 } 51 52 function wg_decode($text){ 53 $text = str_ireplace("a1n14d4", "&", $text ); 54 $text = str_ireplace("a1p16s19t20", "'", $text ); 55 $text = str_ireplace("s19h8a1r18p16", "#", $text ); 56 $text = str_ireplace("l12e5s19s19", "<", $text ); 57 $text = str_ireplace("m12o15r18e5", ">", $text ); 58 return $text; 59 } 40 60 41 61 function CleanWords($teks) { 42 /* ========================== Begin of language ======================================= */43 $deutsch_word = "analritter,arsch,arschficker,arschlecker,arschloch,bratze,bumsen,dödel,fick,ficken,flittchen,fratze,geil,hackfresse,hupen,hure,hurensohn,ische,kackbratze,kacke,kacken,kampflesbe,kimme,knackwurst,lümmel,möpse,möse,milchtüten,milf,morgenlatte,mucke,mufti,muschi,nackt,nippel,onanieren,picheln,pimmel,pimpern,pinkeln,pissen,pisser,popel,poppen,reudig,rosette,schabracke,scheiße,schnackeln,tittchen,titten,vögeln,vögeln,vollpfosten,wichsen,wichser,";44 $english_word = "2g1c,acrotomophilia,anal,anilingus,arsehole,asshole,asshole,asshole,assmunch,auto erotic,autoerotic,babeland,baby batter,ball gag,ball gravy,ball kicking,ball licking,ball sack,ball sucking,bangbros,bareback,barely legal,barenaked,bastard,bastardo,bastards,bastinado,bbw,bdsm,beaver cleaver,beaver lips,bestiality,bi curious,big black,big breasts,big knockers,big tits,bimbos,birdlock,bitch,bitch,bitch,bitches,bitching,bitchy,black cock,blonde action,blow j,blow your l,blue waffle,blumpkin,bollocks,bondage,boner,boob,boob,boobie,boobies,boobs,boobs,booby,boobys,booty call,brown showers,brunette action,bukkake,bulldyke,bullet vibe,bullshit,bullshitter,bullshitters,bullshitting,bung hole,bunghole,busty,butt,buttcheeks,butthole,camel toe,camgirl,camslut,camwhore,carpet muncher,carpetmuncher,chickenshit,chickenshits,chocolate rosebuds,circlejerk,cleveland steamer,clit,clit,clitoris,clover clamps,clusterfuck,cock,cock,cockhead,cocks,cocks,cocksuck,cocksucker,cocksucking,coprolagnia,coprophilia,cornhole,cum,cum,cumming,cumming,cums,cunnilingus,cunt,cunt,cuntree,cuntry,cunts,darkie,date rape,daterape,deep throat,deepthroat,dick,dildo,dipshit,dipshits,dirty pillows,dirty sanchez,dog style,doggie style,doggiestyle,doggy style,doggystyle,dolcett,domination,dominatrix,dommes,donkey punch,double dong,double penetration,dp action,dumbfuck,dumbfucks,dumbshit,dumbshits,eat my ass,ecchi,ejaculation,escort,ethical slut,eunuch,fag,faggot,faggot,faggots,faggy,fags,fecal,felch,fellatio,feltch,female squirting,femdom,figging,fingering,fisting,foot fetish,footjob,frotting,fuck,fuck buttons,fucka,fucke,fucked,fucken,fucker,fuckers,fuckface,fuckhead,fuckheads,fuckhed,fuckin,fucking,fucks,fuckup,fuckups,fudge packer,fudgepacker,fukk,fukka,futanari,g-spot,gang bang,gay sex,genitals,giant cock,girl on,girl on top,girls gone wild,goatcx,goatse,gokkun,golden shower,golem,goniff,goo girl,goodpoop,goregasm,grope,group sex,guro,hand job,handjob,hard core,hardcore,heb,hebe,hebes,hentai,homoerotic,honkey,hooker,hot chick,how to kill,how to murder,huge fat,humping,incest,intercourse,jack off,jail bait,jailbait,jerk off,jigaboo,jiggaboo,jiggerboo,jizz,juggs,kike,kikes,kinbaku,kinkster,kinky,knobbing,kunt,kuntree,kuntry,kunts,leather restraint,leather straight jacket,lemon party,lovemaking,make me come,male squirting,masturbate,menage a trois,milf,missionary position,motherfuck,motherfucken,motherfucker,motherfuckers,motherfuckin,motherfucking,mound of venus,mr hands,muff diver,muffdiving,nambla,nawashi,nazi,neonazi,nig nog,nigga,niggah,niggahs,niggard,niggardly,niggas,niggaz,nigger,niggers,nimphomania,nipple,nipples,nsfw images,nympho,nymphomania,octopussy,omorashi,one cup two girls,one guy one jar,orgasm,orgy,paedophile,panties,panty,pedobear,pedophile,pegging,phone sex,piece of shit,piss,piss pig,pissing,pisspig,playboy,pleasure chest,pole smoker,ponyplay,poof,poop chute,poopchute,prince albert piercing,pthc,pubes,pussy,queaf,raghead,raging boner,rape,rapist,rectum,reverse cowgirl,rimjob,rimming,rusty trombone,s&m,scat,schlimazel,schlimiel,schlong,scissoring,sexo,shaved beaver,shaved pussy,shemale,shibari,shit,shitface,shitfaced,shithead,shitheads,shithed,shits,shitting,shitty,shota,shrimping,slanteye,slut,slut,sluts,slutty,smut,snatch,snowballing,sodomize,sodomy,spic,spooge,spread legs,strap on,strapon,strappado,strip club,style doggy,suck,sucks,suicide girls,sultry women,swastika,swinger,tainted love,taste my,tea bagging,threesome,throating,tied up,tight white,tit,tits,titties,titty,tongue in a,topless,tosser,towelhead,tranny,tribadism,tub girl,tubgirl,tushy,twat,twink,twinkie,two girls one cup,undressing,upskirt,urethra play,urophilia,vaginal,venus mound,violet blue,violet wand,vorarephilia,voyeur,vulva,wank,wetback,what the fuck,whatthefuck,white power,whore,whores,whoring,women rapping,wrapping men,wrinkled starfish,wtf,yaoi,yellow showers,yiffy,zoophilia,";45 $indonesian_word = "asu,bajingan,banci,bangsat,bego,bejad,bejat,bencong,bolot,brengsek,budek,geblek,gembel,goblok,idiot,jablay,jancuk,kampungan,kamseupay,keparat,kontol,kunyuk,lonte,maho,ndasmu,ngehe,pecun,perek,sarap,sinting,sompret,tai,tolol,udik,";46 $french_word = "allumé,allumée,baiser,bander,bigornette,bitte,bloblos,bordel,bosser,bourré,bourrée,branlage,branler,branlette,branleur,branleuse,brouter le cresson,cailler,chatte,chiasse,chier,chiottes,cirer,clito,con,conne,connard,connasse,couilles,cramouille,cul,déconne,déconner,doudounes,drague,emmerdant,emmerdeur,emmerdeuse,emmerder,enculé,enculée,enfoiré,enfoirée,étron,fils de pute,fille de pute,flic,folle,foutre,gerber,gouine,grande folle,grogniasse,gueule,jouir,la putain de ta mère,MALPT,maquereau,melon,ménage a trois,merde,merdeuse,merdeux,merlan,meuf,morue,moule,nègre,nique ta mère,noune,palucher,pédale,pédé,pisser,poilu,pouffiasse,pousse-crotte,putain,pute,ramoner,salaud,salope,serin,service trois pièces,suce,tapette,teuf,tirer,tringle,tringler,trique,trou du cul,turlute,veuve,viande a pneus,";47 62 48 63 $tmp = get_option('uwpf_options'); 49 64 $custom = $tmp['custom_keywords']; 50 /* ========================== End of language ======================================= */51 65 52 $words = ""; 66 $teks = wg_encode($teks); 67 $url = "http://filter.faleddo.x10.bz/service-full.php?text=".$teks."&custom=".$custom; 53 68 54 if (isset($tmp['chk_lang_deutsch'])) { 55 if($tmp['chk_lang_deutsch']=='1'){ $words = "$words, $deutsch_word, ','"; }} 56 57 if (isset($tmp['chk_lang_english'])) { 58 if($tmp['chk_lang_english']=='1'){ $words = "$words, $english_word, ','"; }} 59 60 if (isset($tmp['chk_lang_french'])) { 61 if($tmp['chk_lang_french']=='1'){ $words = "$words, $french_word, ','"; }} 62 63 if (isset($tmp['chk_lang_indonesian'])) { 64 if($tmp['chk_lang_indonesian']=='1'){ $words = "$words, $indonesian_word, ','"; }} 65 66 if (isset($tmp['chk_lang_custom'])) { 67 if($tmp['chk_lang_custom']=='1'){ $words = "$words, $custom"; }} 68 69 $words = explode(",", $words); 70 71 foreach($words as $keywords) 72 { 73 $keywords = trim($keywords); 74 if(strlen($keywords) > 2) 75 { 76 $search = substr($keywords, 0, 1).str_repeat('*', strlen(substr($keywords, 1))); 77 $teks = ireplace($keywords, $search, $teks); 78 } 79 } 80 81 return $teks; 82 } 83 84 function ireplace($needle,$replacement,$haystack){ 85 $needle = str_replace('/','\\/', preg_quote($needle)); 86 $pattern = "/\b$needle\b/i"; 87 $haystack = preg_replace($pattern, $replacement, $haystack); 88 return $haystack; 69 $ParseXML = simplexml_load_file($url); 70 return wg_decode($ParseXML->response); 89 71 } 90 72 -
ultimate-wp-filter/trunk/form.php
r678590 r691271 1 1 <?php 2 2 3 3 function uwpf_add_page() { 4 4 add_options_page('Ultimate WP Filter Configs', 'Ultimate WP Filter', 'manage_options', 'panel.php', 'BuildPage'); 5 5 } 6 6 7 7 function uwpf_SetDefaults() { 8 8 $tmp = get_option('uwpf_options'); … … 10 10 delete_option('uwpf_options'); 11 11 $arr = array( "rdo_group_filtering" => "on", 12 "custom_keywords" => " asds",12 "custom_keywords" => "", 13 13 "chk_bbpress" => 1, 14 14 "chk_comment_author" => 1, 15 15 "chk_comment_text" => 1, 16 /*"chk_post_tags" => 1,*/ 17 "chk_post_title" => 1, 16 18 "chk_post_content" => 1, 17 "chk_post_tags" => 1, 18 "chk_post_title" => 1, 19 "chk_tag_cloud" => 1, 20 "chk_lang_deutsch" => 1, 21 "chk_lang_english" => 1, 22 "chk_lang_french" => 1, 23 "chk_lang_indonesian" => 1, 24 "chk_lang_custom" => 1 19 "chk_tag_cloud" => 1 25 20 ); 26 21 update_option('uwpf_options', $arr); 27 22 } 28 23 } 29 24 30 25 function BuildPage() { 31 ?> 32 26 ?> 27 33 28 <div class="wrap"> 34 29 35 30 <div style="padding:5px 10px;color:#fff;font-weight:bold; border: 0px; background: #676767; padding:8px 20px;font-size:18pt;"> 36 31 <center> 37 32 Ultimate WP Filter 38 </center> 39 </div> 40 33 </center> 34 </div> 35 41 36 <form method="post" action="options.php"> 42 37 <?php settings_fields('uwpf_plugin_options'); ?> … … 56 51 </td> 57 52 </tr> 58 53 59 54 <tr> 60 55 <th scope="row">Custom Keywords<br/> … … 70 65 <td> 71 66 <label><input name="uwpf_options[chk_bbpress]" type="checkbox" value="1" <?php if (isset($options['chk_bbpress'])) { checked('1', $options['chk_bbpress']); } ?> /> bbPress </label><br /> 72 67 73 68 <label><input name="uwpf_options[chk_comment_author]" type="checkbox" value="1" <?php if (isset($options['chk_comment_author'])) { checked('1', $options['chk_comment_author']); } ?> /> Comment Author </label><br /> 74 <label><input name="uwpf_options[chk_comment_text]" type="checkbox" value="1" <?php if (isset($options['chk_comment_text'])) { checked('1', $options['chk_comment_text']); } ?> /> Comments</label><br /> 75 69 <label><input name="uwpf_options[chk_comment_text]" type="checkbox" value="1" <?php if (isset($options['chk_comment_text'])) { checked('1', $options['chk_comment_text']); } ?> /> Comment Text </label><br /> 70 71 <?php /*<label><input name="uwpf_options[chk_post_tags]" type="checkbox" value="1" <?php if (isset($options['chk_post_tags'])) { checked('1', $options['chk_post_tags']); } ?> /> Post Tags </label><br />*/ ?> 72 <label><input name="uwpf_options[chk_post_title]" type="checkbox" value="1" <?php if (isset($options['chk_post_title'])) { checked('1', $options['chk_post_title']); } ?> /> Post Title</label><br /> 76 73 <label><input name="uwpf_options[chk_post_content]" type="checkbox" value="1" <?php if (isset($options['chk_post_content'])) { checked('1', $options['chk_post_content']); } ?> /> Post Content</label><br /> 77 <label><input name="uwpf_options[chk_post_tags]" type="checkbox" value="1" <?php if (isset($options['chk_post_tags'])) { checked('1', $options['chk_post_tags']); } ?> /> Post Tags </label><br />78 <label><input name="uwpf_options[chk_post_title]" type="checkbox" value="1" <?php if (isset($options['chk_post_title'])) { checked('1', $options['chk_post_title']); } ?> /> Post Title</label><br />79 74 80 75 <label><input name="uwpf_options[chk_tag_cloud]" type="checkbox" value="1" <?php if (isset($options['chk_tag_cloud'])) { checked('1', $options['chk_tag_cloud']); } ?> /> Tag Clouds </label><br /> 81 76 77 + <a onClick="CheckAll">Select all</a> 78 79 82 80 </td> 83 </tr> 84 85 <tr valign="top"> 86 <th scope="row">Filtering Language</th> 87 <td> 88 <label><input name="uwpf_options[chk_lang_deutsch]" type="checkbox" value="1" <?php if (isset($options['chk_lang_deutsch'])) { checked('1', $options['chk_lang_deutsch']); } ?> /> Deutsch </label><br /> 89 90 <label><input name="uwpf_options[chk_lang_english]" type="checkbox" value="1" <?php if (isset($options['chk_lang_english'])) { checked('1', $options['chk_lang_english']); } ?> /> English </label><br /> 91 92 <label><input name="uwpf_options[chk_lang_french]" type="checkbox" value="1" <?php if (isset($options['chk_lang_french'])) { checked('1', $options['chk_lang_french']); } ?> /> French </label><br /> 93 94 <label><input name="uwpf_options[chk_lang_indonesian]" type="checkbox" value="1" <?php if (isset($options['chk_lang_indonesian'])) { checked('1', $options['chk_lang_indonesian']); } ?> /> Indonesian </label><br /> 95 96 <label><input name="uwpf_options[chk_lang_custom]" type="checkbox" value="1" <?php if (isset($options['chk_lang_custom'])) { checked('1', $options['chk_lang_custom']); } ?> /> Include custom keywords </label><br /> 97 </td> 98 </tr> 81 </tr> 99 82 100 83 </table> -
ultimate-wp-filter/trunk/functions.php
r669235 r691271 9 9 } 10 10 11 function uwpf_load_js() 12 { 13 wp_enqueue_script('chk-js', plugin_dir_url(__FILE__).'js/chk.js'); 14 } 15 11 16 function requires_wordpress_version() { 12 17 global $wp_version; -
ultimate-wp-filter/trunk/panel.php
r678593 r691271 4 4 Plugin URI: http://faleddo.x10.bz/free-software 5 5 Description: A lighweight filtering plugin that will censor explicit words automatically by replacing them with asterik(*) characters in many language and user-defined keywords. 6 Version: 1. 1.26 Version: 1.2.0 7 7 Author: Laurensius Faleddo 8 8 Author URI: http://faleddo.x10.bz … … 18 18 add_action( 'plugins_loaded', 'uwpf_clean' ); 19 19 add_action( 'admin_init', 'requires_wordpress_version' ); 20 add_action('admin_init', 'uwpf_load_js'); 20 21 register_activation_hook(__FILE__, 'uwpf_SetDefaults'); 21 22 register_uninstall_hook(__FILE__, 'uwpf_delete_plugin'); -
ultimate-wp-filter/trunk/readme.txt
r682658 r691271 2 2 Contributors: Laurensius Faleddo 3 3 Donate link: http://faleddo.x10.bz/donate.html 4 Tags: filter, language, post, comment, bbpress, child, custom4 Tags: wwwguard, security, filter, language, post, comment, bbpress, child, custom 5 5 Requires at least: 2.9 6 6 Tested up to: 3.5.1 7 Stable tag: 1. 1.27 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 … … 12 12 == Description == 13 13 14 Ultimate WP Filter is an advanced Wordpress filtering plugin that will censor explicit words words in comments, posts content, posts title, tags, tag clouds and in bbPress automatically by replacing them with asterik(*) characters. Its has hundreds of defined keywords in many language such as Deutsch, English, Indonesian, and French. But you can define your own keywords too in admin settings page and configure which area to be filtered. Its totally free without any feature or time limitation. Please contribute to make this plugin cleans websites better by submitting more explicit words and bug reports, or feature request to faleddo@ymail.com.14 Ultimate WP Filter is an advanced Wordpress filtering plugin that will censor explicit words words in comments, posts content, posts title, tags, tag clouds and in bbPress automatically by replacing them with asterik(*) characters. Its has thousand of defined keywords in many language with WWWGuard API. Visit http://filter.faleddo.x10.bz for available language list. You can define your own keywords too in admin settings page and configure which area to be filtered. Please contribute to make this plugin cleans websites better by submitting more explicit words and bug reports, or feature request to faleddo@ymail.com. 15 15 16 16 = Features = 17 17 18 1. Censor explicit words in Deutsch, English, French, and Indonesianlanguage18 1. Censor explicit words in many language 19 19 2. Set custom words to be filtered 20 20 3. Set filtering target … … 55 55 * Added Deutsch language 56 56 57 = 1.1.3 = 58 * Added Dutch, Italian, Japanese, Portuguese, Russian, and Spanish languages 59 * Ability to select all language and filtering target in admin options. 60 61 = 1.2.0 = 62 * Now Ultimate WP Filter use WWWGuard API for better filtering 63 * Removed language selection in admin menu 64 57 65 == Upgrade Notice == 58 66 * None - The plugin does have version control and will perform any structural upgrades automatically.
Note: See TracChangeset
for help on using the changeset viewer.