PHPackages                             hypejunction/elgg\_stars - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hypejunction/elgg\_stars

ActiveElgg-plugin

hypejunction/elgg\_stars
========================

Star rating for Elgg

3.1.0(10y ago)01941[3 issues](https://github.com/hypeJunction/elgg_stars/issues)GPL-2.0PHPPHP &gt;=5.4

Since Aug 3Pushed 10y ago1 watchersCompare

[ Source](https://github.com/hypeJunction/elgg_stars)[ Packagist](https://packagist.org/packages/hypejunction/elgg_stars)[ Docs](http://hypejunction.com)[ RSS](/packages/hypejunction-elgg-stars/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Elgg Stars
==========

[](#elgg-stars)

Star rating for Elgg

Usage
-----

[](#usage)

### Adding a rating form

[](#adding-a-rating-form)

1. First, either define your rating criteria using the plugin setting, or by calling `elgg_stars_register_rating_annotation_name($criteria1);`for each rating criteria you are intending to use.
2. Add a form to rate an existing entity:

```
echo elgg_view_form('stars/rate', array(), array(
	'entity' => $entity,
	'annotation_names' => array($criteria1, $criteria2)
));

```

This will display a form with 2 star rating modules. User input will be processed in real time. No need for any further coding on your side.

### Adding a static star input to a form

[](#adding-a-static-star-input-to-a-form)

To add a star input to your form, simple call:

```
echo elgg_view('input/stars', array(
	'name' => 'stars'
));

```

In your action, you would then use standard Elgg API:

```
$stars = get_input('stars');

```

See `input/stars` for a list of additional parameters, including minimum and maximum values;

### Getting rating values

[](#getting-rating-values)

To get a value for a single or multiple criteria, you can call

```
$ratings = elgg_stars_get_entity_rating_values($entity, array($criteria1, $criteria2);

```

You can leave the second parameter empty, to get a total value for all registered rating criteria.

Note that this function will return an associative array, where: `$ratings['value']` is an actual average value of all ratings. Ratings are not weighed, so if you are planning to use multiple rating scales, you need to add your own weighing algorithms.

### Displaying star ratings without user input

[](#displaying-star-ratings-without-user-input)

To display any value on a star rating scale:

```
echo elgg_view('output/stars', array(
	'value' => $my_value
));

```

You can also specify, 'min', 'max', and 'step' parameters to configure the scale.

Credits / Acknowledgements
--------------------------

[](#credits--acknowledgements)

### RateIt - a jQuery star rating plugin

[](#rateit---a-jquery-star-rating-plugin-httprateitcodeplexcom)

Fast, Progressive enhancement, touch support, customizable (just swap out the images, or change some CSS), Unobtrusive JavaScript (using HTML5 data-\* attributes), RTL support, ARIA &amp; keyboard support. Use as many stars as you'd like, and also any step size.

Notes
-----

[](#notes)

- This is a framework-agnostic adaptation of discontinued hypeStarRating

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3935d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5071b1cd852e094b3f564962a625e04c227adc73af30c5b46b243ab8f20154a7?d=identicon)[hypeJunction](/maintainers/hypeJunction)

---

Top Contributors

[![hypeJunction](https://avatars.githubusercontent.com/u/1202761?v=4)](https://github.com/hypeJunction "hypeJunction (14 commits)")

---

Tags

pluginelggstarsratings

### Embed Badge

![Health badge](/badges/hypejunction-elgg-stars/health.svg)

```
[![Health](https://phpackages.com/badges/hypejunction-elgg-stars/health.svg)](https://phpackages.com/packages/hypejunction-elgg-stars)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
