How to Wordpress K2 spam protection advanced

Here we are once again. I hate to moderate every comment because it lows down the discussion between the users, so I decided to add Math Comment Spam Protection Plugin.

The Wordpress K2 theme supports the quote-plugi, the edit comments-plugin and the nice email subcription-plugin, but no advanced K2 spam protection-plugin :-)

How to Wordpress K2 spam protection advanced

1. Download the Math Comment Spam Protection Plugin and install it…

2. Paste this code, for example, in comments.php

<?php /****** Math Comment Spam Protection Plugin ******/ if ( function_exists(’math_comment_spam_protection’) ) { $mcsp_info = math_comment_spam_protection(); ?> <p><input type=”text” name=”mcspvalue” id=”mcspvalue” value=”" size=”22″ tabindex=”4″ /> <label for=”mcspvalue”><small>Spam protection: Sum of <?php echo $mcsp_info['operand1'] . ‘ + ‘ . $mcsp_info['operand2'] . ‘ ?’ ?></small></label> <input type=”hidden” name=”mcspinfo” value=”<?php echo $mcsp_info['result']; ?>” /> </p> <?php } // if function_exists… ?>

in the line direct over this line:

<php if (function_exists(’show_subscription_checkbox’)) { show_subscription_checkbox(); } ?>

Comments

3 Responses to “How to Wordpress K2 spam protection advanced”

  1. Colm @ SEO Ireland on December 5th, 2007 13:47

    thanks man I was looking for this

  2. ako on January 11th, 2008 11:40

    yes but i think we need a fix for the error message when spam protection code is wrong. like when name and mail is required.

  3. Neill(new comment) on November 25th, 2009 23:27

    It works like a charm. Easy setup, perfect guidelines and it does the trick, i.e block spammers.

Leave a Reply