hypejunction / elgg_stars
Star rating widget for any Elgg entity — annotate, aggregate, and display.
Package info
github.com/hypeJunction/elgg_stars
Type:elgg-plugin
pkg:composer/hypejunction/elgg_stars
7.0.0
2026-05-24 09:12 UTC
Requires
- php: >=8.3
- ext-intl: *
- composer/installers: ^2.0
- elgg/elgg: ~7.0.0
This package is auto-updated.
Last update: 2026-05-26 21:43:59 UTC
README
Star rating widget for any Elgg entity — annotate, aggregate, and display.
Features
- Drop-in interactive star rating widget (jQuery RateIt) for entities of any type/subtype.
- Multi-criterion ratings — register any number of annotation names.
- Aggregated stats: per-entity count, sum, and average.
- Admin UI to enable per-type/subtype, per-criterion rating.
- River entries for new ratings.
- "Highest Rated" widget for profile, group, and dashboard contexts.
Installation
Via Composer (recommended):
composer require hypejunction/elgg_stars
Manual:
Download the zip, extract into your Elgg mod/ directory, and activate in the admin panel.
Usage
Render a rating form
echo elgg_view_form('stars/rate', [], [ 'entity' => $entity, 'annotation_names' => ['starrating'], ]);
Display a read-only rating
echo elgg_view('output/stars', ['value' => $entity_rating]);
Programmatic rating values
$rating = elgg_stars_get_entity_rating_values($entity, ['starrating']); // $rating = ['count' => N, 'sum' => N, 'value' => avg, 'min' => 0, 'max' => 5, 'step' => 1]
Compatibility
| Plugin version | Elgg version |
|---|---|
| current | 7.x |
| 6.x | 6.x |
| 5.x | 5.x |
| 4.x | 4.x |
| 3.x | 3.x |
Credits
- RateIt — jQuery star rating plugin (bundled in
vendors/rateit/).
License
GPL-2.0-or-later