Categories: WP/WP Plugins | Tags: | Views: 1,291

 

之前写了一篇 非插件防垃圾评论, 用的是简单的数学等式。但是需要对主题中comments.php以及wp-comment-post.php进行修改,不太方便。于是便动手写了一个插件,不仅可以采用数学等式验证,更可以使用图片验证码。

 

Add an verification code when user posting a comment to keep robots away. You can use an image verification code or a math equation instead.

Robots may post lots of spam comments into your database. You can add a verification code image or a math equation to avoid this.

Features:

  • You can choose a verification code image or a math equation as you wish
  • You don’t need to edit any source code of WP, you just need to active the plugin

 

 

  1. verification-code-for-comments screenshot 1

    configuration panel

  2. verification-code-for-comments screenshot 2

    a verification code image

  3. verification-code-for-comments screenshot 3

    a verification math equation

  4. verification-code-for-comments screenshot 4

    the error message when invalid code was entered

 

 Change Log:

1.0.0   Finish the basic functions

 

Download/Install:

http://wordpress.org/extend/plugins/verification-code-for-comments/

 

这篇文章来自 迷途知返(PWWANG.COM), 转载请注明出处。 版权说明

  1. abcde
    November 25th, 2009 at 10:12
    Reply | Quote | #1

    good!

  2. December 9th, 2009 at 08:43
    Reply | Quote | #2

    Since the last upgrade, the “Verification Code Inputbox Style:” is empty by default for all new installations and I have to copy the below script into the box.

    %verification% (required)

    • December 9th, 2009 at 16:13
      Quote | #3

      @Vinaay:I’ve re-tested the plugin before I delete the plugin options in the database. That is, I have committed a new installation, and the “Verification Code Inputbox Style:” gives a default string like this: “<p><input type=’text’ name=’%inputname%’ id=’%inputname%’ />
      <label for=’%inputname%’> %verification% <small>(required)</small></label></p>” but not empty. You may use the default string I gave to run the plugin.

    • December 9th, 2009 at 16:16
      Quote | #4

      @Vinaay:and you must notice that the apostrophe in my comment is converted from English to Chinese form by WP. So you need to change them back

  3. December 9th, 2009 at 18:05
    Reply | Quote | #5

    pwwang :@Vinaay:I’ve re-tested the plugin before I delete the plugin options in the database. That is, I have committed a new installation, and ……

    I have faced this issue in a few installations. I had even tried deactivating > deleting > re-installation and continued to get an empty box.

    This time, though, it worked. Perhaps you sent me some magic. :)

    I merely took the same steps as before but I also opened verification-code-for-comments.php and saw that the default text is available in line 142 & 143 before activating the plugin.

    Mysteriously (for me), its okay now.

    • December 9th, 2009 at 23:10
      Quote | #6

      @Vinaay:Great that it’s okay now. I am quite sure that I have not sent you any magic. Thanks for focusing on this plugin. Any questions, keep contacting me.

;) :| :x :twisted: :roll: :oops: :o :mrgreen: :lol: :idea: :evil: :cry: :arrow: :P :D :?: :? :) :( :!: 8O 8)

你可以使用@somebody:开头, 来邮件通知somebody你回复了他的留言(用户名区分大小写).