Improve plugin readme. Uncomment config options for captcha and email

This commit is contained in:
Flavio Copes 2015-10-16 17:17:44 +02:00
parent 7d7dbd1644
commit 85bb5c2ef4
2 changed files with 20 additions and 18 deletions

View File

@ -16,6 +16,8 @@ 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`:
@ -43,7 +45,9 @@ For example, in Antimatter, in `templates/item.html.twig`:
{% endembed %}
```
The comment form will appear to the blog post items.
The comment form will appear on the blog post items matching the enabled routes.
To set the enabled routes, create a `user/config/plugins/comments.yaml` file, copy in it the contents of `user/plugins/comments/comments.yaml` and edit the `enable_on_routes` and `disable_on_routes` options according to your needs.
# Enabling Recaptcha
@ -61,13 +65,11 @@ Further improvements to the comments visualization will be added in the next rel
# Email notifications
The plugin interacts with the Email plugin to send emails upon receiving a comment.
The plugin interacts with the Email plugin to send emails upon receiving a comment. Configure the Email plugin correctly, setting its "Email from" and "Email to" email addresses.
# Things still missing
- Add language file
- Allow to delete comments from the Admin Plugin
- Allow some pages to disable adding comments
- Ability to see all comments of a page in the Admin Plugin
- Ability to reply to a comment from the Admin Plugin
- Auto-fill the comment form when a user is logged in

View File

@ -51,26 +51,26 @@ 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
value: Submit
process:
# - email:
# subject: "[Site Guestbook] {{ form.value.name|e }}"
# body: "{% include 'forms/data.html.twig' %}"
# - captcha:
# recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
- email:
subject: "[New Comment] from {{ form.value.name|e }}"
body: "{% include 'forms/data.html.twig' %}"
- captcha:
recatpcha_secret: ej32oiej23oiej32oijeoi32jeio32je
- addComment:
- message: Thank you for writing your comment!