Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

License

NotificationsYou must be signed in to change notification settings

khalwat/craft-recaptcha

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Craft plugin to dispaly Google's new reCaptcha form widget and validate responses.

##Install

  1. Upload entire recaptcha directory to craft/plugins on your server.
  2. Navigate to your site's Plugin settings from the Control Panel.
  3. Click Install
  4. Click on the 'reCAPTCHA for Craft' link to enter in your reCAPTCHA site key and secret key. You can get both keys from theGoogle reCaptcha console.

##Usage###TemplatesTo display a reCAPTCHA widget in any template, use{{craft.recaptcha.render()}}.

###User Registration FormTo use the Recaptcha in a front-endUser Registration form, simply do this:

<form method="post" accept-charset="UTF-8" >    {{ getCsrfInput() }}    <input type="hidden" name="action" value="recaptcha/service/saveUser">

...and assuming it passes Recaptcha validation, the user registration will be passed along tousers/saveUser

###VerificationTo verify a user's input, call the plugin's verify service from your own plugin:

$captcha = craft()->request->getPost('g-recaptcha-response');$verified = craft()->recaptcha_verify->verify($captcha);if($verified){//User is a person, not a robot. Go on and process the form!} else {//Uh oh...its a robot. Don't process this form! }

##RoadmapCurrently this only supports the standard reCAPTCHA widget, but I hope to add some capabilities to adjust the styling and functionality.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP85.8%
  • HTML14.2%

[8]ページ先頭

©2009-2025 Movatter.jp