PHPackages                             iionly/elggx\_fivestar - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. iionly/elggx\_fivestar

ActiveElgg-plugin[Utility &amp; Helpers](/categories/utility)

iionly/elggx\_fivestar
======================

Fivestar adds a clean, attractive voting widget to Elgg.

3.3.1(5y ago)3494GPL-2.0-onlyPHP

Since Sep 27Pushed 5y ago3 watchersCompare

[ Source](https://github.com/iionly/elggx_fivestar)[ Packagist](https://packagist.org/packages/iionly/elggx_fivestar)[ Docs](https://github.com/iionly/elggx_fivestar)[ RSS](/packages/iionly-elggx-fivestar/feed)WikiDiscussions master Synced 1mo ago

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

Elggx Fivestar plugin for Elgg 3.3 and newer Elgg 3.X
=====================================================

[](#elggx-fivestar-plugin-for-elgg-33-and-newer-elgg-3x)

Latest Version: 3.3.1
Released: 2020-08-23
Contact:
License: GNU General Public License version 2
Copyright: (c) iionly (for Elgg 1.8 onwards), Billy Gunn

Description
-----------

[](#description)

This plugin will add a voting widget to certain views on your site, for example blogs, pages, bookmarks, files and group discussions. By default the voting widget will display 5 stars but you can configure the number of stars to show. You can also configure if your members should be allowed to change their vote or not.

Installation
------------

[](#installation)

1. If you have installed a previous version of the Elggx Fivestar plugin disable the plugin in the admin section of your site and then remove the elggx\_fivestar folder from the mod directory of your Elgg installation,
2. Copy the elggx\_fivestar folder into the mod directory of your Elgg installation,
3. Enable the plugin in the admin section of your site,
4. Configure then the plugin settings. At least it's necessary to add the rating widget to some views for the Elggx Fivestar plugin being useable. Via the plugin settings you can add the rating widget to some pre-defined default views. In the following is described in detail how the configuration of the rating widget for more views works in detail.

How to customize it
-------------------

[](#how-to-customize-it)

To include the rating widget on your site after enabling the Elggx Fivestar plugin for the first time (or after upgrading from a version of Elggx Fivestar &lt; 1.8.0) you need to set the default views on Elggx Fivestar's plugin settings page in the admin section of your site. Click on "Set / Reset default views" and save the settings. There are already some default views defined in elggx\_fivestar/lib/functions.php where the rating widget will be included on your site, for example on blogs, pages and group discussions.

You can also configure on your own where the rating widget should appear. Either you can define additional views to include the widget on other pages or remove the rating widget from certain pages. If you are not happy with any of the default views and want to remove it you can do this in the plugin's setting page by removing the corresponding view. Or you can adjust the default views defined in elggx\_fivestar/lib/functions.php of Elggx Fivestar (function elggx\_fivestar\_defaults() starting at line 152) and then resetting the views on the settings page.

If you want to add the rating widget to a view you can also do this either via adding the view directly via the settings page or again by adjusting the default views in elggx\_fivestar/lib/functions.php. You will need to have some knowledge about the php/html code of the view you want to add the rating widget to be able able to define the correct position. The already defined default view should give you an idea how it works.

If you want to add a new view via the settings page the code to be included has to start with

```
    elggx_fivestar_view=

```

followed by the parameters to identify the view.

The method for adding the rating widget to a view as used by the defined default views or any other views you define via the settings page or elggx\_fivestar/lib/functions.php requires a distinct html or css tag to define the position the rating widget will be included on the corresponding page, either before or after this tag. Sometimes, this method might not be appropriate to define the exact position desired for the rating widget. There's also a second way to add the rating widget to a view that allows exact positioning. You need to modify the code of the view for this method to work.

Simply add the following at the appropriate place in your plugin code and adjust the parameters accordingly:

```
echo elgg_view("elggx_fivestar/voting", array(
    'entity' => $entity,
    'min' => true,
    'subclass' => 'fivestar_subclass',
    'outerId' => 'fivestar_rating_list',
    'ratingTextClass' => 'fivestar_rating_text'
));

```

The above code snippet includes all possible options to configure the voting widget. These are:

- 'entity' =&gt; $entity: This defines the entity to be voted on. The variable $entity must be assigned the correct Elgg entity in the code prior calling the voting widget.
- 'min' =&gt; true: If set to true, the voting widget will be bare only showing the stars to vote on and not the current voting stats (number of votes and average vote) for this entity.
- 'subclass' =&gt; 'fivestar\_subclass', 'outerId' =&gt; 'fivestar\_rating\_list', 'ratingTextClass' =&gt; 'fivestar\_rating\_text': These options allow you to configure the layout of the voting widget via CSS settings defined for example in Elggx Fivestar's css file (in elggx\_fivestar/views/default/elggx\_fivestar/css.php). The strings are the identifiers of the css classes and you have to define the classes prior using them.

The simpliest way to include the voting widget in the plugin code is by only giving the entity to be voted on as parameter:

```
    echo elgg_view("elggx_fivestar/voting", array('entity' => $entity));

```

In this case the default css layout of the voting widget is used. Still, you must assign the correct entity to the variable $entity in any case.

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 94.4% 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

Every ~112 days

Recently: every ~0 days

Total

17

Last Release

2095d ago

Major Versions

1.10.11 → 2.0.02015-09-27

1.10.x-dev → 2.0.12016-08-21

2.3.4 → 3.0.02019-04-10

2.3.x-dev → 3.0.12020-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdbf30b346be3828b40d37e87d3dfc0974c9481c41c8019a37a90d59580b031b?d=identicon)[iionly](/maintainers/iionly)

---

Top Contributors

[![iionly](https://avatars.githubusercontent.com/u/1773681?v=4)](https://github.com/iionly "iionly (17 commits)")[![oseg](https://avatars.githubusercontent.com/u/15892521?v=4)](https://github.com/oseg "oseg (1 commits)")

---

Tags

pluginelgg

### Embed Badge

![Health badge](/badges/iionly-elggx-fivestar/health.svg)

```
[![Health](https://phpackages.com/badges/iionly-elggx-fivestar/health.svg)](https://phpackages.com/packages/iionly-elggx-fivestar)
```

PHPackages © 2026

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