Disable captcha by default, add instructions on how to add it

This commit is contained in:
Flavio Copes 2015-12-12 14:28:10 +01:00
parent aa551e9cea
commit f25fbd7e20
2 changed files with 13 additions and 14 deletions

View File

@ -16,8 +16,6 @@ Or clone from GitHub and put in the `user/plugins/comments` folder.
# Usage
Edit the
Add `{% include 'partials/comments.html.twig' with {'page': page} %}` to the template file where you want to add comments.
For example, in Antimatter, in `templates/item.html.twig`:
@ -51,7 +49,8 @@ To set the enabled routes, create a `user/config/plugins/comments.yaml` file, co
# Enabling Recaptcha
The plugin comes with Recaptcha integration. To make it work, add your own Recaptcha `site` and `secret` keys the the plugin yaml config file.
The plugin comes with Recaptcha integration. To make it work, create a `user/config/plugins/comments.yaml` file, copy in it the contents of `user/plugins/comments/comments.yaml` and uncomment the capthca form field and the captcha validation process.
Make sure you add your own Recaptcha `site` and `secret` keys too.
# Where are the comments stored?

View File

@ -50,15 +50,15 @@ form:
type: hidden
evaluateDefault: grav.uri.path
- name: g-recaptcha-response
label: Captcha
type: captcha
recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3
recaptcha_not_validated: 'Captcha not valid!'
validate:
required: true
process:
ignore: true
# - name: g-recaptcha-response
# label: Captcha
# type: captcha
# recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3
# recaptcha_not_validated: 'Captcha not valid!'
# validate:
# required: true
# process:
# ignore: true
buttons:
- type: submit
@ -68,8 +68,8 @@ form:
- email:
subject: "[New Comment] from {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- captcha:
recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
# - captcha:
# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
- addComment:
- message: Thank you for writing your comment!