Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts

AuthImage captcha for WordPress

Posted by plattapuss on December 20th, 2006

A few months ago I installed AuthImage on one of my WordPress installations and only just got around to getting it fully up and running. Don't get me wrong, it is a brilliant little plug-in, but it does require a wee bit of manual tweaking in your code.

You can find AuthImage here if you are interested. It is free to download and install, and with a bit of tweaking you can get captcha images that look just the way you want. The instructions are really easy to follow too.

On my sites, I do NOT force users to register to comment. Though by the lack of comments on this site, one would think I do! (jest kiddin). So when I installed AuthImage and followed all the instructions, I was dismayed to see that when a person was logged in, they kept getting an error about not having entered the correct code for the captcha. Even though no captcha image shows up when you are logged in.

I dug down through the comments and finally found the fix, so I thought I would share it here. This is not my work rather it is the work of one of the people who commented on the Gudlf's site.

Edit wp-comments-post.php in the root WordPress installation (I am using WordPress 2.x and have no idea if this problem exists on earlier version). Go down to where you added these lines:

PHP:
  1. // AuthImage
  2. if (!checkAICode($comment_code) )
  3.         die( __('Error: please enter the valid authorization code.') );

and change them to look like this:

PHP:
  1. // AuthImage
  2. if (!$user_ID &&  !checkAICode($comment_code) )
  3.         die( __('Error: please enter the valid authorization code.') );

That's it! Simple wasn't it. Now you should be able to comment while logged in.



Reader Comments

Thansk for this, I´ve been having some problems with plug-ins and captcha codes but downloaded AuthImag and it seems to work – Its strange though because some codes seem to obvious but once i type it in – its says its not correct – for a while there i was concerned that, unable to crack the “are you human code” rendered me somewhat inhumane!!

Thanks for the tips!!!

Ahh ha! I was having similar issues. Thanks for clearing this up for me.

Breaking a captcha image is a lot easier than anyone could tought… you can’t understant that untill you’re a web develper :)

I had the same problem but this is a great way to fix it. thank you much

my website has good traffic. do i require AuthImage

[Quote]On my sites, I do NOT force users to register to comment. Though by the lack of comments on this site, one would think I do! (jest kiddin). So when I installed AuthImage and followed all the instructions, I was dismayed to see that when a person was logged in, they kept getting an error about not having entered the correct code for the captcha. Even though no captcha image shows up when you are logged in.[Quote]
I have also seen this captcha problem. Btw,can you share the URL of Gudlf’s site that you have talked about from where you got the fix?

Professional Web Design Company USA: The link is above in the story.

[...] Out of Control AuthImage captcha for WordPress Posted by root 1 day 15 hours ago (http://www.outofcontrol.ca) A few months ago i installed authimage on one of my wordpress installations and only just got around to getting it fully up comment 7 written by professional web design company usa powered by wordpress middot design by glued ideas Discuss  |  Bury |  News | Out of Control AuthImage captcha for WordPress [...]