留言算术验证码插件Math Comment Spam Protection

This entry was posted by 星期四, 7 10月, 2010

抵制spammer大军!!!

插件使用:

1、下载插件:点击下载

2、解压到WP插件目录(/wp-content/plugins/) 或通过后台插件管理上传

3、在插件管理界面启用插件

4、在设置->Math Comment Span,调整设置并保存;第一次使用时必须,否则在留言算术验证码处将出现类似如下的提示:Warning: array_rand() [function.array-rand]: Second argument has to be between 1 and the number of elements in the array in D:\WwwRoot\wp-content\plugins\math-comment-spam-protection\math-comment-spam-protection.classes.php  on line 71

5、在主题的comments.php留言栏处添加如下代码:

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

小淚是在comments.php的<textarea>…</textarea>标签的上面添加了这段代码啊!

原文来自枫芸志: http://witmax.cn/math-comment-spam-protection.html

〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓【蛋疼的分割线】〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓〓

本站遵循:署名-非商业性使用-相同方式共享 3.0 共享协议

转载请标明出处:小淚部落阁

本文地址:http://www.qypark.net/wordpress/math-comment-spam-protection.html

59 Responses to “留言算术验证码插件Math Comment Spam Protection”


  1. 手工加上就行

    [回复]

    夏小淚 回复:

    @大智若鲁, 我不会手工添加啊!!

    [回复]


Leave a Reply