Release Notes

The Fivestar voting plugin adds a clean, attractive voting widget to views in Elgg. Fivestar is built using the jQuery Star Rating widget.



  • jQuery rollover effects and AJAX no-reload voting.
  • Graceful degradation to an HTML rating form when JavaScript is turned off.
  • Configurable options to allow users to cancel or change their votes.
  • Insert the fivestar widget into any view via configuration options (requires an understanding of Elgg views and html) or by manually inserting the view code.

Planned features:

  • Configurable star sets.
  • Easier view configuration.
  • Userpoints integration.


Screenshots -


Blog Post


Tidypic photo:

Fivestar tidypic



Fivestar polls


Adding the widget:

Adding or removing the widget from your views can be done 2 different ways.


The 1st way is done via the Fivestar settings. The text box under 'Add fivestar to a view:' is used to add view configurations. The configuration can be complicated and requires an understanding of Elgg views and html. Firebug can be a big help.


The widget is inserted by intercepting the html that is about to be displayed to the user. The html is then parsed and the widget is inserted into the html at the specified location. A handful of view configurations are included by default. To remove the widget from a view just delete the appropriate config entry.


A sample config looks like:


view=object/blog, tag=div, attribute=class, attribute_value=contentWrapper singleview, before_html=<br />


This a comma delimited list of key/values and breaks down as follows.

  • view: The Elgg view that we want to insert the widget in.
  • tag: The tag we want to insert into. This can be a div, span, etc.
  • attribute: This will usually be id or class and helps to further identify the correct tag.
  • attribute_value: The value of the id or class specified by the attribute.
  • before_html: Additional html that is added before the widget for styling.
  • after_html: Additional html that is added after the widget for styling.


An alternative way to add the fivestar widget is to edit the view code of the plugin you want to vote on and add the following line. Where you add the line will determine where the widget is displayed.


<?php echo elgg_view("fivestar/fivestar", array('entity' => $vars['entity'])); ?>


This approach may be easier for some people but requires updating all your views after an Elgg upgrade.


Update 1.0.4:

  • Fixed bug with saving view configs where the before_html and after_html parameters were being removed by Elgg.


Update 1.0.3:

  • Updated to support manual insertion of the fivestar widget.
  • Removed view config for group comments.
  • Code cleanup.


Update 1.0.2:

  • Updated Fivestar to prevent anonymous voting. Anonymous users can see the current rating but they will not be able to vote.
  • Updated Fivestar settings page to make managing views a little easier.
  • When changing votes is not permitted, users who have voted will not be able to interact with the fivestar widget. Previously they could submit a vote and then get a message back saying they cannot vote again. Now they will not be able to submit a vote.


Update 1.0.1b:

  • Fixes a bug with the default view settings that prevented users from seeing the fivestar widget on any view.


  • @Divagater

    I suppose fix "Updated to support manual insertion of the fivestar widget" is relevant to me? :)

  • If you have recently saved your view config because you added or removed a new view you may have noticed the formatting on the widgets is a little off on some views. Any configs that have before_html= probably used to have before_html=<br />


    The html tags were stripped out by Elgg. I updated the code to prevent that but you will need to update your configs if you want to give a little space between the widget and the item its attached to.



  • @liri

    hehe you are quick. This release is all for you :)

  • @Divagater it works like a charm :-)

    will you introduce also a TOP RATED (

    This Week
    This Month
    This Year
    All Time


    page or a sidebox panel?

  • @lord55

    I definitely have plans to do that and have been thinking about the best approach. I had not considered doing it by time period. That adds a lot more complexity but would be pretty cool too. I am working on another new plugin at the moment but I will start planning this out.



  • @Chalkiex

    Here are some view configs for izap_videos.


    This one can be used for voting on videos in the list view:


    view=object/izap_videos, tag=div, attribute=class, attribute_value=contentWrapper, before_html=<br />


    When you are in the player view there are 2 possibilities. The widget can be centered just under the player with this config:


    view=object/play, tag=div, attribute=class, attribute_value=contentWrapper, before_html=<br /><br />


    Or, the widget can appear under the user icon in the video description block with this config:


    view=object/play, tag=div, attribute=class, attribute_value=generic_comment, before_html=<br /><br />


    Use the first config object/izap_videos and one or the other of the object/play configs (not both).



  • @fusion

    works like a charm, cheers dude.


  • @Divagater

    indeed, I'll check it out. thanks.

  • Hi

    It is possible to limit votation to friends?



  • Hi

    Finally I solved the problem to let only friends to vote.
    I am not an expert in elgg so be carefull if you use this modification

    IN start.php after

    function fivestar_vote($guid, $vote) {

            $entity = get_entity($guid);       
            $msg = null;

    I´ve added this lines

            if ($entity->owner_guid ==0){
             // is a user.
            else {          
            if  (!$entityOwner->isfriend()){

    so if the object being voted is not owned by a friend, the user will get an message   elgg_echo('fivestar:notafriend')


    IMPORTANT: You also have to add 'fivestar:notafriend'  in the language file



  • Hi

    I found a little bug in the translation files

    In \fivestar\views\default\fivestar\fivestar.php file , about line 44

    <span id="fivestar-rating-<?php echo $guid; ?>"><?php echo $rating['rating']; ?></span>/<?php echo $stars; ?> stars (<span id="fivestar-votes-<?php echo $guid; ?>"><?php echo $rating['votes']; ?></span> votes)

    The words stars and votes are not refered to the language files.



  • Hi, Really it's a great plugin..................

    I am getting some problem with this plugin i.e

    After selecting the star for rating it's showing saving...................After that nothing is happening(remains like that only).Once if i refresh the browser then that time it's showing the correct results.

    I am using this plugin with elgg1.5(on Linux centos Operating system) and i updated the jquery .js files (jquery 1.3.2.min.js,jquery-ui-1.7.2.custom.min.js).

    Can anyone pls help me out how to resolve this issue.



  • What version of IE and does it happen every where you have the widget displayed?

  • Using IE 7.0 and it' s happening in all the places..........

    I am using this plugin for Blogs in my site.

  • I don't have access to IE 7 but I just tested on IE 8 and it works fine.

  • I have tried to add event_calendar support - but it does not work:

    view=object/event_calendar, tag=div, attribute=class, attribute_value=contentWrapper singleview, before_html=<br />

    any help would be great :-)

  • You were close. Firebug's inspect tool would have shown you the correct div class. Here you go:


    view=object/event_calendar, tag=div, attribute=class, attribute_value=search_listing, before_html=<br />



  • has anyone tried this on 1.5 and does it work

  • There have been several topics about fivestar on 1.5. 1.5 itself is supported however the version of jquery that ships with 1.5 is not. You need to use the version of jquery that ships with 1.6. Speficially jquery 1.3.2.min.js and jquery-ui-1.7.2.custom.min.js. These files have to replace the jquery and jquery-ui in 1.5. They can not be used in addition to.

  • Great looking plugin and it seems to do the job. I have it working on TidyPics in elgg 1.6.1 ... BUT when i try and click "Change Fivestar Settings" i get sent to a broken page which seems to be a 404 error. I checked and it seems the page is sitting in its directory but it still brings up a 404 error.

    This is on a fresh install with hardly any plugins installed other than the core plugins.

    Anyone else get this error ??

  • @Sim2k

    Run http://your.domain.whatever/upgrade.php then try hitting the settings page again. If that doesn't work shoot me the URL that the "Change Fivestar Settings" link is sending you to. I just need everything after the hostname.

  • @Divagater

    This is the address ...

    This is what i get ...

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/ mod_perl/2.0.4 Perl/v5.8.8 Server at Port 80


  • <!-- output the actual comment -->@Divagater

    by the way , what does the upgrade link do??? My site is a fresh elgg 1.6.1 install. It broke my site as it said there was a conflict. I fixed the problem but i had no issue before i ran the upgrade link.

  • upgrade clears the simplecatch. When you run the upgrade it is also a good idea to clear your browser history. Remember the extra folder that you had to make during the install of elgg. all of the simple cache info goes there. During times that you are developing plugins and installing them, you can go to your "site Administration" page and turn off simple cache and view file path cache.   Run the upgrade and you should then see any changes that you make to the site, just by refreshing your browsers.

  • @Sim2K

    Ok, so the 404 has nothing to do with fivestar and you need to look at your logs to see what is throwing the 500. Most likely you are with a hosting provider using something like cpanel or plesk and it doesn't like the permissions on the plugin files. The web server error logs should reveal this.

Billy Gunn

Developer @ Arck Interactive


  • Category: Misc
  • License: GNU General Public License (GPL) version 2
  • Updated: 2014-11-17
  • Downloads: 7956
  • Recommendations: 16

Other Projects

View Billy Gunn's plugins