Plugin Directory

Changeset 691271


Ignore:
Timestamp:
04/03/2013 05:09:44 PM (13 years ago)
Author:
faleddo
Message:

UWPF 1.20 update

Location:
ultimate-wp-filter/trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ultimate-wp-filter/trunk/filter.php

    r678590 r691271  
    11<?php
    22
    3        
    43    function uwpf_clean() {
    54
     
    98
    109        if (isset($tmp['rdo_group_filtering'])) {
    11             if($tmp['rdo_group_filtering']=='off'){ return; }}     
    12            
     10            if($tmp['rdo_group_filtering']=='off'){ return; }}
     11
    1312        if (isset($tmp['chk_comment_author'])) {
    1413            if($tmp['chk_comment_author']=='1'){ add_filter('get_comment_author', 'CleanWords'); }}     
    15            
     14
    1615        if (isset($tmp['chk_comment_text'])) {
    1716            if($tmp['chk_comment_text']=='1'){ add_filter('comment_text', 'CleanWords'); }}
    18            
     17
    1918        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 =================
    2223        if (isset($tmp['chk_post_tags'])) {
    2324            if($tmp['chk_post_tags']=='1'){ add_filter('term_links-post_tag', 'CleanWords'); }}     
    24            
     25        */
     26       
    2527        if (isset($tmp['chk_post_title'])) {
    2628            if($tmp['chk_post_title']=='1'){ add_filter('the_title', 'CleanWords'); }}
     
    3840        }
    3941    }
     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    }
    4060   
    4161    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,";
    4762
    4863        $tmp = get_option('uwpf_options');
    4964        $custom = $tmp['custom_keywords'];
    50         /* ========================== End of language ======================================= */
    5165       
    52         $words = "";
     66        $teks = wg_encode($teks);
     67        $url = "http://filter.faleddo.x10.bz/service-full.php?text=".$teks."&custom=".$custom;
    5368
    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);
    8971    }
    9072
  • ultimate-wp-filter/trunk/form.php

    r678590 r691271  
    11<?php
    2    
     2
    33    function uwpf_add_page() {
    44        add_options_page('Ultimate WP Filter Configs', 'Ultimate WP Filter', 'manage_options', 'panel.php', 'BuildPage');
    55    }
    6    
     6
    77    function uwpf_SetDefaults() {
    88        $tmp = get_option('uwpf_options');
     
    1010            delete_option('uwpf_options');
    1111            $arr = array(   "rdo_group_filtering" => "on",
    12                             "custom_keywords" => "asds",
     12                            "custom_keywords" => "",
    1313                            "chk_bbpress" => 1,
    1414                            "chk_comment_author" => 1,
    1515                            "chk_comment_text" => 1,
     16                            /*"chk_post_tags" => 1,*/
     17                            "chk_post_title" => 1,
    1618                            "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
    2520            );
    2621            update_option('uwpf_options', $arr);
    2722        }
    2823    }
    29    
     24
    3025    function BuildPage() {
    31     ?>     
    32        
     26    ?>
     27
    3328        <div class="wrap">
    34        
     29
    3530        <div style="padding:5px 10px;color:#fff;font-weight:bold; border: 0px; background: #676767; padding:8px 20px;font-size:18pt;">
    3631            <center>
    3732                Ultimate WP Filter
    38             </center>           
    39         </div>     
    40        
     33            </center>
     34        </div>
     35
    4136            <form method="post" action="options.php">
    4237                <?php settings_fields('uwpf_plugin_options'); ?>
     
    5651                        </td>
    5752                    </tr>
    58                    
     53
    5954                    <tr>
    6055                        <th scope="row">Custom Keywords<br/>
     
    7065                        <td>
    7166                            <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
    7368                            <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 />
    7673                            <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 />
    7974
    8075                            <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
    8280                        </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>                   
    9982                   
    10083                </table>
  • ultimate-wp-filter/trunk/functions.php

    r669235 r691271  
    99    }
    1010   
     11    function uwpf_load_js()
     12    {
     13        wp_enqueue_script('chk-js', plugin_dir_url(__FILE__).'js/chk.js');
     14    }
     15
    1116    function requires_wordpress_version() {
    1217        global $wp_version;
  • ultimate-wp-filter/trunk/panel.php

    r678593 r691271  
    44Plugin URI: http://faleddo.x10.bz/free-software
    55Description: 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.2
     6Version: 1.2.0
    77Author: Laurensius Faleddo
    88Author URI: http://faleddo.x10.bz
     
    1818    add_action( 'plugins_loaded', 'uwpf_clean' );
    1919    add_action( 'admin_init', 'requires_wordpress_version' );
     20    add_action('admin_init', 'uwpf_load_js');
    2021    register_activation_hook(__FILE__, 'uwpf_SetDefaults');
    2122    register_uninstall_hook(__FILE__, 'uwpf_delete_plugin');
  • ultimate-wp-filter/trunk/readme.txt

    r682658 r691271  
    22Contributors: Laurensius Faleddo
    33Donate link: http://faleddo.x10.bz/donate.html
    4 Tags: filter, language, post, comment, bbpress, child, custom
     4Tags: wwwguard, security, filter, language, post, comment, bbpress, child, custom
    55Requires at least: 2.9
    66Tested up to: 3.5.1
    7 Stable tag: 1.1.2
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99
     
    1212== Description ==
    1313
    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.
     14Ultimate 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.
    1515
    1616= Features =
    1717
    18 1. Censor explicit words in Deutsch, English, French, and Indonesian language
     181. Censor explicit words in many language
    19192. Set custom words to be filtered
    20203. Set filtering target
     
    5555* Added Deutsch language
    5656
     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
    5765== Upgrade Notice ==
    5866* None - The plugin does have version control and will perform any structural upgrades automatically.
Note: See TracChangeset for help on using the changeset viewer.