nlybe / ratings
Advanced rating and comment functions for Elgg
Installs: 17
Dependents: 1
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Type:elgg-plugin
Requires
- php: >=8.0
- composer/installers: >=1.0.8
Conflicts
- elgg/elgg: <5.0
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