Rating and voting
From Wikiexpert
You can easily let users vote or tate your content.
Input
Current user rating: 100% (1 votes)
You need to enable Javascript to vote
Reporting/Output
All time (Top 10)| Page | Rating | Votes # |
| Knowledge Management | 100% | 1 |
| How to add google maps to mediawiki | 100% | 1 |
| Stats | 100% | 1 |
| Thank you | 100% | 1 |
| How I Get To Work | 100% | 1 |
| Ask the expert | 100% | 1 |
| 100% | 1 | |
| Marketing | 100% | 1 |
| A nice hot towel | 100% | 1 |
| Google wave | 100% | 1 |
RatingBar is an extension for MediaWiki developed by Franck Dernoncourt and Patheticcockroach for Wiki4Games.com.
Display rating bar
<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 addstyle="stars"
Usages for w4g_ratinglist hook
Display top rated pages
<w4g_ratinglist numberofitems="10"/>All time (Top 10)
| Page | Rating | Votes # |
| Knowledge Management | 100% | 1 |
| How to add google maps to mediawiki | 100% | 1 |
| Stats | 100% | 1 |
| Thank you | 100% | 1 |
| How I Get To Work | 100% | 1 |
| Ask the expert | 100% | 1 |
| 100% | 1 | |
| Marketing | 100% | 1 |
| A nice hot towel | 100% | 1 |
| Google wave | 100% | 1 |
Within a period of time
<w4g_ratinglist numberofitems ="3" numberofdays="10"/>Last 10 days (Top 3)
| Page | Rating | Votes # |
Hiding the number of votes
<w4g_ratinglist numberofitems="10" hidenumberofvotes/>All time (Top 10)
| Page | Rating |
| Knowledge Management | 100% |
| How to add google maps to mediawiki | 100% |
| Stats | 100% |
| Thank you | 100% |
| How I Get To Work | 100% |
| Ask the expert | 100% |
| 100% | |
| Marketing | 100% |
| A nice hot towel | 100% |
| Google wave | 100% |
Having a minimum number of votes
<w4g_ratinglist numberofitems="6" minimumvotenumber="3"/>All time (Top 6)
| Page | Rating | Votes # |
Within a category
<w4g_ratinglist numberofitems="5" category="Windows_games"/>All time (Top 5)
| Page | Rating | Votes # |
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"/>
The user Franck Dernoncourt doesn't exist.
With limit on numbers of items
<w4g_ratinglist user="Franck Dernoncourt" numberofitems="2"/>
The user Franck Dernoncourt doesn't exist.
With timestamp
<w4g_ratinglist user="Franck Dernoncourt" displaytimestamp/>
The user Franck Dernoncourt doesn't exist.
Within a period of time
<w4g_ratinglist user="Franck Dernoncourt" numberofdays="10"/>
The user Franck Dernoncourt doesn't exist.
Within a category
<w4g_ratinglist user="Franck Dernoncourt" category="2006 games"/>
The user Franck Dernoncourt doesn't exist.
Display top voters
<w4g_ratinglist topvoters/>Top 20 voters all time
| User | Average rating | Votes |
| Wikiexpert | 100% | 20 |
With limit on numbers of items
<w4g_ratinglist topvoters="3"/>Top 3 voters all time
| User | Average rating | Votes |
| Wikiexpert | 100% | 20 |
Within a period of time
<w4g_ratinglist topvoters="3" numberofdays="10"/>Top 3 voters over the last 10 days
| User | Average rating | Votes |
Within a category
<w4g_ratinglist topvoters="5" category="2006 games"/>Top 5 voters all time
| User | Average rating | Votes |
List voters for one page
<w4g_ratinglist idpage="Driver: Parallel Lines" displayvoters/>Voters for Driver: Parallel Lines
| User | Rating | Time |
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/>Voters for Age of Empires
| User | Rating | Time |
Within a period of time
<w4g_ratinglist idpage="Unreal Tournament 3" numberofdays="5" displayvoters/>Voters for Unreal Tournament 3
| User | Rating | Time |
Latest votes
<w4g_ratinglist latestvotes="5"/>Latest votes (5)
| Time | Page | Rating | User |
| March 24, 2010, 11:22 am | 100% | Wikiexpert | |
| February 26, 2010, 8:10 am | Rating and voting | 100% | Wikiexpert |
| February 23, 2010, 3:40 pm | What is a blog | 100% | Wikiexpert |
| January 13, 2010, 9:15 am | 100% | Wikiexpert | |
| December 15, 2009, 12:10 pm | Google wave | 100% | Wikiexpert |
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"/>Latest votes (5)
| Time | Page | Rating | User |
Titles
If you want not to display title, add notitle as a parameter. For example:
<w4g_ratinglist latestvotes="5" notitle/>
| Time | Page | Rating | User |
| March 24, 2010, 11:22 am | 100% | Wikiexpert | |
| February 26, 2010, 8:10 am | Rating and voting | 100% | Wikiexpert |
| February 23, 2010, 3:40 pm | What is a blog | 100% | Wikiexpert |
| January 13, 2010, 9:15 am | 100% | Wikiexpert | |
| December 15, 2009, 12:10 pm | Google wave | 100% | Wikiexpert |
Unsortable table
If you want not to have an unsortable table, add nosort as a parameter. For example:
<w4g_ratinglist latestvotes="5" nosort/>Latest votes (5)
| Time | Page | Rating | User |
| March 24, 2010, 11:22 am | 100% | Wikiexpert | |
| February 26, 2010, 8:10 am | Rating and voting | 100% | Wikiexpert |
| February 23, 2010, 3:40 pm | What is a blog | 100% | Wikiexpert |
| January 13, 2010, 9:15 am | 100% | Wikiexpert | |
| December 15, 2009, 12:10 pm | Google wave | 100% | Wikiexpert |
