Merge branch 'release/1.1.3'
This commit is contained in:
commit
47ee19d48b
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -1,3 +1,17 @@
|
|||
# v1.1.3
|
||||
## 01/06/2016
|
||||
|
||||
1. [](#improved)
|
||||
* Disable captcha by default, added instructions on how to enable it
|
||||
1. [](#bugfix)
|
||||
* Increase priority for onPageInitialized in the comments plugin over the form plugin one to prevent an issue when saving comments
|
||||
|
||||
# v1.1.2
|
||||
## 12/11/2015
|
||||
|
||||
1. [](#improved)
|
||||
Fix double escaping comments text and author
|
||||
|
||||
# v1.1.1
|
||||
## 12/11/2015
|
||||
|
||||
|
|
|
@ -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`:
|
||||
|
@ -49,9 +47,12 @@ 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.
|
||||
|
||||
> Make sure you configured the "Email from" and "Email to" email addresses in the Email plugin with your email address!
|
||||
|
||||
# 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?
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: Comments
|
||||
version: 1.1.1
|
||||
version: 1.1.3
|
||||
description: Adds a commenting functionality to your site
|
||||
icon: comment
|
||||
author:
|
||||
|
|
|
@ -26,7 +26,7 @@ class CommentsPlugin extends Plugin
|
|||
return [
|
||||
'onPluginsInitialized' => ['onPluginsInitialized', 0],
|
||||
'onFormProcessed' => ['onFormProcessed', 0],
|
||||
'onPageInitialized' => ['onPageInitialized', 0],
|
||||
'onPageInitialized' => ['onPageInitialized', 10],
|
||||
'onTwigSiteVariables' => ['onTwigSiteVariables', 0]
|
||||
];
|
||||
}
|
||||
|
|
|
@ -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!
|
||||
|
||||
|
|
Loading…
Reference in New Issue