I’ve wrote a new Symfony plugin to add reCAPTCHA widgets and validation to Symfony new forms. reCAPTCHA is a free CAPTCHA service that helps to digitize books, newspapers and old time radio shows.
To install: checkout it from http://selfpublish.googlecode.com/svn/trunk/plugins/sfAnotherReCaptchaPlugin/ and put it in your Symfony plugins
directory.
Next, get a reCAPTCHA key and put the following lines in your app.yml
:
recaptcha:
public_key: <your public reCAPTCHA key>
private_key: <your private reCAPTCHA key>
Clear the cache with the symfony cc
and check that the plugin activated in projectConfiguration.class.php
.
You are now able to add reCAPTCHA widgets and validators.
See the plugin’s README file or this register form with reCAPTCHA enabled to learn how to use it.
This plugin is distributed under the MIT license and is based on Arthur Koziel work.
I wonder why you published another reCaptcha plugin? The other one is not good enough?
You could host it on symfony plugins listing for a better visibility.
The other plugin does not provide a reCAPTCHA form widget. I think my plugin is proper and easier, more in the Symfony new form spirit.
With my plugin you can add a reCAPTCHA field to your form like any other field, without trick.
I will host it on Symfony plugins listing but I'm waiting for a response of Arthur Koziel to merge our plugins.
OK I understand better.
However I thought there was already something and I found a reCaptcha widget+validator in the sfFormExtraPlugin.
Unlike this plugin, mine support both internal reCAPTCHA widget error display system (beautiful) and Symfony form error system.
It relies on the official reCAPTCHA PHP implementation (this a custom implementation for sfFormExtraPlugin) and provides a MailHide helper.
maybe you cold contribute your code to the sfFormExtraPlugin as it sounds like you added some extra goodness to what already exists in sfFormExtraPlugin. This would make it easier for other developers to use your code since no other plugins than sfFormExtraPlugin would then be needed.
Why the hell are you reinventing the wheel here??? There's already http://www.symfony-project.org/plugins/sfFormExtr…
And if you're not happy with the existing one, provide a patch for it! That's opensource!
I've done my own implementation and explained the differences
previously. This plugin is part of a bigger project: SelfPublish, a self-managed open source CMS I'm writing using Symfony. Maybe some people are looking for a reCAPTCHA plugin with features like mine, it's why I share it.
I've already submitted a request to the
sfRecaptchaPlugin owner and I'll send a patch for sfFormExtras but I
need to add/modify units tests before! It's why I haven't listed my
plugin in the Symfony plugins listing.
Like you say, it's open source, you can modify it, or submit a patch yourself if you want 😉
why do we need Symfony when there's plenty of other frameworks? cos we sometimes want slightly different things!
Look forward to seeing your CMS.
Arthur Koziel just mailed me he is OK to merge our plugins. I'll write the units tests next week to submit a patch to sfFormExtras and maybe it will be only one reCAPTCHA plugin soon.
Hi there,
how is the merge going? I'm looking forward to see this in the actual symphony reposetory 🙂
maybe you cold contribute your code to the sfFormExtraPlugin as it sounds like you added some extra goodness to what already exists in sfFormExtraPlugin. This would make it easier for other developers to use your code since no other plugins than sfFormExtraPlugin would then be needed.