| Version | Date | Author | Description |
|---|---|---|---|
| 1.00b | 6-May-2011 | Neil Weinstock | First "official" release |
These instructions will help you install the template'StarRater' on your wiki quickly and correctly.
Perform the following steps:
HTML Source for Template:StarRater
| Name | Type | Default | Description |
|---|---|---|---|
| property | str? | "star_data" | Name of the property in which the voting data will be stored. If you plan to have multiple StarRaters on a page, you should assign each one a unique property name to avoid collisions, otherwise, just leave this blank. The ID of the page is always tacked onto the end of the property name, so you can safely store the ratings data from multiple pages in the same page, without collision. |
| msg | str? | <none> or "Rate this page:" if page==true | This is the little "please vote" message that gets placed above the stars. If this is not specified, and page==true (see below), this value will default to "Rate this page:". If the current user does not have voting rights, then the message is not displayed |
| page | bool? | false | Page mode. This is a convenience for when you use this as a page rating mechanism. If true, then two things happen:
|
| path | str? | page.path | Path of the page where the voting data property will be stored. |
The description above includes a disclaimer that states that this is intended for "light, non-critical use". There are three reasons for this: security, reliability, and scaleability.
The page property used to store the ratings data must be updatable by the user. That means that the user is free, if he or she wishes, to go and mess with out. Most users neither know how to do this nor care, but the bottom line is that these ratings are inherently insecure, and that is a prime reason for the "non-critical" recommendation.
You can improve your situation a bit by locating the property (using the path argument) on a separate page. That gives you the option of protecting the page containing the ratings, although you may not always want this.
Finally, I have (for now) put the property into the namespace where it is accessible by going to the "Set Page Properties" page from the "More" menu. This makes it much easier to see what's going on (including seeing who voted how), and also to delete the property if you want to reset the ratings. This makes it easier to go in and hack the ratings. If folks want, I'll add an option one day to put the property into a "hidden" namespace, where it'll be more resistant to casual hackers, but also more difficult to go and fix if problems arise.
If a lot of folks are trying to update the ratings at the same time, it'd probably be pretty easy to cause updates to fail. This won't bring down the system (or even corrupt the ratings), but it will cause error messages to show to the user. This is because the data storage method does not really support a proper atomic read/modify/write operation.
Also, this has been tested on a good number of browsers, but browser incompatibility is always a possibility. If so, please report the problem to the forum thread.
This template has not been tested when a very large number of people vote. I don't know if it'll run into problems or not. It shouldn't, but you never know!
The page rater at the top right corner of the page is done like this:
StarRater{page:true};
Its data is stored in the "star_data" property (which you can see if you go to view the page properties for this page).
Here's a non-page version with a custom message:
StarRater("docs", "Rate the documentation:");
This one also uses a different property name, to avoid colliding with the page rating.
You get the idea!
The Star Rater CSS is based on the Komodo CSS Star Rater.
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by