I just whipped this up:
I’ve been struck by comment spam in the last few days with several spam comments awaiting moderation before I turned on akismet to block them.
This morning however, after 54 blocked comments, one got through akismet and I decided to try my hand at a WP plugin.
It turned out to be surprisingly easy, perhaps only 20 minutes work, including the learning of how wp plugins work for comments.
Credits to jroller for the inspiration. I guess we’ll find out if a spammer is interested in beating it – I’ve several ideas for improvements, but I’d rather keep them in reserve for when it gets beaten (which could be an hour from now, or a year
)
4 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
And this is a test comment to make sure I didn’t muck up the latest release
Is this plugin compatible to wp ver. 2.02? thx!! After installed nothing has changed!
Hi Steven,
FYI, the plugin works great with WP 2.1. Also, I added another global option to query even logged in users. (I’ve had trouble with people registering junk users and then spamming.) Here are the relevant details:
var $_query_logged_in_user_too = true; // If you want to force logged in
users to answer the math question as well
// If the user is logged in, dont prompt for code
if (!$_query_logged_in_user_too && isset($user_ID)) {
// If the user is not logged in check the security code
if ($_query_logged_in_user_too || !$user_ID && ($comment_type === ”))
{
Email me at david@coppit.org and I’ll email you the .php file if that’s easier.
Regards,
David
Oops.
$_query_logged_in_user_too
should have been
$this->_query_logged_in_user_too
everywhere.