Topic: reCaptcha form garbled

Hello everyone. I'm new to PunBB and I'm trying to get reCaptcha working on the registration form.

As there isn't a plug-in for this, I manually installed it and have managed to get so far as having the captcha show up about where I want it on the registration page. The problem is how it looks when I view the page. The form is garbled up and unusable, as can be seen here (tested in FF, Opera and IE):

http://img141.imageshack.us/img141/8325/wrongrecaptcha.jpg

That is how it looks on the registration page. I did make a test page that loaded the captcha outside PunBB and it worked fine.

I am hoping someone familiar with PunBB could point me in the right direction on where I can look to correct this error. I believe it is a CSS problem, and if so, which files (and where big_smile ) should I edit to solve the problem in all browsers? I'm using the default Oxygen skin.

Any help at all would be appreciated.

For reference, here is how reCaptcha should look:
http://img141.imageshack.us/img141/926/rightrecaptcha.jpg

Also, I'm aware of the captcha plug-in that is available for PunBB, but it lacks the accessibility features of reCaptcha.

Thanks in advance for any help on this smile

2 (edited by Lucky13 2009-04-21 03:39)

Re: reCaptcha form garbled

So, after posting this, I got the idea that it might be better to spend my time on getting an extension to work so that it would be easy to enable/disable this rather than fight with manually doing the reCaptcha. I grabbed this extension that was written for 1.3 BETA and went to work.

I know a little about several languages but PHP isn't one of them. Never the less, after some elite search-and-replace (PUN_ROOT -> FORUM_ROOT, pun_user -> forum_user, etc) I got it to install without errors. The captcha wasn't showing, however. I tried un-installing and re-installing for giggles and now I get this:

Warning: include(../extensions/recaptchaextensions/recaptcha/lang/English/recaptcha.php) [function.include]: failed to open stream: No such file or directory in .../htdocs/forums/include/common.php(129) : eval()'d code on line 188

Warning: include() [function.include]: Failed opening '../extensions/recaptchaextensions/recaptcha/lang/English/recaptcha.php' for inclusion (include_path='.') in .../htdocs/forums/include/common.php(129) : eval()'d code on line 188

Warning: require_once(../extensions/recaptchaextensions/recaptcha/recaptchalib.php) [function.require-once]: failed to open stream: No such file or directory in .../htdocs/forums/include/common.php(129) : eval()'d code on line 190

Fatal error: require_once() [function.require]: Failed opening required '../extensions/recaptchaextensions/recaptcha/recaptchalib.php' (include_path='.') in .../htdocs/forums/include/common.php(129) : eval()'d code on line 190

I'll just re-install the forums... nothing on it yet anyhow.

But since I don't know what I'm doing, would someone help me out with the captcha please? big_smile

Re: reCaptcha form garbled

This warning means that there is no file "<FORUM_ROOT>/extensions/recaptchaextensions/recaptcha/lang/English/recaptcha.php". Check it up.

Re: reCaptcha form garbled

That's because there isn't a path extensions/recaptchaextensions/recaptcha/lang/English/.

Somehow, when I un-installed/re-installed the extension, it left part of the path somewhere and appended to it: extensions/recaptchaextensions/recaptcha/lang/English/.

Anyhow, I've ironed it out so that it doesn't throw errors anymore, but it still doesn't work. Nothing changes when it is installed - no options appear to configure it where they should, no captcha shows up on the register screen...

I'm sure it is just something I've screwed up when I modified the files. I don't know enough about PunBB and it's extensions (or PHP) atm to fix this.

Here are the files including my modifications in case anyone wants to take a stab at it (mannungo?).

http://www.divshare.com/download/7164029-6da

Re: reCaptcha form garbled

Well I don't know what your latest problem is, but I found that the original garbling is caused by a CSS conflict - in the <THEME>.css (as opposed to <THEME>_cs.css), there are two places that the "table-layout" attribute of tables are set to "fixed" - commenting these out un-garbles it for the most part, and doesn't seem to adversely affect the rest of the forums...

However, in Firefox, the text box for entering the challenge response is shifted over about an inch or so, and is partially hidden under other stuff.  In IE8 it looks fine.

I think a custom theme will be the solution to this; to just do away with reCAPTCHA's layout altogether and whip up a custom one that plays nicer with PunBB.  I'm working on this, but it's 4:04am and my sanity is not found -_-

Re: reCaptcha form garbled

Well, about an hour and a half later, I've finally gotten the "themed" reCAPTCHA working... and it's very cleanly integrated into the registration form smile

http://junk.elitehost.org/images/working_recaptcha.png

If someone would like to help me figure out how to build this into an extension package, I'd love to do so!