reCAPTCHA
From CashCrusaderWiki
m |
(Added further help) |
||
Line 1: | Line 1: | ||
- | == | + | == Required CashCrusader version == |
Line 5: | Line 5: | ||
- | == | + | == reCAPTCHA keys == |
Line 15: | Line 15: | ||
- | == | + | == Template modification == |
Line 35: | Line 35: | ||
and apply your customizations if you desire. | and apply your customizations if you desire. | ||
+ | |||
+ | |||
+ | If you want to update your template files directly, add the following code where you want the check to appear: | ||
+ | |||
+ | ''<?php echo Recaptcha::form(); ?>'' | ||
+ | |||
+ | |||
+ | == Notes == | ||
+ | |||
+ | * reCAPTCHA check is skipped when you are logged into admin panel | ||
+ | * if the check does not seem to be working, make sure the ''form'' HTML element is not inside a ''table'' |
Current revision
Contents |
Required CashCrusader version
reCAPTCHA bot check for signup and login pages is available from CashCrusader 3.2.7.
reCAPTCHA keys
reCAPTCHA requires keys which can be gotten for free from Google.
Register your site at https://www.google.com/recaptcha/admin for reCAPTCHA V2 keys. Note your Site key and Secret key.
Enter these keys into your site settings at Admin menu > Site Settings > Anti-Cheat Settings.
Template modification
Your site template needs to be modified to support reCAPTCHA if you are upgrading from 3.2.6 or earlier. reCAPTCHA functionality consists of two parts. The script backend does bot check and it is installed automatically by the autoupdater and the template shows the bot check user interface. The autoupdater does not alter template files so it needs a little bit of manual work.
The easiest way is to overwrite your current template files with the relevant stock files. After overwriting you may apply your customizations to the files. The template files which need the reCAPTCHA support are confirm.php, invalid_login.php and login.php. Stock versions of these files can be found from the /scripts/templates/ folder.
Take a backup of your current template files and copy the following stock files
/scripts/templates/confirm.php
/scripts/templates/invalid_login.php
/scripts/templates/login.php
over the files at
/pages/confirm.php
/pages/invalid_login.php
/pages/login.php
and apply your customizations if you desire.
If you want to update your template files directly, add the following code where you want the check to appear:
<?php echo Recaptcha::form(); ?>
Notes
- reCAPTCHA check is skipped when you are logged into admin panel
- if the check does not seem to be working, make sure the form HTML element is not inside a table