positron48 / bolt-simple-comments
It is bolt extension for simple comments system.
Installs: 46
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 1
Type:bolt-extension
Requires
- php: >=7.1.3
- google/cloud-recaptcha-enterprise: ^1.2
Requires (Dev)
- bolt/core: ^4.0 | ^5.0
README
Author: Anton Filatov.
This Bolt extension can be used as comment system.
Installation:
composer require positron48/bolt-simple-comments php bin/console doctrine:migrations:migrate php bin/console cache:clear --no-warmup
Command cache:clear
needs to refresh admin pages list.
Using google recaptcha enterprise
If you want to use Google recaptcha enterprise - get the api key via this guide and next steps:
- go to https://console.cloud.google.com/apis/credentials and create new service account;
- select to your service account role
reCaptcha Enterprise Agent
; - go to service account and create new JSON key;
- store credentials in /config/extensions/service-account-recaptcha-credentials.json
or change variable
GOOGLE_APPLICATION_RECAPTHA_CREDENTIALS
in your .env file. Default value is../config/extensions/service-account-recaptcha-credentials.json
.
Add to .env file some parameters:
RECAPTCHA_KEY= GOOGLE_API_KEY= GOOGLE_PROJECT_ID= GOOGLE_APPLICATION_RECAPTHA_CREDENTIALS=../config/extensions/service-account-recaptcha-credentials.json
RECAPTCHA_KEY
- Key Id of your recaptcha enterprise key.
GOOGLE_API_KEY
- Api key from section 'API Keys' in Credentials page.
GOOGLE_PROJECT_ID
- Project Id of your project in Google Cloud Platform.
GOOGLE_APPLICATION_RECAPTHA_CREDENTIALS
- path to your json file with credentials.
Usage
After installation in your admin panel /bolt you will see a new menu item called "Comments". There are all comments with edit ability.
To show comment list on contentpage use twig function commentList
with content as first param:
{{ commentList(content) }}
Also you can override default template by creating file comment_list.html.twig
in your theme folder.