Download the PHP package positron48/bolt-simple-comments without Composer
On this page you can find all versions of the php package positron48/bolt-simple-comments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download positron48/bolt-simple-comments
More information about positron48/bolt-simple-comments
Files in positron48/bolt-simple-comments
Package bolt-simple-comments
Short Description It is bolt extension for simple comments system.
License MIT
Informations about the package bolt-simple-comments
Positron48 CommentExtension
Author: Anton Filatov.
This Bolt extension can be used as comment system.
Installation:
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_CREDENTIALSin your .env file. Default value is../config/extensions/service-account-recaptcha-credentials.json.
Add to .env file some parameters:
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:
Also you can override default template by creating file comment_list.html.twig in your theme folder.
Spam Filtering
You can enable simple spam filtering for comments using a configurable regular expression. This is controlled by the COMMENT_SPAM_REGEX environment variable.
How to configure
Add the following line to your .env file (or set it in your Docker environment):
This regex will filter out comments containing HTML <a> tags with href attributes (common for spam links). You can set your own pattern as needed.