Disable captcha by default, add instructions on how to add it
This commit is contained in:
parent
aa551e9cea
commit
f25fbd7e20
|
@ -16,8 +16,6 @@ Or clone from GitHub and put in the `user/plugins/comments` folder.
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
Edit the
|
|
||||||
|
|
||||||
Add `{% include 'partials/comments.html.twig' with {'page': page} %}` to the template file where you want to add comments.
|
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`:
|
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
|
# 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?
|
# Where are the comments stored?
|
||||||
|
|
||||||
|
|
|
@ -50,15 +50,15 @@ form:
|
||||||
type: hidden
|
type: hidden
|
||||||
evaluateDefault: grav.uri.path
|
evaluateDefault: grav.uri.path
|
||||||
|
|
||||||
- name: g-recaptcha-response
|
# - name: g-recaptcha-response
|
||||||
label: Captcha
|
# label: Captcha
|
||||||
type: captcha
|
# type: captcha
|
||||||
recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3
|
# recatpcha_site_key: e32iojeoi32jeoi32jeoij32oiej32oiej3
|
||||||
recaptcha_not_validated: 'Captcha not valid!'
|
# recaptcha_not_validated: 'Captcha not valid!'
|
||||||
validate:
|
# validate:
|
||||||
required: true
|
# required: true
|
||||||
process:
|
# process:
|
||||||
ignore: true
|
# ignore: true
|
||||||
|
|
||||||
buttons:
|
buttons:
|
||||||
- type: submit
|
- type: submit
|
||||||
|
@ -68,8 +68,8 @@ form:
|
||||||
- email:
|
- email:
|
||||||
subject: "[New Comment] from {{ form.value.name|e }}"
|
subject: "[New Comment] from {{ form.value.name|e }}"
|
||||||
body: "{% include 'forms/data.html.twig' %}"
|
body: "{% include 'forms/data.html.twig' %}"
|
||||||
- captcha:
|
# - captcha:
|
||||||
recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
|
# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
|
||||||
- addComment:
|
- addComment:
|
||||||
- message: Thank you for writing your comment!
|
- message: Thank you for writing your comment!
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue