Skip to content

rnavarro/recaptcha_plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The changes in this branch incorporate the changes from here:
http://bakery.cakephp.org/articles/tbsmcd/2011/02/05/recaptcha_plugin_6
As listed by Jahdrien

Quick start guide.

1. Get reCAPTCHA key.
http://www.google.com/recaptcha

2. Setting.
Download recaptchalib.php.
And put it in recaptcha_plugin/vendors.
http://code.google.com/p/recaptcha/downloads/list?q=label:phplib-Latest

3. Config.
Insert keys in recaptcha_plugin/config/key.php .
	$config = array(
		'Recaptcha' => array(
			'Public'  => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
			'Private' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
		),
	);

4. Controller.
	public $components = array('RecaptchaPlugin.Recaptcha');
	public $helpers = array('RecaptchaPlugin.Recaptcha');

5. View.
Inside <form> tags:
	echo $this->Recaptcha->show();
	echo $this->Recaptcha->error();


The show function accepts an attributes array to set values found here:
http://code.google.com/intl/fr/apis/recaptcha/docs/customization.html

Example:

echo $this->Recaptcha->show(array(
	'theme' => 'clean', // Default is still Red, can be one of: red | white | blackglass | clean
	'lang' => 'es' // Sets the language as found in the cusomization link above
);

About

Easy to use ReCAPTCHA with CakePHP .

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%