Extension:Ratings

Note: this extension is not finished enough for usage on production wikis. Some outstanding issues need to be resolved first.

The Ratings extension provides a tag extension that when embedded in a page allows users to rate different "properties" of the page.

The main reason for creating a new extension is that Rating Bar has been replaced by W4G Rating Bar, which is not open source, so does not allow for adding any improvements. Other rating extensions I looked at do not allow doing the things I want to be able to do and are not written in a way that easily allows changing this.

Version
Do note this extension is still in alpha stage. Although core functionality is mostly working, some things still need to be implemented, and many things are in need of some polishing. A particular thing lacking decent support now is handling of the rating control when the user is not allowed to rate. There are also significant issues with positioning of the rating stars. This is some lame CSS issue, help with it is welcome.

Some feature that might be added in the feature is displaying lists of votes and lists of pages based on votes. Integration with SMW is also possible. And vote summaries can be cached better.

Download
No releases are available yet.

You can also get the code directly from SVN. Tags can be obtained via

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/tags/extensions/Ratings/REL_version

Where 'version' is the version number of the tag, such as 0_1 (see the available tags). The latest code can be obtained from trunk:

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Ratings/

Ratings requires Validator 0.4.5 or above in order to work. A compatible copy of Validator always comes bundled with the regular releases, and is automatically loaded by Ratings, so you do not need to worry about it when using one of these. If you are getting the code from SVN, make sure you also get a copy of Validator (see here for instructions).

Installation
Once you have downloaded the code, place the Ratings and Validator directories within your MediaWiki 'extensions' directory. Then add the following code to your LocalSettings.php file:

Note that you need to place this code before the inclusion of any extensions depending on Validator.

Starrating
Description: Displays a simple star rating control allowing the user to rate a certain property of a page. The current vote of the user will be displayed initially when he already voted.

Implemented as both parser function and as tag extension.

Syntax
Tag extension with only the required parameters.



Tag extension with all parameters.



Tag extension with all parameters using the default parameter notation.

{tag, Text}

Parser function with only the required parameters.

Parser function with all parameters.

Parser function with all parameters using the default parameter notation.

Votesummary
Description: Displays a short summary of the votes for the specified page and property pair.

Implemented as both parser function and as tag extension.

Syntax
Tag extension with only the required parameters.



Tag extension with all parameters.



Tag extension with all parameters using the default parameter notation.

{tag, Text}

Parser function with only the required parameters.

Parser function with all parameters.

Parser function with all parameters using the default parameter notation.

Bugs and patches
If you found some bug and fixed it, please create a patch by going to the "Ratings" directory, and typing:

svn diff >descriptivename.patch

Then upload it somewhere and link to it from the talk page. Bug reports should also be added here. You can also send them to Jeroen De Dauw, jeroendedauw -at- gmail.com.

Feature requests
Feel free to add feature requests to the discussion page.

Translating
Translation of Ratings is done through translatewiki.net. The translation for this extension can be found here. To add language values or change existing ones, you should create an account on translatewiki.net, then request permission from the administrators to translate a certain language or languages on this page (this is a very simple process). Once you have permission for a given language, you can log in and add or edit whatever messages you want to in that language.

Translations for this documentation, especially the extension description, are also welcome.

Authors
Ratings has been written by Jeroen De Dauw.