承接 positron48/bolt-simple-comments 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

positron48/bolt-simple-comments

Composer 安装命令:

composer require positron48/bolt-simple-comments

包简介

It is bolt extension for simple comments system.

README 文档

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.

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):

COMMENT_SPAM_REGEX='/\<a\s+href=/i'

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.

统计信息

  • 总下载量: 57
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固