September 8th, 2007

Math Comment Spam Protection Plugin

Category: DownLoad, wordpress, 插件, Author: 阿七, Popularity: 14% [?]

引自:http://cavemonkey50.com/code/akismet-spam-count/

原文:

         This plugin for WordPress 1.5.2, 2.0.x and 2.1 asks the visitor making the comment to answer a simple math question. This is intended to prove that the visitor is a human being and not a spam robot.

Example of such question:
Example of spam protection question

This plugin does not require JavaScript or cookies. It uses a special encryption function; the result of the question is being passed via a hidden field. The result is being compared with the value entered by the visitor – after encrypring this value as well.

Downloads

Download Latest Version 2.1
zip, 4.3k

Installation

This plugin can be installed in 5 easy steps:

  • Download the plugin (see “Downloads” above).
  • Decompress the .zip archive and put the files into your plugins directory (/wp-content/plugins/) or into a sub directory of the plugins directory.
  • Enable the plugin in the WordPress Plugins admin page.
  • Go to Options / Math Comment Spam, adjust the options and save.
    Important: You need to save the options when you use this plugin the first time or if you have updated from a previous version.
  • Add code to the comments.php of your theme. In the following an example for the WordPress standard theme (Kubrick):
    <?php  /****** Math Comment Spam Protection Plugin ******/ 
    ( 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... ?>

    Add this code for example right after the field for the website URL.

More:http://cavemonkey50.com/code/akismet-spam-count/

什么?上面的文章不过瘾?我还特意准备了这些:

Tags:, .
评论数量(3) | Add Comments
本文网址:http://blog.designlinks.cn/wordpress/akismet-spam-count-2.html

3 Comments so far

» You can leave a response or Trackback .

  1. Gravatar Icon Mukesh Says:

    if statement is missing in the code.. the exact code should be like this:-

    Spam protection: Sum of

    <input type=”hidden” name=”mcspinfo”
    value=”" />

    Beach回复:
    Thank you for reminding me!

  2. Gravatar Icon 数据恢复 Says:

    感谢分享

    Beach回复:
    不客气,感谢原作者!

  3. Gravatar Icon Estyle Says:

    说真的,我很喜欢,相当喜欢这个!
    比所有垃圾评论过滤插件好太多(无论是AK还是SK)。
    呵呵,值得推广,值得推广!特别要称赞插件作者!
    偶尔我也会考虑,还有哪些方法可以让验证码变得更有趣,呵呵。

    Beach回复:
    这个很有意思,有时间考虑用这个!

leave a reply