positron48/bolt-simple-comments

It is bolt extension for simple comments system.

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 1

Type:bolt-extension

v1.0.3 2022-06-06 20:19 UTC

This package is auto-updated.

Last update: 2024-04-07 00:18:00 UTC


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.