nlybe/ratings
Composer 安装命令:
composer require nlybe/ratings
包简介
Advanced rating and comment functions for Elgg
README 文档
README
Advanced rating and comment functions for Elgg.
This plugin can replaces the default comment form and with a new one, including star ratings for Elgg objects.
The default comment form of Elgg is not replaced automatically but some custom code can be used in order to show the ratings plugin forms.
How to use it
Returns rendered comments and a comment form for an entity
$vars['rate_label'] = elgg_echo('custom:rate:title'); $vars['comment_label'] = elgg_echo('custom:comment:label'); echo ratings_elgg_view_comments($entity, $add_comment, $vars); /* @param \ElggEntity $entity The entity to view comments of * @param bool $add_comment Include a form to add comments? * @param array $vars Variables to pass to comment view */
Display star ratings
elgg_view('ratings/ratings', ['entity' => $entity]);
Improvements
- Add option to replace the default comment form with ratings form in selected entities
- Move max value from RatingsOptions to plugin settings in admin area
- Replace the ratings js component
统计信息
- 总下载量: 17
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2018-12-09