Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
mem_recaptcha
Note: This plugin was thrown together in about 30 minutes. I am looking for people to test it.
reCaptcha (http://recaptcha.net)
You will need to obtain public and private security keys to use reCaptcha
and to use the mailhide functionality. This plugin is a standalone recaptcha solution that includes the
recaptchalib.php (without needing to upload anything).
This implementation of reCaptcha breaks away from the traditional inline CAPTCHA validation. Instead, you should
first have the user validate the CAPTCHA and use the conditional tag to display the intended input form.
Tag mem_recaptcha
This tag will output the html needed for the reCaptcha display.
Tag mem_if_recaptcha_valid
This is a conditional to use with mem_recaptcha. After the mem_recaptcha prompt is validated, this will return true for the
user. This supports <txp:else />.
Tag mem_mailhide
Attributes:- email — The email address that will be protected with mailhide.
- output — This value should be (default) ‘html’ or ‘url’ and determines what this tag will generate.
Offline
Re: mem_recaptcha
sweet, i love the idea behind recaptcha. might come in handy.
Offline
Re: mem_recaptcha
Ermm. So where do I get the plug-in from Michael?
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Offline
Re: mem_recaptcha
Michael, how do you send the response? Do we need to include some kind of “submit” button?
Also, when you want to “flesh out” the help file a bit, you might add that there are new fields in “advanced preferences” to enter your keys.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: mem_recaptcha
The plugin piggy backs off the existing form that is going to be captcha’d.
Offline
Re: mem_recaptcha
Is there a specific reason why you didn’t make it inline after the preview? Was it just easier, or did you stumble across problems that prevented you to make it inline?
Offline
Re: mem_recaptcha
I’m afraid I’m totally baffled! I can’t get it to work. :(
In the “help” you say that the user needs to validate the reCaptcha first and then, with my use of the conditionals in my code, they get the appropriate form, in my case, the comment form. But if they can’t see the form before validation how does it piggy-back?
How about an example. :)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: mem_recaptcha
The reason that I did not make it an inline process was to prevent the forms from know about the reCaptcha. I guess I could require javascript browsers and hijack the form’s submit to test the captcha before submitting the form.
I didn’t create this with comments in mind (and I have not tested it with comments), since I don’t use comments that extensively (and they have spam filters for those). While creating this plugin, I had saw it as something that was missing from my plugins for self registration and moderation.
The idea is along the lines of
@<form>
<if captcha successful>
All the regular input fields you would see for a form
<else>
the captcha is displayed
</if>
Show the common submit button
</form>@
As I stated, I tossed this together in about 30 minutes with the hopes of getting feedback with regards to the usefulness of the workflow imposed and quality of the code (read: bugs).
Offline
Re: mem_recaptcha
OK. As I already use Sencer’s captcha plug-in I didn’t see any reason not to replace it with reCaptcha, particularly as it is doing something useful. Anyway I did get it working but to do it I put it inside it’s own “form” and gave it a “submit” button of it’s own. I used the conditionals to initially display the reCaptcha form and then if a “valid” result was returned it disappeared and was replaced by the comment form. The only problem I seem to have is that once the comment is submitted the reCaptcha form returns, which is fine, but I lose the “Thank You” message (p#txpCommentInputForm) which seems a little odd??? Haven’t figured that one out yet.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
Re: mem_recaptcha
Use mem_recaptcha to hide the submit button, instead of hiding your whole form:
<txp:mem_if_recaptcha_valid>
<txp:mem_form_submit label="Submit the Form for Real"/>
<txp:else />
<h3>Prove that you are human.</h3>
<p>We won't throw you in the lake or see if you weigh the same as a duck, but you do have to complete the <acronym>CAPTCHA</acronym>.</p>
<txp:mem_recaptcha />
<input type="submit" value="Let me in– I'm Human" id="recaptcha-submit"/>
</txp:mem_if_recaptcha_valid>
Offline
Re: mem_recaptcha
Hi.
Where can I get the plugin now? Links mentioned earlier beaten.
Offline