Plugin Directory

Changeset 793953


Ignore:
Timestamp:
10/26/2013 07:45:37 AM (12 years ago)
Author:
commentluv
Message:

new feature to beat spambots from checking they got a link.

Location:
growmap-anti-spambot-plugin
Files:
18 added
2 edited

Legend:

Unmodified
Added
Removed
  • growmap-anti-spambot-plugin/trunk/growmap-anti-spambot-plugin.php

    r781684 r793953  
    44Plugin URI: http://www.growmap.com/growmap-anti-spambot-plugin/
    55Description: Very simple plugin that adds a client side generated checkbox to the comment form requesting that the user clicks it to prove they are not a spammer. Bots wont see it so their spam comment will be discarded.
    6 Version: 1.5.3
     6Version: 1.5.4
    77Author: Andy Bailey
    88Author URI: http://ComLuv.com
     
    3939*********************************************/
    4040
     41/**
     42* strip the links out of the comment text if moderated comment
     43* @param string $commenttext
     44* @return string
     45* since 1.5.4
     46*/
     47function gasp_strip_tags($commenttext){
     48    global $comment;
     49    if($comment->comment_approved == '0'){
     50        return strip_tags($commenttext);
     51    }
     52    return $commenttext;
     53}
     54/**
     55* strip the link off the name if comment is in moderation
     56* @param string $authorlink
     57* @return string
     58*/
     59function gasp_get_comment_author($authorlink){
     60    global $comment;
     61    if($comment->comment_approved == '0'){
     62        return get_comment_author();
     63    }
     64    return $authorlink;
     65}
    4166/** gasp_init
    4267*/
    4368function gasp_init(){
    4469    load_plugin_textdomain( 'ab_gasp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
     70    if(is_singular()){
     71        // filters for single posts to remove links from moderated comments
     72        add_filter('comment_text','gasp_strip_tags',99);
     73        add_filter('get_comment_author_link','gasp_get_comment_author',99);
     74    }
    4575}
    4676/** gasp_admin_init
  • growmap-anti-spambot-plugin/trunk/readme.txt

    r781684 r793953  
    44Tags: comments, anti spam, spam, spambot, gasp
    55Requires at least: 2.9.2
    6 Tested up to: 3.6
    7 Stable tag: 1.5.3
     6Tested up to: 3.7
     7Stable tag: 1.5.4
    88   
    99Defeat automated spambots (even the new 'learning' bots with dynamically named hidden fields) by adding a client side generated checkbox.
     
    2121
    2222You can set the maximum amount of comments a user can have in the moderation queue to protect you from comment floods (provided you haven't approved any of the spammers comments before)
     23
     24*new! - prevent spambots from thinking they got links on your site by removing all links from comments that are waiting for moderation
    2325
    2426You can get support and see this plugin in action at [Growmap](http://www.growmap.com/growmap-anti-spambot-plugin/ "Growmap Internet Strategist")
     
    8890
    8991== ChangeLog ==
     92
     93= 1.5.4 =
     94
     95* added : remove all links from a comment if it is in moderation. (prevents autospam bots like scrapebox from thinking they got through with a link)
     96* updated : compatibility with 3.7
    9097
    9198= 1.5.3 =
     
    172179== Upgrade Notice ==
    173180
    174 = 1.5.2 =
     181= 1.5.4 =
    175182
    176 * fix - set secret key check to no by default and added nocache url and error codes to error messages
     183* added - prevent autospam bots from thinking they got through by removing all links from a moderated comment until it is approved
    177184
    178185== Configuration ==
Note: See TracChangeset for help on using the changeset viewer.