Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-07-18 13:14:28

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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:
  1. email — The email address that will be protected with mailhide.
  2. output — This value should be (default) ‘html’ or ‘url’ and determines what this tag will generate.

Offline

#2 2007-07-18 13:19:06

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: mem_recaptcha

sweet, i love the idea behind recaptcha. might come in handy.

Offline

#3 2007-07-18 19:22:33

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: mem_recaptcha

Ermm. So where do I get the plug-in from Michael?


Stuart – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2007-07-18 21:41:09

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_recaptcha

hehe…oops

mem_recaptcha.txt

Offline

#5 2007-07-18 22:32:17

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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 – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2007-07-18 23:30:17

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: mem_recaptcha

The plugin piggy backs off the existing form that is going to be captcha’d.

Offline

#7 2007-07-19 05:37:57

Sencer
Developer emeritus
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

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

#8 2007-07-20 19:15:10

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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 – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#9 2007-07-22 20:31:51

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

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

#10 2007-07-22 21:32:34

thebombsite
Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

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 – The BombsiteProText ThemesTextgarden

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

Board footer

Powered by FluxBB