WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

JSSpamBlock

JSSpamBlock detects spam bots by sending a piece of JavaScript to the browser. This provides an effective and unobtrusive way to detect spam.

Using with WP-Cache

WP-Cache is a WordPress plugin that caches pages on the server to improve site performance and lower the use of server resources. It will work with JSSpamBlock, but you must make a few changes first:

  1. Near the top of the plugin file, change the line that says define('JSSPAMBLOCK_FORMLISTENER', true); to define('JSSPAMBLOCK_FORMLISTENER', false);.
  2. Find the directory of your current theme and find the comments page (usually comments.php). Find where it says </form> and insert the following above that line: <!--mclude wp-content/plugins/jsspamblock.php--><!--/mclude--><!--mfunc jsspamblock_doform() --><?php jsspamblock_doform(); ?><!--/mfunc-->
  3. Log into the WordPress admin panel and go to the Options tab. From there, go to the WP-Cache tab. Scroll down to the bottom and click the button that says "Delete cache".
  4. Go back to your blog and try adding a comment. If everything worked out, you shouldn't notice a difference.

Logging comments

JSSpamBlock can be set up to log comments. In the plugin file, change the line define('JSSPAMBLOCK_LOGFILE', ''); to define('JSSPAMBLOCK_LOGFILE', 'yourlogfilename.txt');, where yourlogfilename.txt is the name of your log file. The path is relative to the base of your wordpress installation (where the index.php file is), so it is best to put the log in another directory. The log file must be editable by PHP, or else logging will not work and you may get an error.

Saving spam

By default, spam posts are removed from the database. Alternatively, JSSpamBlock provides an option to keep the spam in the database and simply mark it as spam so that WordPress will ignore it. Comments marked as spam will not show up in the admin panel, so this option is only useful if you have direct access to the database or you have a plugin that looks at comments marked as spam.

To enable this, change the line define('JSSPAMBLOCK_DELETECOMMENTS', true); to define('JSSPAMBLOCK_DELETECOMMENTS', false); in the plugin file.

License

Copyright (c) 2007 Paul Butler

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:

  1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.
  2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.

Requires: 2.0.2 or higher
Compatible up to: 2.1
Last Updated: 2008-12-5
Downloads: 6,768

Ratings

3 stars
3.7 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1