Growmap Anti Spambot Plugin - Version 1.5.4

Version Description

  • 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)
  • updated : compatibility with 3.7
Download this release

Release Info

Developer commentluv
Plugin Icon wp plugin Growmap Anti Spambot Plugin
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

Files changed (2) hide show
  1. growmap-anti-spambot-plugin.php +31 -1
  2. readme.txt +11 -4
growmap-anti-spambot-plugin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Growmap Anti Spambot Plugin
4
  Plugin URI: http://www.growmap.com/growmap-anti-spambot-plugin/
5
  Description: 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
7
  Author: Andy Bailey
8
  Author URI: http://ComLuv.com
9
  */
@@ -38,10 +38,40 @@ add_action('init','gasp_init');
38
  * internal functions
39
  *********************************************/
40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  /** gasp_init
42
  */
43
  function gasp_init(){
44
  load_plugin_textdomain( 'ab_gasp', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );
 
 
 
 
 
45
  }
46
  /** gasp_admin_init
47
  * Sets up the admin pages and settings
3
  Plugin Name: Growmap Anti Spambot Plugin
4
  Plugin URI: http://www.growmap.com/growmap-anti-spambot-plugin/
5
  Description: 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.4
7
  Author: Andy Bailey
8
  Author URI: http://ComLuv.com
9
  */
38
  * internal functions
39
  *********************************************/
40
 
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
+ */
47
+ function 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
+ */
59
+ function gasp_get_comment_author($authorlink){
60
+ global $comment;
61
+ if($comment->comment_approved == '0'){
62
+ return get_comment_author();
63
+ }
64
+ return $authorlink;
65
+ }
66
  /** gasp_init
67
  */
68
  function gasp_init(){
69
  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
+ }
75
  }
76
  /** gasp_admin_init
77
  * Sets up the admin pages and settings
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: commentluv
3
  Donate link:http://comluv.com/about/donate
4
  Tags: comments, anti spam, spam, spambot, gasp
5
  Requires at least: 2.9.2
6
- Tested up to: 3.6
7
- Stable tag: 1.5.3
8
 
9
  Defeat automated spambots (even the new 'learning' bots with dynamically named hidden fields) by adding a client side generated checkbox.
10
 
@@ -21,6 +21,8 @@ To combat the new 'learning' bots, this plugin adds dynamically named fields to
21
 
22
  You 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
  You can get support and see this plugin in action at [Growmap](http://www.growmap.com/growmap-anti-spambot-plugin/ "Growmap Internet Strategist")
25
 
26
  This is provided for free by [Andy Bailey](http://comluv.com "Andy Bailey @ ComLuv - The CommentLuv Network")
@@ -88,6 +90,11 @@ also, you can try saving the settings again to reset all the variables
88
 
89
  == ChangeLog ==
90
 
 
 
 
 
 
91
  = 1.5.3 =
92
 
93
  * updated : $count is checked if it has a value before checking if it is greater than max_mod to hopefully elimate the problem of random users being told they have too many comments in moderation
@@ -171,9 +178,9 @@ also, you can try saving the settings again to reset all the variables
171
 
172
  == Upgrade Notice ==
173
 
174
- = 1.5.2 =
175
 
176
- * fix - set secret key check to no by default and added nocache url and error codes to error messages
177
 
178
  == Configuration ==
179
 
3
  Donate link:http://comluv.com/about/donate
4
  Tags: comments, anti spam, spam, spambot, gasp
5
  Requires at least: 2.9.2
6
+ Tested up to: 3.7
7
+ Stable tag: 1.5.4
8
 
9
  Defeat automated spambots (even the new 'learning' bots with dynamically named hidden fields) by adding a client side generated checkbox.
10
 
21
 
22
  You 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
25
+
26
  You can get support and see this plugin in action at [Growmap](http://www.growmap.com/growmap-anti-spambot-plugin/ "Growmap Internet Strategist")
27
 
28
  This is provided for free by [Andy Bailey](http://comluv.com "Andy Bailey @ ComLuv - The CommentLuv Network")
90
 
91
  == 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
97
+
98
  = 1.5.3 =
99
 
100
  * updated : $count is checked if it has a value before checking if it is greater than max_mod to hopefully elimate the problem of random users being told they have too many comments in moderation
178
 
179
  == Upgrade Notice ==
180
 
181
+ = 1.5.4 =
182
 
183
+ * added - prevent autospam bots from thinking they got through by removing all links from a moderated comment until it is approved
184
 
185
  == Configuration ==
186