Wiki4Games:RatingBar

From Wiki4Games
Jump to: navigation, search
Note: this extension was permanently disabled on July 27, 2011. So the examples provided on this page don't work anymore here.

RatingBar is an extension for MediaWiki developed by Franck Dernoncourt and Patheticcockroach for Wiki4Games.com.

This extension was discontinued and replaced by W4G Rating Bar.

Contents

Download

You can download the extension here:

File list

Important: the versions of these files available on the wiki aren't always the latest versions, people willing to install the extension should rather refer to the download section to grab the latest version, or to the Community version files at this end of this section.


No more in use:

Community version

We're not currently actively maintaining the extension, apart from security updates if needed. Yet quite a few users contributed to various bug-fixes that we didn't have the time to implement into our official releases. So we decided to make a community version, where users can directly edit the files without us checking on the updates. The good thing is that the updated files are directly made available for download. The drawback is that WE DO NOT check the code that goes there (even if sometimes we post code ourselves it doesn't mean we checked it, just we applied a user-submitted patch), so... be careful.

To do, changelog

See Wiki4Games:RatingBar/todo and Wiki4Games:RatingBar/changelog

To be done before release

  • Update version number in ratingbar.php (for display on Special:Version)
  • Clear config.php (password and such)
  • Replace all Error: ".mysql_error()' with die("MySQL query failed")

Usage for w4g_ratingbar hook

Display rating bar

<w4g_ratingbar idpage="Wiki4Games:RatingBar"/>

<w4g_ratingbar idpage="Wiki4Games:RatingBar" />

Note: The idpage parameter is optional. If not specified, wgPageName will be used as the idpage.

For stars instead of the bar just add
style="stars"

Usages for w4g_ratinglist hook

Display top rated pages

<w4g_ratinglist numberofitems="10"/>

<w4g_ratinglist numberofitems="10"/>

Within a period of time

<w4g_ratinglist numberofitems ="3" numberofdays="10"/>

<w4g_ratinglist numberofitems ="3" numberofdays="10"/>

Hiding the number of votes

<w4g_ratinglist numberofitems="10" hidenumberofvotes/>

<w4g_ratinglist numberofitems="10" hidenumberofvotes/>

Having a minimum number of votes

<w4g_ratinglist numberofitems="6" minimumvotenumber="3"/>

<w4g_ratinglist numberofitems="6" minimumvotenumber="3"/>

Within a category

<w4g_ratinglist numberofitems="5" category="Windows_games"/>

<w4g_ratinglist numberofitems="5" category="Windows_games"/>

Note: The category can be written the spaces and underscores in the category name are interchangeable: <w4g_ratinglist numberofitems="5" category="Windows_games"/> will give the same result as <w4g_ratinglist numberofitems="5" category="Windows games"/>.


Display user's votes

Note for the admins: $allow_display_user_votes in config.php should be set to true to activate this function. If you only want users to be able to display their own votes, set $allow_display_user_own_votes_only in config.php to true.

Without limit on numbers of items

<w4g_ratinglist user="Franck Dernoncourt"/>

<w4g_ratinglist user="Franck Dernoncourt"/>

With limit on numbers of items

<w4g_ratinglist user="Franck Dernoncourt" numberofitems="2"/>

<w4g_ratinglist user="Franck Dernoncourt" numberofitems="2"/>

With timestamp

<w4g_ratinglist user="Franck Dernoncourt" displaytimestamp/>

<w4g_ratinglist user="Franck Dernoncourt" displaytimestamp/>

Within a period of time

<w4g_ratinglist user="Franck Dernoncourt" numberofdays="10"/>

<w4g_ratinglist user="Franck Dernoncourt" numberofdays="10"/>

Within a category

<w4g_ratinglist user="Franck Dernoncourt" category="2006 games"/>

<w4g_ratinglist user="Franck Dernoncourt" category="2006 games"/>

Display top voters

<w4g_ratinglist topvoters/>

<w4g_ratinglist topvoters/>

With limit on numbers of items

<w4g_ratinglist topvoters="3"/>

<w4g_ratinglist topvoters="3"/>

Within a period of time

<w4g_ratinglist topvoters="3" numberofdays="10"/>

<w4g_ratinglist topvoters="3" numberofdays="10"/>

Within a category

<w4g_ratinglist topvoters="5" category="2006 games"/>

<w4g_ratinglist topvoters="5" category="2006 games"/>

List voters for one page

<w4g_ratinglist idpage="Driver: Parallel Lines" displayvoters/>

<w4g_ratinglist idpage="Driver: Parallel Lines" displayvoters/> Note for the admins: $allow_display_voters_for_one_page in config.php should be set to true to activate this function.

With limit on numbers of items

<w4g_ratinglist idpage="Age of Empires" numberofitems="3" displayvoters/>

<w4g_ratinglist idpage="Age of Empires" numberofitems="3" displayvoters/>

Within a period of time

<w4g_ratinglist idpage="Unreal Tournament 3" numberofdays="5" displayvoters/>

<w4g_ratinglist idpage="Unreal Tournament 3" numberofdays="5" displayvoters/>

Latest votes

<w4g_ratinglist latestvotes="5"/>

<w4g_ratinglist latestvotes="5"/> Note: If latestvotes is set to 0 (<w4g_ratinglist latestvotes="5"/>) or unspecified (<w4g_ratinglist latestvotes/>), it will list all votes.
Note for the admins: $allow_display_latest_votes in config.php should be set to true to activate this function.

Within a category

<w4g_ratinglist latestvotes="5" category="Nintendo_64_games"/>

<w4g_ratinglist latestvotes="5" category="Nintendo_64_games"/>

Titles

If you want not to display title, add notitle as a parameter. For example:

<w4g_ratinglist latestvotes="5" notitle/>

<w4g_ratinglist latestvotes="5" notitle/>

Unsortable table

If you want not to have an unsortable table, add nosort as a parameter. For example:

<w4g_ratinglist latestvotes="5" nosort/>

<w4g_ratinglist latestvotes="5" nosort/>