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.

 

Features:

  • 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)

Planned features:

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

 

Screenshots -

Blog:

Blog Post

 

Tidypic photo:

Fivestar tidypic

 

Polls:

Fivestar polls

 

Adding to views:

Adding or removing the widget from your views is done via the Fivestar settings. The text box under 'Add fivestar to a view:' is used to add 1 view per line. 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 using a dom library and the widget is inserted into the specified div, span etc. A handful of view configurations are included by default. To remove the widget from a view just delete the appropriate line in the config.

 

A sample line in the 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.

 

Note: This plugin is beta. I expect problems with some of the views on various custom sites. Please be prepared to post your issues in a clear and concise way so I can get the issues resolved.

 

Update 1.0.1b:

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

 

  • The previous version set the wrong view settings. This version will try to detect the incorrect settings and fix them however to be sure you have the correct default settings go to the Fivestar settings (under Tool Administration) and in the text box under 'Add fivestar to a view:' check that you have the following entry. You can copy paste all the lines below into your settings if you are unsure.

     

    view=object/blog, tag=div, attribute=class, attribute_value=contentWrapper singleview, before_html=<br />
    view=object/image, tag=div, attribute=id, attribute_value=tidypics_wrapper
    view=object/groupforumtopic, tag=div, attribute=class, attribute_value=search_listing, before_html=<br />
    view=forum/topicposts, tag=div, attribute=class, attribute_value=topic_post
    view=object/poll, tag=div, attribute=class, attribute_value=contentWrapper singleview, before_html=<br /><br />
    view=poll/listing, tag=div, attribute=class, attribute_value=search_listing, before_html=<br />
    view=object/page_top, tag=div, attribute=class, attribute_value=search_listing, before_html=<br />
    view=pages/pageprofile, tag=div, attribute=class, attribute_value=contentWrapper, before_html=<br />

  • Oh greate! now it is working for me in all categories.

    just one thing... when I try to disable the "Allow users to cancel/change their votes", (set to "no") and save it, it is not eccepting my election (turns to be "yes" again).

    thank u again for the work, Divagater.

  • It's still not showing the stars to rate. I looked at the source code and saw this in the javascript.

    http://soksabai.com/action/fivestar/rate
    I don't even have an "action" folder. I do have an "actions" folder. 
    The plugin looks great though, and I can't wait to have it working for me.
  • @Spacetraveler - there is no "action" folder, this is redirected to "engine/handlers/action_handler.php" by the mod rewrite rule in .htaccess.

  • Hi, this works fine for authenticated users but gets stuck "Saving..." for anonymous users viewing public blogs. This could do with a check to make sure the user is logged in :)

  • @Ian King

    Good call on the login check. I will add that and also check on the issue with anonymous users.

     

    @yoram

    I will check on the issue with saving that setting.

     

    ~Billy

  • how do i add it to files plugin? so it shows up next to pic mp3 and etc?

     

    thnx in advace

  • I was just wondering if the 'pageprofile' view is the one we discussed yesterday?

    if so, it isnt appearing for me for the profile picture rating. Any ideas what could be wrong?

    thanks in advance :)

    Dave

  • @nocountryMan

    Here are a couple view configs that will work for the files plugin. You can either have fivestar on the list view or on the file when viewing its details but not both right now. Found a small issue that will be resolved in the next release. Here are the views. Use one or the other:

     

    List view:

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

     

    Detail view:

    view=object/file, tag=div, attribute=class, attribute_value=filerepo_controls

     

    @Dave

    I have not posted a view for the profile page yet. I will get to that shortly.

  • @Divagater

    Thanx dude.. i figured the list view myself :D but had trouble we the detail view.. couldnt figure the attribute_value=filerepo_controls thingy.

    Thanx alot again mate ;)

  • I was wondering if this works also in the bookmark module... and then we can have also something like a "Digg" site.

  • Hi

    Do you think is possible to let only FRIENDS to vote?

    Thanks

  • @io

    Please link the module you are referring too. Searching plugins for bookmark on this site comes up with 0 results.

     

    @Jose

    So in your use case you have objects that are viewable by anyone but you would want only friends to vote? Because if the object is friends only then only friends could vote because no one else would see the item. Go ahead and outline in more detail what your use case is.

  • @Divagater, my stars aren't showing for users to rate. Any suggestions? Thanks.

  • Hi,

    Bit of a noob...

    What would be the code for adding this to group video, I 'm using the izap_videos plugin...

    I tried the following with no success...

    view=object/izap_videos, tag=div, attribute=id, attribute_value=izap_videos_wrapper

    Any help appreciated.

    Thanks.

  • @Divagater
    The idea is to vote on the members of the comunity, that olways can be seen in MEMBERS. So I would like that only friends could vote on members,

    Thanks

    jbroide

  • Great Plugin, love it ;)

    But it don´t be work with plugin FBconnect. If FBconnect is activated, you don´t see any stars...

    Peace,
    Cube

  • @Chalkiex

    Please link the plugin you want support for. Sadly elgg.org's way of releasing plugins makes finding things difficult. Searching on izap finds:

    izap_videos with better video player

    IZAP_videos Improved CSS and Layout

    izap_video plugin with on server and off server support! for elgg 1.5

    Video plugin from iZAP.

    Improved version of video plugin

     

    I have no idea what is what from that list hehe.

     

    @Jose Br

    Ok so we go to members section and we see a lit of members. You would like some stars to show on each member and if you are a friend of that member you can vote on them? i.e. vote on people? Kinda like Survivor? Should the member with the lowest vote be auto banned as well :)  Kidding aside, if you are not a friend of that person then what? You see their current star rating but you can't vote?

  • @Cube

    fbconnect kills plugins relying on the default recent version of jquery that elgg uses. The fbconnect author is overriding the default jquery version with an older version. This issue is discussed on the fbconnect forum. A user seems to have had success updating fbconnect to use the recent version of jquery by editing mod/fbconnect/views/default/page_elements/header.php and changing these 2 lines:

     

        <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.2.6.pack.js"></script>
        <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-personalized-1.5.3.packed.js"></script>^M

     

    To this:

     

    <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-1.3.2.min.js"></script>

    <script type="text/javascript" src="<?php echo $vars['url']; ?>vendors/jquery/jquery-ui-1.7.2.custom.min.js"></script>

     

    Looks like the fbconnect plugin is in need of an update.

    Cheers,

     

  • Great, thx to you Divagater.

  • very nice plugin!
    in comments under group discussion it appears with

    radio button and rate it! button
    5/5 stars (1 votes)

    is this a bug only for me?

  • @lord55

    The fivestar widget will degrade to a form/radio button based vote if javascript is not available. Is this only happening to you under group discussion? i.e. you see stars everywhere else?

  • yes i can see them ... this happens for me in comments

  • @Divagater

    Running 1.6.1

    The following is the more info from the izap_video plugin

    Version: 1.5-1.0
    Author: iZAP Team
    Copyright: (C) iZAP Web Solutions 2005-2009
    Licence: GNU General Public License (GPL) version 3
    I've also installed the latest versionof fivestar and works like a charm on everything but video, as the site is mainly video driven it would be awesome to have this piece of functionality working.
    Thanks for all your help and a very cool plugin.
    Chalkiex

Billy Gunn

Developer @ Arck Interactive

Stats

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

Other Projects

View Billy Gunn's plugins