Once again my blog is flooded with comment spam. I installed “Kitten’s Spam Words” and “ThreeStrikesSPAM” to counter the first attack. Those plugins are good enough for a month. Two days back, new wave of spam started. After examining several authimage plugins I chose Trencaspammers, because it is simple to install and get running.
Trencaspammers Setup ( From the readme of the plugin ):
- Download Trencaspammers from here
- Unzip trencaspammers1rc.zip
- copy trencaspammers.php to plugins directory (wp-content/plugins).
- Activate the plugin from admin login.
-
Edit wp-comments.php ( in wp root directory )
Right after the lines below<textarea name="comment" id="comment" cols="50" rows="8" tabindex="4"></textarea> </p>
<!-- trencaSpammers- Authimage start --> <?php $ts_random=rand() ?> <input type="hidden" name="ts_random" value="<?php print $ts_random; ?>" /> <p> <label for="ts_code"><?php _e("Anti-spam code: "); ?> <img src="/wp-content/plugins/trencaspammers.php?ts_random=<?php print $ts_random;?> " align="middle" /> </p> <p> <label><?php _e("Please enter the anti-spam code: "); ?></label> <input type="text" name="ts_code" id="ts_code" size="15" tabindex="5" /> <-- trencaSpammers- Authimage end -->
-
Edit wp-comments-post.php ( in wp root directory )
Right after the following lineif ( '' == $comment ) die( __('Error: please type a comment.') );Add the following lines:
// trencaSpammers- Authimage start $ts_code=trim($_POST['ts_code']); $ts_random=$_POST['ts_random']; if ( !ts_is_human($ts_random, $ts_code)) die( __('Error: please type the security code.')); // trencaSpammers- Authimage end



i followed the instructions to a T but failed to get the anti-spam code graphic.
I wrote this how-to long back, may be new versions of both WP and Trencaspammers are drastically different from the one I’m using. I’m not sure what could be the problem.