Categories: WP/WP Plugins | Tags: | Views: 8,287

 

之前写了一篇 非插件防垃圾评论, 用的是简单的数学等式。但是需要对主题中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/

 

RELATED POSTS:

  1. wordpress非插件防垃圾评论方法
  2. jquery.msgbox is now hosting in Google Code
  3. Dean’s FCKEditor With pwwang’s code plugin For WordPress
  4. 最后,我还是放弃了wp-codebox
  5. KOBE PPT 下载
  6. WP-Plugin: Verification Code for Comments 2.1.0
  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.

  4. madskills
    November 17th, 2010 at 06:19
    Reply | Quote | #7

    for some reason im not getting it to work i installed it and activated it but its not showing up

  5. December 17th, 2010 at 20:28
    Reply | Quote | #8

    本插件本人亲测,最大的缺点是图形的时候会区分大小写,如果有修复方法感谢回复,感激不尽! :)

    • January 13th, 2011 at 21:40
      Quote | #9

      @尛俊: 区别大小写还不好?

  6. chau
    January 13th, 2011 at 12:55

    teach me how to use your plugin.
    i placed your code ……. in my comment page but it displayed a input box + %verification% .. only
    config_panel ( admin ) has a code
    thanks in advanced

    • January 13th, 2011 at 21:46

      @chau: You are not supposed to place my code in the comment page. You should put it in the plugin directory, and activate it in your plugin panel in dashboard.

  7. January 13th, 2011 at 22:40

    不是区分大小写不好,只是全是大写的,习惯用小写的人,很多发不上来,总是提示验证码错误

    • January 19th, 2011 at 09:44

      @尛俊: 那我提供给你不区分大小写的修改方法
      打开文件verification-code-for-comments.php,修改第23行 $vcc = md5(trim($_POST['vcc'])); 为:
      $vcc = md5(trim(strtoupper($_POST['vcc'])));
      这样就可以不区分大小写了.

    • January 20th, 2011 at 10:47

      感谢博主提供不区分大小学方法,感激不尽

  8. January 14th, 2011 at 16:41

    I know where to place plugin folder. I mean how to active for using? I have active it in control panel.I saw a line code
    I put your code %verification% to my comment.php but it displays only a input + %verification% without any verification math ( I chose math in control panel )
    looking for your teaching !

  9. April 30th, 2011 at 06:10

    I activated this plugin on my website and inputted the proper ID but it does not show up on my pages. If I try to comment it will just sent me to “invalid code” page but there isn’t even a verification code image showing up

    • May 2nd, 2011 at 15:36

      @RachelCeleste:Which version did you use?

  10. May 16th, 2011 at 15:48

    Hi, I’ve got the same problem as above. After downloading and activation, I go through the small config control panel page and save, but nothing appears in comments section. I’m using WordPress 3.1.2 and Verification Code for Comments 2.0.2. Any ideas would be gratefully received.
    Thanks,

    • May 16th, 2011 at 18:08

      @John:Are you able to set the pre-position of the verification box ?

  11. May 16th, 2011 at 18:17

    Yes, the entire setup appears to work perfectly. I even have the options to change from text and maths questions etc. If I try to post a comment ‘on test’, I get a verification error, so the system appears to be working only it just isn’t displayed on the form.

    • May 16th, 2011 at 20:19

      @John:Which browser did you use?
      Can you select the part where the box should appear, and see the source code of the selection?
      If available, show me the source.
      And if you have firebug, try to check if any JS errors occur.
      Any JS errors before my codes taking effect will prevent the box appear.

  12. lld
    June 12th, 2011 at 22:04

    OK — I have the same problem. The verification boxes don’t appear, but when I post a test comment, I get the verification error. I’m not a technical person, so I need detailed steps to make the fix.

  13. June 21st, 2011 at 17:29

    Hi, I’ve got the same problem as above. After downloading and activation, I go through the small config control panel page and save ;)

    • June 21st, 2011 at 19:40

      @NAEL:Could you please just show me your blog address? I cannot get the exact solution without details.

  14. Kat
    September 13th, 2011 at 17:49

    The new captcha code box is not displayed in IE8. Works for all the other IEs, though. Maybe you can have a look at this.

  15. October 5th, 2011 at 01:09

    I get the same verification invalid once installed and the math verification box never shows up on my comment page…

  16. December 22nd, 2011 at 15:20

    Hey just a thought, I completely agree with you. I really like this article. It contains a lot of useful information.

  17. February 14th, 2012 at 04:15

    I installed and activated your verification code for comments plug-in, but it does not work. No box is displayed, and I get an “Invalid Verification Code” message when I attempt to post a comment.

    Web sites: http://killeens.info/finance; http://killeens.info/land and http://killeens.info/antiquities

1 trackbacks

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

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