2017 © Pedro Peláez
 

lithium-library li3_recaptcha

Plugin that enable easy interactions with Googles reCAPTCHA API from Lithium PHP framework

image

djordje/li3_recaptcha

Plugin that enable easy interactions with Googles reCAPTCHA API from Lithium PHP framework

  • Saturday, December 22, 2012
  • by djordje
  • Repository
  • 2 Watchers
  • 3 Stars
  • 71 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

[project status] (http://stillmaintained.com/djordje/li3_recaptcha), (*1)

reCAPTCHA plugin for Lithium PHP framework

Plugin that enable easy interactions with Googles reCAPTCHA API, (*2)

Created by Djordje Kovacevic 2012-05-26, (*3)

Thanks to @gwoo and @nateabele for helping on #li3 chanel!, (*4)

Installation and configuration

1a. Checkout the code to either of your library directories:, (*5)

cd libraries
git clone git://github.com/djordje/li3_recaptcha.git

1b. Or if you use composer you can add this to your composer.json file:, (*6)


{ "require": { "djordje/li3_recaptcha": "v1.0.0" } }

2. Include library in your app/config/bootstrap/libraries.php, and pass your reCAPTCHA keys as config:, (*7)


Libraries::add('li3_recaptcha', array( 'keys' => array( 'public' => 'your_public_recaptcha_key', 'private' => 'your_private_recaptcha_key', 'mailhide_public' => 'your_public_mailhide_recaptcha_key', 'mailhide_private' => 'your_private_mailhide_recaptcha_key' ) ));

WARNING: You must provide public and private keys or this plugin will not work!, (*8)

Additionaly you can pass options for configuring RecaptchaOptions look and feel, this will be global for your application, but you can override it by passing new options to helpers challenge() method., (*9)

See Customizing the Look and Feel of reCAPTCHA for available options., (*10)


Libraries::add('li3_recaptcha', array( 'options' => array( 'theme' => 'white' ) ));

Usage

This plugin provide template helper li3_recaptcha\extensions\helper\Recaptcha, you can use it in your template $this->recaptcha->{method}()., (*11)

Challenge, (*12)

If you want to create reCAPTCHA challenge field you add $this->recptcha->challenge() to your form., (*13)

You can also pass RecaptchaOptions as param to challenge() method:, (*14)


$this->recaptcha->challenge(array( 'theme' => 'blackglass' ));

Mailhide, (*15)

For hidding email you use $this->recaptcha->mailhide($email)., (*16)

Checking challenge field in your controller, (*17)

To check your reCAPTCHA challenge answare you add to action in your controller something like this:, (*18)


if ($this->request->data && Recaptcha::check($this->request)) { // Do some stuff for users that passed reCAPTCHA check }

Testing

There is not unit tests for this plugin because reCAPTCHA does not provide testing API, (*19)

The Versions

22/12 2012

dev-master

9999999-dev https://github.com/djordje/li3_recaptcha

Plugin that enable easy interactions with Googles reCAPTCHA API from Lithium PHP framework

  Sources   Download

BSD-3-Clause

The Requires

 

php captcha recaptcha lithium li3

22/12 2012

v1.0.0

1.0.0.0 https://github.com/djordje/li3_recaptcha

Plugin that enable easy interactions with Googles reCAPTCHA API from Lithium PHP framework

  Sources   Download

BSD-3-Clause

The Requires

 

php captcha recaptcha lithium li3