By Paul
For some purposes, just having a generic website rating isn't enough. You may wish to have several features of each article rated. You can do this by adding custom rating fields.
A custom rating field can be added in the same way as any other new article field, the only difference in the process being that you must give it a name that includes 'rating' in it. For example, 'stylerating'. Add your new field to the voting template or wherever else you wish to put it... the only requirement is that it must be in a form that submits to vote.php in the same way as the current votevalue does. Just copy the existing vote option and change votevalue to stylerating.
In your edit articles template, be sure you either make stylerating a hidden field or put it in the admin-only section so that article owners can't cheat.
In your articles display templates (and everwhere else that article variables work and you wish to show the ratings), you will need to make note of three separate article variables you can use for data related to your new rating field. Using the example of a field stylerating, you will have {ARTICLESTYLERATINGRATING}, {ARTICLESTYLERATINGVOTES} and {ARTICLESTYLERATINGSTARS}. Note the repetition of the word rating in the first one... this displays the actual average rating based on votes so far. {ARTICLESTYLERATINGVOTES} contains the number of votes cast so far.
{ARTICLESTYLERATINGSTARS} shows the number of stars graphically. Note that if you wish to show half-star images, you should save these as stars0-5.gif, stars1-5.gif, etc in the images subdirectory of your templates directory (when named this way, they'll automatically be used).
In your voting form, if you wish to let people not fill in that item then put a blank value option above the 1,2,3 etc. For example, <option value="">don't rate this critera</option>
To make showing/editing of individual votes work for custom rating fields, pass &field=ratingfieldname at the end of the normal show votes url.
To do custom ratings for members, use memid={MEMBERID} in place of id={ARTICLEID} in your form.
If using the rating comments switch in 5.1.0+:
Those of you including comments with ratings will probably want to display a person's full set of ratings plus their comment in one spot. The toplist in the default "vote" template does this for you, but it doesn't include your custom rating fields. To include the stars graphic for your custom rating fields, add
Your Custom Field: {RATINGGETCUSTOMSTARS[fieldname]}
for each field.

Print
Rate
E-Mail