i-lateral/silverstripe-reviews 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

i-lateral/silverstripe-reviews

Composer 安装命令:

composer require i-lateral/silverstripe-reviews

包简介

Expands comments module to also allow for reviewing of an object

README 文档

README

Scrutinizer Code Quality

Add ability to review dataobjects by expanding on the core "comments" module

This module allows you to attach a "comments form" (and thread) to an object, in much the same way as the silverstripe-comments module, but the form adds a Rating field and you can customise the min and max values via SilverStripe config.

Installation

Install via composer:

composer require i-lateral/silverstripe-reviews

Usage

Adding reviews to an object is done in much the same way as the comments module. First you must add the extension, then you can customise any of the CommentsOptions.

For example, if I have a Product class (in the global namespace) then I would add the following to config.yml (note: you must also add the comments extension).

Product:
  extensions:
    - SilverStripe\Comments\Extensions\CommentsExtension # must be added first
    - ilateral\SilverStripe\Reviews\Extensions\ReviewsExtension

Once you have done this, you can customise options (such as min/max rating) as below:

Product:
  extensions:
    - SilverStripe\Comments\Extensions\CommentsExtension
    - ilateral\SilverStripe\Reviews\Extensions\ReviewsExtension
  # Customise comments options
  comments:
    show_ratings: true # Disables ratings
    min_rating: 1 # Minimum rating possible
    max_rating: 5 # Maximum rating possible 
    enable_url: false # Re-show the URL field (hidden by default)

NOTE This module extends on the functionality of the comments module, so you still need to add the template variable to your Page/Controller template:

$CommentsForm

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2018-08-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固