wp imgcode当我的Wordpress博客开始受大家关注的时候,经常会有一些垃圾留言发布,一看就是用Robot自动发布的广告或垃圾链接,而WordPress对这却束手无策,这样我们只有自己动手,用wp imgcode增加一层验证码屏障,把Robot垃圾留言拒之门外!

wp imgcode插件的功能就是在留言页面再添加上验证码功能。

下载连接:wp-imgcode.zip

安装方法:

1、和激活其他插件一样后台激活插件。

2、接下来修改当前使用主题的评论模版(comments.php),将

<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”5″></textarea></p><p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
</p>

<?php do_action(’comment_form’, $post->ID); ?>

</form>

改为

<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”5″></textarea></p><?php do_action(’comment_form’, $post->ID); ?>

<p><input name=”submit” type=”submit” id=”submit” tabindex=”5″ value=”Submit Comment” />
<input type=”hidden” name=”comment_post_ID” value=”<?php echo $id; ?>” />
</p>

</form>

保存模版后,刷新评论页面就可以看到验证码了。

┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄ 本文已被 『11』 人围攻! ┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄ ┄

  1. 我用akismet加上我的5分钟反垃圾留言方法,基本上也很少收到垃圾留言了,觉得用验证码是最有效的,但是不怎么好

  2. 我今天刚刚装上ak
    呵呵

  3. @whisperer
    垃圾不算多的话,可以用AK。误杀的问题确实存在。

  4. 说实话不喜欢验证码,所以用Ak,不过有时候会误杀

  5. 我是用function.php防spam的,效果还不错

  6. 你的时间不对啊,怎么还是27号

  7. 我都还没有遇到过垃圾留言呢,真冏

  8. @zatanwo
    这个功能挺有用。垃圾评论太多,手动管理直接办不了。

  9. 我得试试,刚开始接触呢……

  10. @MuMu’S
    我这里是美国时间,不好意思!空间是Hostmonster的,时间就按那边的时间了。现在改过来了。

    这不,刚看到你的评论,就收到一条垃圾评论。

Leave a Reply

= 3 + 7 (练习一下算术)
Please leave these two fields as-is:
勾选这里与大家分享你的作品!
Note: 您可以使用 '@User:'自动给对应的用户发邮件通知。