Download & Extend

Mailhide reCAPTCHA opens in same browser window

Project:reCAPTCHA
Version:7.x-1.x-dev
Component:reCAPTCHA Mailhide
Category:support request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I must be missing something obvious here, but I've installed Mailhide and very nice it is too — until I actually click on an email address, and am taken directly to the reCAPTCHA site, rather than having the reCAPTCHA opening in a popup window.

Is this something I should configure myself? Which file/line number should I be editing, if so?

I don't have popups blocked, or anything like that ... and it happens in both FF and IE (Avant)

Thanks in advance!

Comments

#1

Version:6.x-1.0» 6.x-1.4

I have the same problem - can anyone help?

#2

Version:6.x-1.4» 7.x-1.x-dev

I was experiencing the same issue, until I realized it was text filtering that was removing the on click attribute that was created by this module.

NOTE: you will need to delete the link that was created and type the email address again, as the filter was already applied.

This means you need to use FullHTML in order to make use of this feature. This is not something I wanted to do, so I came up with a workaround:

1) install the wysiwygfilter module and the colorbox module
2) set the wysiwyg filter to allow the class attribute
3) set the colorbox module to enable colorbox-load
4) modify the recaptcha/recaptchalib.php in this module.
a) add the class "colorbox-load".
b) add the width, height and iframe parameters to the query string. i.e. &width=500&height=318&iframe=true
c) remove the onclick attribute. (So if you edit with full html you don't get both the color box and the new window.)

The only remaining issue I have is getting rid of the "close" button recaptcha is putting, which doesn't work...since it is trying to close a window it didn't open. (It also doesn't work when the page opens up in the same window, so this problem hasn't changed...this issue wasn't introduced by going this route.)

-Tom

function recaptcha_mailhide_html($pubkey, $privkey, $email) {
$emailparts = _recaptcha_mailhide_email_parts ($email);
$url = recaptcha_mailhide_url ($pubkey, $privkey, $email);

return htmlentities($emailparts[0]) . "<a class='colorbox-load' href='" . htmlentities ($url) .
"&width=500&height=318&iframe=true' title=\"Reveal this e-mail address\">...</a>@" . htmlentities ($emailparts [1]);

}