The anti-spam checkbox seems to be working well, so I’ll give out the geeky instructions now. As mentioned earlier, this method was taken from This Chick. Since it does exactly what it appears to do, I’m not giving anything away by revealing the inner workings to the spammers. (The incest spammers already have it figured out.)
<p> <label for="comment"><?php _e("Your Comment"); ?></label> <br /> <textarea name="comment" id="comment" cols="70" rows="4" tabindex="4"></textarea> </p> <p> <input name="submit" type="submit" tabindex="5" value="<?php _e("Say It!"); ?>" /> </p>
Note the change in the tabindex of the submit button.
<form action="<?php echo get_settings('siteurl'); ?>:/wp-comments-post.php" method="post" id="commentform">:
<form action="<?php echo get_settings('siteurl'); ?>:/wp-compost.php" method="post" id="commentform" onsubmit="return checkCheckBox(this)">:
- Repeat steps 1 and 2 in the other WP files that generate comment forms: wp-comments-popup.php and wp-comments-reply.php. If you’re not using the popup or reply forms, you might want to disable them instead (by, say, removing them from your webserver).
- The last thing you need to do is edit wp-comments-post.php to check that the checkbox is checked. Find the lines that say:
if ( '' == $comment ) die( __('Error: please type a comment.') );
This is code that rejects empty comments. We’re going to add a line below it to reject comments for which the checkbox wasn’t checked. Replace the lines above with:
if ( '' == $comment ) die( __('Error: please type a comment.') ); if ($_POST['spamcheck'] != 'nospam') die( __('Error: Please use your browser's back button to complete the form.') );
And that’s it! You’re despammed.