|
Nov
23
|
|
|
Categories: WP/WP Plugins
| Tags: WP插件
| 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
configuration panel
a verification code image
a verification math equation
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:


good!
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)
@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.
@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
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.
@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.
for some reason im not getting it to work i installed it and activated it but its not showing up
本插件本人亲测,最大的缺点是图形的时候会区分大小写,如果有修复方法感谢回复,感激不尽!
@尛俊: 区别大小写还不好?
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
@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.
不是区分大小写不好,只是全是大写的,习惯用小写的人,很多发不上来,总是提示验证码错误
@尛俊: 那我提供给你不区分大小写的修改方法
打开文件verification-code-for-comments.php,修改第23行 $vcc = md5(trim($_POST['vcc'])); 为:
$vcc = md5(trim(strtoupper($_POST['vcc'])));
这样就可以不区分大小写了.
感谢博主提供不区分大小学方法,感激不尽
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 !
@chau:could you show me your page?
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
@RachelCeleste:Which version did you use?
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,
@John:Are you able to set the pre-position of the verification box ?
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.
@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.
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.
@lld:can you show me your site?
Hi, I’ve got the same problem as above. After downloading and activation, I go through the small config control panel page and save
@NAEL:Could you please just show me your blog address? I cannot get the exact solution without details.
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.
I get the same verification invalid once installed and the math verification box never shows up on my comment page…
Hey just a thought, I completely agree with you. I really like this article. It contains a lot of useful information.
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