Version Description
- 2015-10-11 =
- dropped jQuery dependency (huge thanks to Guti for rewriting javascript code from scratch. Fora Bara! )
- fixed issue with empty blocked spam counter (showing zero instead of nothing)
Download this release
Release Info
Developer | webvitaly |
Plugin | Anti-spam |
Version | 4.0 |
Comparing to | |
See all releases |
Code changes from version 3.5 to 4.0
- anti-spam-info.php +4 -1
- anti-spam.php +13 -13
- js/anti-spam-3.5.js +0 -47
- js/anti-spam-4.0.js +73 -0
- readme.txt +204 -195
anti-spam-info.php
CHANGED
@@ -8,11 +8,14 @@ function antispam_admin_notice() {
|
|
8 |
if ($antispam_info_visibility == 1 OR $antispam_info_visibility == ''):
|
9 |
$antispam_stats = get_option('antispam_stats', array());
|
10 |
$blocked_total = $antispam_stats['blocked_total'];
|
|
|
|
|
|
|
11 |
?>
|
12 |
<div class="update-nag antispam-panel-info">
|
13 |
<p style="margin: 0;">
|
14 |
<?php echo $blocked_total; ?> spam comments were blocked by <a href="http://wordpress.org/plugins/anti-spam/">Anti-spam</a> plugin so far.
|
15 |
-
<a href="http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly" title="Anti-spam Pro">Upgrade to Pro</a
|
16 |
</p>
|
17 |
</div>
|
18 |
<?php
|
8 |
if ($antispam_info_visibility == 1 OR $antispam_info_visibility == ''):
|
9 |
$antispam_stats = get_option('antispam_stats', array());
|
10 |
$blocked_total = $antispam_stats['blocked_total'];
|
11 |
+
if(empty($blocked_total)){
|
12 |
+
$blocked_total = 0;
|
13 |
+
}
|
14 |
?>
|
15 |
<div class="update-nag antispam-panel-info">
|
16 |
<p style="margin: 0;">
|
17 |
<?php echo $blocked_total; ?> spam comments were blocked by <a href="http://wordpress.org/plugins/anti-spam/">Anti-spam</a> plugin so far.
|
18 |
+
<a href="http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly" title="Anti-spam Pro">Upgrade to Pro</a> for more advanced protection.
|
19 |
</p>
|
20 |
</div>
|
21 |
<?php
|
anti-spam.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Anti-spam
|
4 |
Plugin URI: http://wordpress.org/plugins/anti-spam/
|
5 |
Description: No spam in comments. No captcha.
|
6 |
-
Version:
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
License: GPLv3
|
@@ -15,12 +15,11 @@ $antispam_allow_trackbacks = false; // if true, than trackbacks will be allowed
|
|
15 |
// trackbacks almost not used by users, but mostly used by spammers; pingbacks are always enabled
|
16 |
// more about the difference between trackback and pingback - http://web-profile.com.ua/web/trackback-vs-pingback/
|
17 |
|
18 |
-
define('
|
19 |
|
20 |
$antispam_settings = array(
|
21 |
'send_spam_comment_to_admin' => $antispam_send_spam_comment_to_admin,
|
22 |
'allow_trackbacks' => $antispam_allow_trackbacks,
|
23 |
-
'version' => ANTISPAM_VERSION,
|
24 |
'admin_email' => get_option('admin_email')
|
25 |
);
|
26 |
|
@@ -30,7 +29,7 @@ include('anti-spam-info.php');
|
|
30 |
|
31 |
function antispam_enqueue_script() {
|
32 |
if (is_singular() && comments_open()) { // load script only for pages with comments form
|
33 |
-
wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam-
|
34 |
}
|
35 |
}
|
36 |
add_action('wp_enqueue_scripts', 'antispam_enqueue_script');
|
@@ -44,9 +43,8 @@ function antispam_form_part() {
|
|
44 |
echo ' <p class="antispam-group antispam-group-q" style="clear: both;">
|
45 |
<label>Current ye@r <span class="required">*</span></label>
|
46 |
<input type="hidden" name="antspm-a" class="antispam-control antispam-control-a" value="'.date('Y').'" />
|
47 |
-
<input type="text" name="antspm-q" class="antispam-control antispam-control-q" value="'
|
48 |
</p>'.$rn; // question (hidden with js)
|
49 |
-
|
50 |
echo ' <p class="antispam-group antispam-group-e" style="display: none;">
|
51 |
<label>Leave this field empty</label>
|
52 |
<input type="text" name="antspm-e-email-url-website" class="antispam-control antispam-control-e" value="" autocomplete="off" />
|
@@ -101,12 +99,14 @@ function antispam_check_comment($commentdata) {
|
|
101 |
if ( ! is_user_logged_in() && $comment_type != 'pingback' && $comment_type != 'trackback') { // logged in user is not a spammer
|
102 |
$spam_flag = false;
|
103 |
|
104 |
-
if (trim($_POST['antspm-q']) != date('Y')) { // year-answer is wrong - it is spam
|
105 |
-
$
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
|
|
|
|
110 |
}
|
111 |
}
|
112 |
|
@@ -155,7 +155,7 @@ if ( ! is_admin()) {
|
|
155 |
|
156 |
|
157 |
function antispam_plugin_meta($links, $file) { // add some links to plugin meta row
|
158 |
-
if (strpos($file, 'anti-spam.php') !== false) {
|
159 |
$links = array_merge($links, array('<a href="http://web-profile.com.ua/wordpress/plugins/anti-spam/" title="Plugin page">Anti-spam</a>'));
|
160 |
$links = array_merge($links, array('<a href="http://web-profile.com.ua/donate/" title="Support the development">Donate</a>'));
|
161 |
$links = array_merge($links, array('<a href="http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly" title="Upgrade to Pro">Anti-spam Pro</a>'));
|
3 |
Plugin Name: Anti-spam
|
4 |
Plugin URI: http://wordpress.org/plugins/anti-spam/
|
5 |
Description: No spam in comments. No captcha.
|
6 |
+
Version: 4.0
|
7 |
Author: webvitaly
|
8 |
Author URI: http://web-profile.com.ua/wordpress/plugins/
|
9 |
License: GPLv3
|
15 |
// trackbacks almost not used by users, but mostly used by spammers; pingbacks are always enabled
|
16 |
// more about the difference between trackback and pingback - http://web-profile.com.ua/web/trackback-vs-pingback/
|
17 |
|
18 |
+
define('ANTISPAM_PLUGIN_VERSION', '4.0');
|
19 |
|
20 |
$antispam_settings = array(
|
21 |
'send_spam_comment_to_admin' => $antispam_send_spam_comment_to_admin,
|
22 |
'allow_trackbacks' => $antispam_allow_trackbacks,
|
|
|
23 |
'admin_email' => get_option('admin_email')
|
24 |
);
|
25 |
|
29 |
|
30 |
function antispam_enqueue_script() {
|
31 |
if (is_singular() && comments_open()) { // load script only for pages with comments form
|
32 |
+
wp_enqueue_script('anti-spam-script', plugins_url('/js/anti-spam-4.0.js', __FILE__), null, null, true);
|
33 |
}
|
34 |
}
|
35 |
add_action('wp_enqueue_scripts', 'antispam_enqueue_script');
|
43 |
echo ' <p class="antispam-group antispam-group-q" style="clear: both;">
|
44 |
<label>Current ye@r <span class="required">*</span></label>
|
45 |
<input type="hidden" name="antspm-a" class="antispam-control antispam-control-a" value="'.date('Y').'" />
|
46 |
+
<input type="text" name="antspm-q" class="antispam-control antispam-control-q" value="'.ANTISPAM_PLUGIN_VERSION.'" autocomplete="off" />
|
47 |
</p>'.$rn; // question (hidden with js)
|
|
|
48 |
echo ' <p class="antispam-group antispam-group-e" style="display: none;">
|
49 |
<label>Leave this field empty</label>
|
50 |
<input type="text" name="antspm-e-email-url-website" class="antispam-control antispam-control-e" value="" autocomplete="off" />
|
99 |
if ( ! is_user_logged_in() && $comment_type != 'pingback' && $comment_type != 'trackback') { // logged in user is not a spammer
|
100 |
$spam_flag = false;
|
101 |
|
102 |
+
if ( trim($_POST['antspm-q']) != date('Y') ) { // year-answer is wrong - it is spam
|
103 |
+
if ( trim($_POST['antspm-d']) != date('Y') ) { // extra js-only check: there is no js added input - it is spam
|
104 |
+
$spam_flag = true;
|
105 |
+
if (empty($_POST['antspm-q'])) { // empty answer - it is spam
|
106 |
+
$antispam_error_message .= 'Error: empty answer. ['.$_POST['antspm-q'].']<br> '.$rn;
|
107 |
+
} else {
|
108 |
+
$antispam_error_message .= 'Error: answer is wrong. ['.$_POST['antspm-q'].']<br> '.$rn;
|
109 |
+
}
|
110 |
}
|
111 |
}
|
112 |
|
155 |
|
156 |
|
157 |
function antispam_plugin_meta($links, $file) { // add some links to plugin meta row
|
158 |
+
if (strpos($file, 'anti-spam/anti-spam.php') !== false) {
|
159 |
$links = array_merge($links, array('<a href="http://web-profile.com.ua/wordpress/plugins/anti-spam/" title="Plugin page">Anti-spam</a>'));
|
160 |
$links = array_merge($links, array('<a href="http://web-profile.com.ua/donate/" title="Support the development">Donate</a>'));
|
161 |
$links = array_merge($links, array('<a href="http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly" title="Upgrade to Pro">Anti-spam Pro</a>'));
|
js/anti-spam-3.5.js
DELETED
@@ -1,47 +0,0 @@
|
|
1 |
-
/*
|
2 |
-
Anti-spam plugin
|
3 |
-
No spam in comments. No captcha.
|
4 |
-
wordpress.org/plugins/anti-spam/
|
5 |
-
*/
|
6 |
-
|
7 |
-
(function($) {
|
8 |
-
|
9 |
-
function anti_spam_init() {
|
10 |
-
$('.antispam-group').hide(); // hide inputs from users
|
11 |
-
|
12 |
-
var answer = $('.antispam-group .antispam-control-a').val(); // get answer
|
13 |
-
$('.antispam-group-q .antispam-control-q').val(answer); // set answer into other input instead of user
|
14 |
-
$('.antispam-group-e .antispam-control-e').val(''); // clear value of the empty input because some themes are adding some value for all inputs
|
15 |
-
|
16 |
-
var current_date = new Date();
|
17 |
-
var current_year = current_date.getFullYear();
|
18 |
-
var dynamic_control = '<input type="hidden" name="antspm-q" class="antispam-control antispam-control-q" value="'+current_year+'" />';
|
19 |
-
|
20 |
-
$.each($('#comments form'), function(index, commentForm) { // add input for every comment form if there are more than 1 form
|
21 |
-
if ($(commentForm).find('.antispam-control-q').length == 0) {
|
22 |
-
$(commentForm).append(dynamic_control);
|
23 |
-
}
|
24 |
-
});
|
25 |
-
|
26 |
-
$.each($('#respond form'), function(index, commentForm) { // add input for every comment form if there are more than 1 form
|
27 |
-
if ($(commentForm).find('.antispam-control-q').length == 0) {
|
28 |
-
$(commentForm).append(dynamic_control);
|
29 |
-
}
|
30 |
-
});
|
31 |
-
|
32 |
-
$.each($('form#commentform'), function(index, commentForm) { // add input for every comment form if there are more than 1 form
|
33 |
-
if ($(commentForm).find('.antispam-control-q').length == 0) {
|
34 |
-
$(commentForm).append(dynamic_control);
|
35 |
-
}
|
36 |
-
});
|
37 |
-
}
|
38 |
-
|
39 |
-
$(document).ready(function() {
|
40 |
-
anti_spam_init();
|
41 |
-
});
|
42 |
-
|
43 |
-
$(document).ajaxSuccess(function() { // add support for comments forms loaded via ajax
|
44 |
-
anti_spam_init();
|
45 |
-
});
|
46 |
-
|
47 |
-
})(jQuery);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
js/anti-spam-4.0.js
ADDED
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
Anti-spam plugin
|
3 |
+
No spam in comments. No captcha.
|
4 |
+
wordpress.org/plugins/anti-spam/
|
5 |
+
*/
|
6 |
+
|
7 |
+
"use strict";
|
8 |
+
(function() {
|
9 |
+
function anti_spam_init() {
|
10 |
+
|
11 |
+
var i,
|
12 |
+
len,
|
13 |
+
elements,
|
14 |
+
answer = '',
|
15 |
+
current_year = new Date().getFullYear(),
|
16 |
+
dynamic_control;
|
17 |
+
|
18 |
+
elements = document.querySelectorAll('.antispam-group');
|
19 |
+
len = elements.length;
|
20 |
+
for (i = 0; i < len; i++) { // hide inputs from users
|
21 |
+
elements[i].style.display = 'none';
|
22 |
+
}
|
23 |
+
|
24 |
+
elements = document.querySelectorAll('.antispam-control-a');
|
25 |
+
if ((elements) && (elements.length > 0)) { // get the answer
|
26 |
+
answer = elements[0].value;
|
27 |
+
}
|
28 |
+
|
29 |
+
elements = document.querySelectorAll('.antispam-control-q');
|
30 |
+
len = elements.length;
|
31 |
+
for (i = 0; i < len; i++) { // set answer into other input instead of user
|
32 |
+
elements[i].value = answer;
|
33 |
+
}
|
34 |
+
|
35 |
+
// clear value of the empty input because some themes are adding some value for all inputs
|
36 |
+
elements = document.querySelectorAll('.antispam-control-e');
|
37 |
+
len = elements.length;
|
38 |
+
for (i = 0; i < len; i++) {
|
39 |
+
elements[i].value = '';
|
40 |
+
}
|
41 |
+
|
42 |
+
//dynamic_control = '<input type="text" name="antspm-d" class="antispam-control antispam-control-d" value="' + current_year + '" />';
|
43 |
+
dynamic_control = document.createElement('input');
|
44 |
+
dynamic_control.setAttribute('type', 'hidden');
|
45 |
+
dynamic_control.setAttribute('name', 'antspm-d');
|
46 |
+
dynamic_control.setAttribute('class', 'antispam-control antispam-control-d');
|
47 |
+
dynamic_control.setAttribute('value', current_year);
|
48 |
+
|
49 |
+
// add input for every comment form if there are more than 1 form with IDs: comments, respond or commentform
|
50 |
+
elements = document.querySelectorAll('form');
|
51 |
+
len = elements.length;
|
52 |
+
for (i = 0; i < len; i++) {
|
53 |
+
if ( (elements[i].id === 'comments') || (elements[i].id === 'respond') || (elements[i].id === 'commentform') ) {
|
54 |
+
var class_index = elements[i].className.indexOf('anti-spam-form-processed');
|
55 |
+
if ( class_index == -1 ) { // form is not yet js processed
|
56 |
+
//elements[i].innerHTML += dynamic_control; // not working
|
57 |
+
elements[i].appendChild(dynamic_control);
|
58 |
+
elements[i].className = elements[i].className + ' anti-spam-form-processed';
|
59 |
+
}
|
60 |
+
}
|
61 |
+
}
|
62 |
+
}
|
63 |
+
|
64 |
+
if (document.addEventListener) {
|
65 |
+
document.addEventListener('DOMContentLoaded', anti_spam_init, false);
|
66 |
+
}
|
67 |
+
|
68 |
+
// set 1 second timeout for having form loaded and adding support for browsers which does not support 'DOMContentLoaded' listener
|
69 |
+
setTimeout(function () {
|
70 |
+
anti_spam_init();
|
71 |
+
}, 1000);
|
72 |
+
|
73 |
+
})();
|
readme.txt
CHANGED
@@ -1,196 +1,205 @@
|
|
1 |
-
=== Anti-spam ===
|
2 |
-
Contributors: webvitaly
|
3 |
-
Donate link: http://web-profile.com.ua/donate/
|
4 |
-
Tags: spam, spammer, comment, comments, comment-spam, antispam, anti-spam, block-spam, spam-free, spambot, spam-bot, bot
|
5 |
-
Requires at least: 3.3
|
6 |
-
Tested up to: 4.
|
7 |
-
Stable tag:
|
8 |
-
License: GPLv3
|
9 |
-
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
-
|
11 |
-
No spam in comments. No captcha.
|
12 |
-
|
13 |
-
== Description ==
|
14 |
-
|
15 |
-
> **[Anti-spam Pro](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro")** |
|
16 |
-
> **[Anti-spam](http://web-profile.com.ua/wordpress/plugins/anti-spam/ "Plugin page")** |
|
17 |
-
> **[Donate](http://web-profile.com.ua/donate/ "Support the development")**
|
18 |
-
|
19 |
-
**Why humans should prove that they are humans by filling captchas? Lets bots prove that they are not bots with adding javascript to their user-agents!**
|
20 |
-
|
21 |
-
Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.
|
22 |
-
|
23 |
-
* **no captcha**, because spam is not users' problem
|
24 |
-
* **no moderation queues**, because spam is not administrators' problem
|
25 |
-
* **no settings page**, because it is great to forget about spam completely and keep admin section clean
|
26 |
-
|
27 |
-
Plugin is easy to use: just install it and it just works.
|
28 |
-
|
29 |
-
**Plugin blocks spam only in comments section**.
|
30 |
-
|
31 |
-
After installing the Anti-spam plugin **try to submit a comment on your site being logged out**.
|
32 |
-
If you get an error - you may check the solution in the [Support section](http://wordpress.org/support/plugin/anti-spam) or submit a new topic with detailed description of your problem.
|
33 |
-
|
34 |
-
= Useful: =
|
35 |
-
* [Anti-spam Pro - extended version with settings and manual spam protection](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro")
|
36 |
-
* [Security-protection - blocks brute-force attacks](http://wordpress.org/plugins/security-protection/ "stops brute-force attacks")
|
37 |
-
* [WordPress Pro plugins](http://codecanyon.net/popular_item/by_category?category=wordpress&ref=webvitaly)
|
38 |
-
|
39 |
-
== Installation ==
|
40 |
-
|
41 |
-
1. install and activate the plugin on the Plugins page
|
42 |
-
2. enjoy life without spam in comments
|
43 |
-
|
44 |
-
== Frequently Asked Questions ==
|
45 |
-
|
46 |
-
= What is the percentage of spam blocked? =
|
47 |
-
|
48 |
-
Anti-spam plugin blocks 100% of automatic spam messages (sent by spam-bots via post requests).
|
49 |
-
Plugin does not block manual spam (submitted by spammers manually via browser).
|
50 |
-
You can use [Anti-spam Pro](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro") plugin if you need to block manual spam.
|
51 |
-
|
52 |
-
= Incompatible with: =
|
53 |
-
|
54 |
-
* Disqus
|
55 |
-
* Jetpack Comments
|
56 |
-
* AJAX Comment Form
|
57 |
-
* bbPress
|
58 |
-
|
59 |
-
= How does Anti-spam plugin work? =
|
60 |
-
|
61 |
-
The blocking algorithm is based on 2 methods: 'invisible js-captcha' and 'invisible input trap'.
|
62 |
-
|
63 |
-
= How does 'invisible js-captcha' method work? =
|
64 |
-
|
65 |
-
The 'invisible js-captcha' method is based on fact that bots does not have javascript on their user-agents.
|
66 |
-
Extra hidden field is added to comments form.
|
67 |
-
It is the question about the current year.
|
68 |
-
If the user visits site, than this field is answered automatically with javascript, is hidden by javascript and css and invisible for the user.
|
69 |
-
If the spammer will fill year-field incorrectly - the comment will be blocked because it is spam.
|
70 |
-
|
71 |
-
= How does 'invisible input trap' method work? =
|
72 |
-
|
73 |
-
The 'invisible input trap' method is based on fact that almost all the bots will fill inputs with name 'email' or 'url'.
|
74 |
-
Extra hidden field is added to comments form.
|
75 |
-
This field is hidden for the user and user will not fill it.
|
76 |
-
But this field is visible for the spammer.
|
77 |
-
If the spammer will fill this trap-field with anything - the comment will be blocked because it is spam.
|
78 |
-
|
79 |
-
= How to test what spam comments are rejected? =
|
80 |
-
|
81 |
-
You may enable sending all rejected spam comments to admin email.
|
82 |
-
Edit [anti-spam.php](http://plugins.trac.wordpress.org/browser/anti-spam/trunk/anti-spam.php) file and find "$antispam_send_spam_comment_to_admin" and make it "true".
|
83 |
-
You can also find the info block with total spam blocked counter in the admin comments section.
|
84 |
-
You can hide or show this info block in the "Screen Options" section. The info block visibility option is saved per user.
|
85 |
-
|
86 |
-
= Does plugin block spam from Contact or other forms? =
|
87 |
-
|
88 |
-
Plugin blocks spam only in comments form section and does not block spam from any other forms on site.
|
89 |
-
If you installed and activated the plugin and you still receiving spam - probably this could be because of some other forms on your site (for example comments forms).
|
90 |
-
|
91 |
-
= What about trackback spam? =
|
92 |
-
|
93 |
-
Users rarely use trackbacks because it is manual and requires extra input. Spammers uses trackbacks because it is easy to cheat here.
|
94 |
-
Users use pingbacks very often because they work automatically. Spammers does not use pingbacks because backlinks are checked.
|
95 |
-
So trackbacks are blocked by default but pingbacks are enabled. You may enable trackbacks if you use it.
|
96 |
-
Edit [anti-spam.php](http://plugins.trac.wordpress.org/browser/anti-spam/trunk/anti-spam.php) file and find "$antispam_allow_trackbacks" and make it "true".
|
97 |
-
You may read more about the [difference between trackbacks and pingbacks](http://web-profile.com.ua/web/trackback-vs-pingback/).
|
98 |
-
|
99 |
-
=
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
=
|
122 |
-
*
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
*
|
127 |
-
*
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
*
|
132 |
-
|
133 |
-
= 3.
|
134 |
-
*
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
*
|
140 |
-
*
|
141 |
-
|
142 |
-
=
|
143 |
-
*
|
144 |
-
|
145 |
-
=
|
146 |
-
*
|
147 |
-
|
148 |
-
|
149 |
-
*
|
150 |
-
|
151 |
-
= 2.
|
152 |
-
*
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
*
|
181 |
-
|
182 |
-
= 1.
|
183 |
-
*
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
*
|
194 |
-
|
195 |
-
= 1.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
196 |
* initial release
|
1 |
+
=== Anti-spam ===
|
2 |
+
Contributors: webvitaly
|
3 |
+
Donate link: http://web-profile.com.ua/donate/
|
4 |
+
Tags: spam, spammer, comment, comments, comment-spam, antispam, anti-spam, block-spam, spam-free, spambot, spam-bot, bot
|
5 |
+
Requires at least: 3.3
|
6 |
+
Tested up to: 4.5
|
7 |
+
Stable tag: 4.0
|
8 |
+
License: GPLv3
|
9 |
+
License URI: http://www.gnu.org/licenses/gpl.html
|
10 |
+
|
11 |
+
No spam in comments. No captcha.
|
12 |
+
|
13 |
+
== Description ==
|
14 |
+
|
15 |
+
> **[Anti-spam Pro](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro")** |
|
16 |
+
> **[Anti-spam](http://web-profile.com.ua/wordpress/plugins/anti-spam/ "Plugin page")** |
|
17 |
+
> **[Donate](http://web-profile.com.ua/donate/ "Support the development")**
|
18 |
+
|
19 |
+
**Why humans should prove that they are humans by filling captchas? Lets bots prove that they are not bots with adding javascript to their user-agents!**
|
20 |
+
|
21 |
+
Anti-spam plugin blocks spam in comments automatically, invisibly for users and for admins.
|
22 |
+
|
23 |
+
* **no captcha**, because spam is not users' problem
|
24 |
+
* **no moderation queues**, because spam is not administrators' problem
|
25 |
+
* **no settings page**, because it is great to forget about spam completely and keep admin section clean
|
26 |
+
|
27 |
+
Plugin is easy to use: just install it and it just works.
|
28 |
+
|
29 |
+
**Plugin blocks spam only in comments section**.
|
30 |
+
|
31 |
+
After installing the Anti-spam plugin **try to submit a comment on your site being logged out**.
|
32 |
+
If you get an error - you may check the solution in the [Support section](http://wordpress.org/support/plugin/anti-spam) or submit a new topic with detailed description of your problem.
|
33 |
+
|
34 |
+
= Useful: =
|
35 |
+
* [Anti-spam Pro - extended version with settings and manual spam protection](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro")
|
36 |
+
* [Security-protection - blocks brute-force attacks](http://wordpress.org/plugins/security-protection/ "stops brute-force attacks")
|
37 |
+
* [WordPress Pro plugins](http://codecanyon.net/popular_item/by_category?category=wordpress&ref=webvitaly)
|
38 |
+
|
39 |
+
== Installation ==
|
40 |
+
|
41 |
+
1. install and activate the plugin on the Plugins page
|
42 |
+
2. enjoy life without spam in comments
|
43 |
+
|
44 |
+
== Frequently Asked Questions ==
|
45 |
+
|
46 |
+
= What is the percentage of spam blocked? =
|
47 |
+
|
48 |
+
Anti-spam plugin blocks 100% of automatic spam messages (sent by spam-bots via post requests).
|
49 |
+
Plugin does not block manual spam (submitted by spammers manually via browser).
|
50 |
+
You can use [Anti-spam Pro](http://codecanyon.net/item/antispam-pro/6491169?ref=webvitaly "Upgrade to Pro") plugin if you need to block manual spam.
|
51 |
+
|
52 |
+
= Incompatible with: =
|
53 |
+
|
54 |
+
* Disqus
|
55 |
+
* Jetpack Comments
|
56 |
+
* AJAX Comment Form
|
57 |
+
* bbPress
|
58 |
+
|
59 |
+
= How does Anti-spam plugin work? =
|
60 |
+
|
61 |
+
The blocking algorithm is based on 2 methods: 'invisible js-captcha' and 'invisible input trap' (aka honeypot technique).
|
62 |
+
|
63 |
+
= How does 'invisible js-captcha' method work? =
|
64 |
+
|
65 |
+
The 'invisible js-captcha' method is based on fact that bots does not have javascript on their user-agents.
|
66 |
+
Extra hidden field is added to comments form.
|
67 |
+
It is the question about the current year.
|
68 |
+
If the user visits site, than this field is answered automatically with javascript, is hidden by javascript and css and invisible for the user.
|
69 |
+
If the spammer will fill year-field incorrectly - the comment will be blocked because it is spam.
|
70 |
+
|
71 |
+
= How does 'invisible input trap' (aka honeypot technique) method work? =
|
72 |
+
|
73 |
+
The 'invisible input trap' method is based on fact that almost all the bots will fill inputs with name 'email' or 'url'.
|
74 |
+
Extra hidden field is added to comments form.
|
75 |
+
This field is hidden for the user and user will not fill it.
|
76 |
+
But this field is visible for the spammer.
|
77 |
+
If the spammer will fill this trap-field with anything - the comment will be blocked because it is spam.
|
78 |
+
|
79 |
+
= How to test what spam comments are rejected? =
|
80 |
+
|
81 |
+
You may enable sending all rejected spam comments to admin email.
|
82 |
+
Edit [anti-spam.php](http://plugins.trac.wordpress.org/browser/anti-spam/trunk/anti-spam.php) file and find "$antispam_send_spam_comment_to_admin" and make it "true".
|
83 |
+
You can also find the info block with total spam blocked counter in the admin comments section.
|
84 |
+
You can hide or show this info block in the "Screen Options" section. The info block visibility option is saved per user.
|
85 |
+
|
86 |
+
= Does plugin block spam from Contact or other forms? =
|
87 |
+
|
88 |
+
Plugin blocks spam only in comments form section and does not block spam from any other forms on site.
|
89 |
+
If you installed and activated the plugin and you still receiving spam - probably this could be because of some other forms on your site (for example comments forms).
|
90 |
+
|
91 |
+
= What about trackback spam? =
|
92 |
+
|
93 |
+
Users rarely use trackbacks because it is manual and requires extra input. Spammers uses trackbacks because it is easy to cheat here.
|
94 |
+
Users use pingbacks very often because they work automatically. Spammers does not use pingbacks because backlinks are checked.
|
95 |
+
So trackbacks are blocked by default but pingbacks are enabled. You may enable trackbacks if you use it.
|
96 |
+
Edit [anti-spam.php](http://plugins.trac.wordpress.org/browser/anti-spam/trunk/anti-spam.php) file and find "$antispam_allow_trackbacks" and make it "true".
|
97 |
+
You may read more about the [difference between trackbacks and pingbacks](http://web-profile.com.ua/web/trackback-vs-pingback/).
|
98 |
+
|
99 |
+
= What browsers are supported? =
|
100 |
+
|
101 |
+
All modern browsers and IE8+ are supported.
|
102 |
+
|
103 |
+
= Unobtrusive JavaScript =
|
104 |
+
|
105 |
+
Anti-spam plugin works with disabled JavaScript. JavaScript is disabled on less than 1% of devices.
|
106 |
+
Users with disabled JavaScript should manually fill catcha-like input before submitting the comment.
|
107 |
+
|
108 |
+
= And one more extra note... =
|
109 |
+
|
110 |
+
If site has caching plugin enabled and cache is not cleared or if theme does not use 'comment_form' action
|
111 |
+
and there is no plugin inputs in comments form - plugin tries to add hidden fields automatically using JavaScript.
|
112 |
+
|
113 |
+
= Not enough information about the plugin? =
|
114 |
+
|
115 |
+
You may check out the [source code of the plugin](http://plugins.trac.wordpress.org/browser/anti-spam/trunk/anti-spam.php).
|
116 |
+
The plugin is pretty small and easy to read.
|
117 |
+
|
118 |
+
|
119 |
+
== Changelog ==
|
120 |
+
|
121 |
+
= 4.0 - 2015-10-11 =
|
122 |
+
* dropped jQuery dependency (huge thanks to [Guti](http://www.javiergutierrezchamorro.com/ "Javier Gutiérrez Chamorro") for rewriting javascript code from scratch. Força Barça! )
|
123 |
+
* fixed issue with empty blocked spam counter (showing zero instead of nothing)
|
124 |
+
|
125 |
+
= 3.5 - 2015-01-17 =
|
126 |
+
* removed function_exists check because each function has unique prefix
|
127 |
+
* removed add_option()
|
128 |
+
* added autocomplete="off" for inputs (thanks to Feriman)
|
129 |
+
|
130 |
+
= 3.4 - 2014-12-20 =
|
131 |
+
* added the ability to hide or show info block in the "Screen Options" section
|
132 |
+
|
133 |
+
= 3.3 - 2014-12-15 =
|
134 |
+
* refactor code structure
|
135 |
+
* added blocked spam counter in the comments section
|
136 |
+
* clean up the docs
|
137 |
+
|
138 |
+
= 3.2 - 2014-12-05 =
|
139 |
+
* added ANTISPAM_VERSION constant (thanks to jumbo)
|
140 |
+
* removed new spam-block algorithm because it is not needed
|
141 |
+
|
142 |
+
= 3.1 - 2014-12-04 =
|
143 |
+
* remove log notices
|
144 |
+
|
145 |
+
= 3.0 - 2014-12-02 =
|
146 |
+
* added new spam-block algorithm
|
147 |
+
* bugfixing
|
148 |
+
* enqueue script only for pages with comments form and in the footer (thanks to dougvdotcom)
|
149 |
+
* refactor code structure
|
150 |
+
|
151 |
+
= 2.6 - 2014-11-30 =
|
152 |
+
* reverting to ver.2.2 state (enqueue script using 'init' hook and into the header) because users start receiving spam messages
|
153 |
+
|
154 |
+
= 2.5 - 2014-11-26 =
|
155 |
+
* update input names
|
156 |
+
|
157 |
+
= 2.4 - 2014-11-25 =
|
158 |
+
* update input names
|
159 |
+
|
160 |
+
= 2.3 - 2014-11-23 =
|
161 |
+
* enqueue script only for pages with comments form and in the footer (thanks to dougvdotcom)
|
162 |
+
* clean up code
|
163 |
+
|
164 |
+
= 2.2 - 2014-08-03 =
|
165 |
+
* clear value of the empty input because some themes are adding some value for all inputs
|
166 |
+
* updated FAQ section
|
167 |
+
|
168 |
+
= 2.1 - 2014-02-15 =
|
169 |
+
* add support for comments forms loaded via ajax
|
170 |
+
|
171 |
+
= 2.0 - 2014-01-04 =
|
172 |
+
* bug fixing
|
173 |
+
* updating info
|
174 |
+
|
175 |
+
= 1.9 - 2013-10-23 =
|
176 |
+
* change the html structure
|
177 |
+
|
178 |
+
= 1.8 - 2013-07-19 =
|
179 |
+
* removed labels from plugin markup because some themes try to get text from labels and insert it into inputs like placeholders (what cause an error)
|
180 |
+
* added info to FAQ section that Anti-spam plugin does not work with Jetpack Comments
|
181 |
+
|
182 |
+
= 1.7 - 2013-05-31 =
|
183 |
+
* if site has caching plugin enabled and cache is not cleared or if theme does not use 'comment_form' action - Anti-spam plugin does not worked; so now whole input added via javascript if it does not exist in html
|
184 |
+
|
185 |
+
= 1.6 - 2013-05-05 =
|
186 |
+
* add some more debug info in errors text
|
187 |
+
|
188 |
+
= 1.5 - 2013-04-15 =
|
189 |
+
* disable trackbacks because of spam (pingbacks are enabled)
|
190 |
+
|
191 |
+
= 1.4 - 2013-04-13 =
|
192 |
+
* code refactor
|
193 |
+
* renaming empty field to "*-email-url" to trap more spam
|
194 |
+
|
195 |
+
= 1.3 - 2013-04-10 =
|
196 |
+
* changing the input names and add some more traps because some spammers are passing the plugin
|
197 |
+
|
198 |
+
= 1.2 - 2012-10-28 =
|
199 |
+
* minor changes
|
200 |
+
|
201 |
+
= 1.1 - 2012-10-14 =
|
202 |
+
* sending answer from server to client into hidden field (because client year and server year could mismatch)
|
203 |
+
|
204 |
+
= 1.0 - 2012-09-06 =
|
205 |
* initial release
|