Red Queen Review Engine User Manual

RATING TYPES

Adjust Text:  a a a a
« Table of Contents   |   Obtain Red Queen »


RATING TYPES

Each of the 3 possible Thing types managed by Red Queen--Items, Members, and Suppliers-- can be reviewed and rated. The review input field primarily consists of text input, and will not be discussed further here. Instead we focus on the possible ways in which a Thing can be rated numerically. Numerical ratings are defined on a per Container basis, so that all Things residing in the same Container can be rated, and then compared to one another, in the same way. As an example, say we want Members to provide a series of ratings for an Item in the Category "Ice Hockey/Equipment/Pucks". Clearly the Item is going to be a puck if it is in this Category, so we might want Members reviewing the puck brand to score it according to, let's say, these criteria (click on each menu to see the range of possible ratings for each criteria):

1. How do you rate Superior Puck?
2. Would you recommend it to a friend?
3. How would you rate the Value For Money?

How do we go about assigning these rating possibilities to our Category? The actual process of assigning rating attributes is covered in Editable Non-Category Fields. This assumes, however, that all the relevant rating attributes are available for assignment to the Category. Here we look at the process of creating these attributes from scratch.

Before we do that, however, a word about how Rating Types are used. Each time a reviewer submits a collection of rating values, the individual values are entered into the RatingValue table along with information on the Rating Type with which they are associated. Once a collection of these Rating Value records has been created for a given Rating Type, averages can be calculated. This allows the average value for a given Rating Type for a given Thing in a given Container to be compared to other Things in the same Container. Ordered lists of these records can be constructed, allowing users to look up the "Item in the Ice Hockey/Equipment/Pucks Category with the highest Value For Money attribute". That is, the user can search for the ice hockey puck that offers the best bang for the buck. Or they can search for the ice hockey puck that is the LEAST recommended so they can avoid it. These rating statistics are calculated for each of the 3 Thing types, so you can do things like connect Red Queen to your forum member database and let your Members battle it out for the position of "Most Knowledgeable Sports Historian", or whatever else it might be of a dozen other things that your Members are apt to be good at. With a little imagination you can offer you Members the chance to participate in something truly unique to your site.

Creating a Rating Type

Rating attributes, or Rating Types, as we call them, are implemented as records of the RatingType table. These are intended to be self-contained entities that can be sufficiently generalized so as to allow assignment to any Container and Container Type, or they can be so specific that only one Container from one Container Type might be able to make use of them. The manifestation of a Rating Type is a question attached to a menu of selectable rating values. So it is the question and the representation of the rating values that determines how general the type is, and how widely it can be used across both Containers and Container Types. In the example show above, where a puck can be rated, the third rating question and the representation of the rating values is very general, relating as it does to Value For Money. So it could be used to rate Items, Suppliers, and even Members. Despite appearances, so could the first question, which derives from the special rating attribute whose associated question is "How do you rate [* thing *]?". When placed on the page [* thing *] is replaced by name of the Thing being rated. On the other hand, the second question appearing in the example above is "Would you recommend it to a friend?" This suggests the Thing being rated is inanimate, so it would probably not be a good fit for any Team, which contains actual people. It might be used to describe a Supplier if a Supplier is a company, but mostly it is the sort of question you would use when referring to an Item.

To create a new Rating Type we go to the Add RatingType page by first visiting the Database control panel and using the Database menu on the left of the page to pull up the Add RatingType page. The form elements presented for a record addition will look something like the following (example values have been supplied sowing how we would create the third Rating Type shown above):

Type A value will be assigned
Attribute
Question
Description
Rating Scale
Level
Default Choice
Choice N/A
Choice 1
Choice 2
Choice 3
Choice 4
Choice 5
Choice 6
Choice 7
Choice 8
Choice 9
Choice 10
Rank DESC
Rank ASC

Here we are defining a Rating Type which can have 5 possible ratings ranging from 1 to 5. Every Rating Type must have one or more possible values to select from in the range 1 to N, where N itself can range from 1 to 10 (the default is N = 5). Here are the fields in a little more detail:

Type
The Type field corresponds to the PRIMARY KEY for the RatingType table and is an integer column. It is also an AUTO INCREMENT column and a value will automatically be assigned (one greater than the last such value assigned to the column) each time a new record is created. The column is RatingType.id

Attribute
The Attribute field is the human-readable identifier for the Rating Type, a short string which can be placed next to a displayed rating value so as to indicate its meaning. The first letter of each words in this string should probably be capitalized so that the attribute stands out when used as a label. The column is RatingType.attribute

Question
The Question field holds the question used to prompt the reviewer for their selection of a rating value. It conveys the meaning of the Rating Type to which they are ascribing a value. If you make the question very general you will be able to use the Rating Type for many rating purposes. If you narrow its meaning you reduce the possibilities, but you tighten up on the interpretation of the rating, and sometimes this is the more important thing. The column is RatingType.question

Description
The Description field is used to expand upon the meaning of the Rating Type. It is an entirely optional field. The column is RatingType.description

Rating Scale
The Rating Scale field holds the number of rating values that can be selected from when answering the Question associated with the Rating Type. If the Rating Scale is 10, then you will need to provide values for the 10 fields Choice 1 to Choice 10. The column is RatingType.rating_scale

Level
The Level field is an integer which controls the order in which the rating questions will be placed on the page. To get a Rating Type higher on the page, increase the value of its Level. Note, however, that this affects the ordering of ALL collections of Rating Types (i.e. Rating Templates) that contain the given Rating Type. How might you use the Level field effectively? If you have a collection of 10 generalized Rating Types which you want ALWAYS to appear first, assign them a set of VERY high values, such as 1001,1002,...,1010. Then, whenever you add a new set of more specialized Rating Types with related meanings, you could cluster their Level values so when they appear together their ordering will be as you specified (though lower in the page than the generalized types). For example, if adding 3 new specific and related Rating Types, you might use the Level values 101,102,103 to control the order in which they appear. The column is RatingType.level

Default Choice
The optional Default Choice is the rating value that will be selected automatically when the rating value menu is placed on the page. If a Default Choice is not assigned, no rating value will be selected and the reviewer will be forced to select one (so generally you will NOT want to supply a Default Choice). The column is RatingType.default_choice

Choice N/A
If you want to allow for the possibility that the reviewer does not know how to answer the Question associated with the Rating Type, then offer a "Not Applicable" option. This corresponds to a zero rating value that does not enter into any averages calculated for the Rating Type. The column is RatingType.choice_0

Choice 1 ... Choice 10
For each of the possible numerical rating values that can be selected, provide a short less-ambigious string to appear in the rating value menu. Thus "It Stinks" is more meaningful than "1 star", though you could certainly use the latter if you want. The column is RatingType.choice_N if the field is Choice N.

Rank DESC
The Rank DESC field holds a short string which indicates that when a collection of rated Things is to be ordered according to the current Rating Type, it will be ordered from the Thing which has the HIGHEST rating to the Thing which has the LOWEST rating. So the value of this field might be "Best Value" if the Rating Type relates to the "Value" of the Thing. The column is RatingType.rank_desc

Rank ASC
The Rank ASC field holds a short string which indicates that when a collection of rated Things is to be ordered according to the current Rating Type, it will be ordered from the Thing which has the LOWEST rating to the Thing which has the HIGHEST rating. So the value of this field might be "Worst Value" if the Rating Type relates to the "Value" of the Thing. The column is RatingType.rank_asc

Modifying a Rating Type

The rule about modifying a Rating Type is: Don't do it.

Once you've created a Rating Type and have started to collect ratings with it, you have effectively cast the meaning of the Rating Type in stone. If you decide you want to change the Question associated with the Rating Type, you can ONLY do this if the new Question has the same meaning as the old Question. Otherwise when the previously-collected rating values for the Rating Type are displayed, they are going to offer an incorrect interpretation of the information supplied by the reviewer. So put some thought into the construction of your Rating Type Question. You really don't want to have to change it later. Likewise, don't be tempted to change the Rating Scale. If you do, the rating values will all be incorrectly interpreted--either uniformly too low, or too high.

If you find yourself tempted to modify a Rating Type so that you can use it someplace that you had not previously anticipated, create a new Rating Type instead, and use that. You are better off defining new types than risking the corruption of existing types.

Deleting a Rating Type

You can delete a Rating Type if you wish.

What happens if you do delete a Rating Type? It depends. If any Rating Template exists for which the deleted Rating Type was the only element, then things are not going to work so well for the Container that uses that (now empty) Rating Template. So try not to get yourself into that situation. If instead the deleted Rating Type belongs to a Rating Template with several Rating Types in it, then nothing serious will happen--the displayed ratings will simply not allude to the deleted Rating Type. In general, though, try to settle on a good Rating Template before you solicit ratings for it. Modifying any aspect of a Rating Template late in the game is never at good idea.

The Overall Rating Type

There is one Rating Type present in your RatingType table from the start. This is the Overall Rating Type. If you look at the database record by listing the Rating Type records you will see something like the following:

id 1
attribute Overall
question How do you rate [* thing *]?
description NULL
rating_scale 5
level 1
default_choice 0
choice_0 NULL
choice_1 1 star
choice_2 2 stars
choice_3 3 stars
choice_4 4 stars
choice_5 5 stars
choice_6 NULL
choice_7 NULL
choice_8 NULL
choice_9 NULL
choice_10 NULL
rank_desc Highest Rating
rank_asc Lowest Rating

As mentioned previously, when the associated question for the Overall Rating Type is placed on the page--"How do you rate [* thing *]?"--the spacial tag [* thing *] is replaced by the value of the Thing.known_as column. This Rating Type is used as a fallback type--when no Rating Types have been assigned to the Rating Template associated with a Container, the Overall Rating Type is inherited by default. So do NOT delete this Rating Type from your RatingType table. To avoid using it, simply assign one or more other Rating Types to a Container.

Inheriting Rating Types

Unless one or more Rating Types have been explicitly assigned to a given Container--that is, the Rating Template for the Container has been explicitly populated--Red Queen will check whether the Rating Template for the immediate Parent Container has been populated. If it has been, then that Rating Template will be used for the Container. If not, a check will be made for the next Parent Container. Unless a populated Rating Template is found, this process will continue all the way to the topmost level of the Container Branch. At that point the effective Rating Template for the original Container will be assumed to consist solely of the Overall Rating Type.

What this means is that you may not need to explicitly assign a Rating Template to Subcontainers if the inherited Rating Template does the job. It also means that if you make use of inheritance, you need to be wary of the fact that a change in any given Rating Template will propagate down to all Rating Templates in Containers that inherit from those above it.

Shared Rating Types

Sometimes you might not want to give each Container its own distinct set of rating attributes. It might make more sense to treat every single Thing in all Containers exactly the same way. This can be done by going to the Shared Reviews page of the Configure control panel. There you can select a suitable set of rating attributes to be applied across all Containers. In this case, reviews can also be shared between Containers, and a review added to the Sports category, say, will also show up in the Football category for the same reviewed item.

This concept of shared reviews and rating types is thus very useful when you have Things that commonly appear in more than one Container. It allows you to fill your review pages much more quickly than if you had unique rating attributes for each Container (in which case the presence of non-matched rating attributes precludes the possibility of easily merging reviews from different Containers.

So, if you run a site dedicated to car reviews, and each model appears in multiple categories (say by Maker, Year of Release, Type, etc) then the use of Shared Rating Types might make sense. On the other hand, if you want unique rating attributes for each car Type, you'll want to avoid the Shared Rating Types option. Decide on the use or non-use of Shared Rating Types early on, before your review section goes lives. You will NOT want to change your mind later on. If you do, expect big headaches when your recorded rating attributes no longer fit the method being employed (and don't expect help fixing the mess!).

Displayed Rating Types

Once you have collected a few reviews for a given Thing, the ratings summary for the Thing can be displayed in one of 4 possible formats (you can change the style from the Build / Browse frame of the Configure control panel in the admin area). You may even use a different display format for each of the 3 Thing Types (Item, Member, and Supplier).

Shown below are examples based on the 3 Rating Types discussed on this page. Be sure to read the note below on the restrictions associated with using the Colorometer Representation.

  1. Star Representation

    Average Rating based on 2 Reviews
    Recommend To Friend 
    5.00/5 5.00/5 5.00/5 5.00/5 5.00/5
     (5.00)
    Value For Money 
    4.50/5 4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)
    Overall 
    4.50/5 4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)

    Compared to averages for similiar items
    Recommend To Friend 
    3.43/5 3.43/5 3.43/5 3.43/5 3.43/5
     (3.43)
    Value For Money 
    2.86/5 2.86/5 2.86/5 2.86/5 2.86/5
     (2.86)
    Overall 
    3.14/5 3.14/5 3.14/5 3.14/5 3.14/5
     (3.14)

  2. Locating the right set of star images to match the style of your site can be challenging. The default set of stars for the default skin is located in the following directory:

    /rs/redqueen/skins/default/images/star
    

    However, a few more sets can be found in /star2, /star3 and so on. If you find a set there that suits you, swap the name of the directories /star and /starN (where N is the relevant directory identifier). If the star images in the two directories share the same height, you are done. If not, when you go to the Configure > Skin Images page you will notice that the height doesn't look quite right on the displayed star images This will also be true of stars presented in ratings on the public pages. That's because the heigh is stored as a skin variable. You will need to re-upload the following image in order to have the height extracted and stored for your new star images:

    star_solid.gif
    

    Once you have done that the stars should look non-distorted because the correct height is being used to format the <img> tag for the images. Again, this re-uploading of star_solid.gif from the Configure > Skin Images page should only be necessary if the new set of star images has a different height than the old set.

    One last note. The star images that appear on review pages are generated by putting together just 3 images: star_solid.gif, star_half.gif, and star_hollow.gif. The other images found in the /star directories are only used in the construction of RSS feeds that contain a graphical representation of the ratings.

  3. Bar Representation

    Average Rating based on 2 Reviews
    Recommend To Friend 
    5.00/5 5.00/5 5.00/5
     (5.00)
    Value For Money 
    4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)
    Overall 
    4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)

    Compared to averages for similiar items
    Recommend To Friend 
    3.43/5 3.43/5 3.43/5 3.43/5
     (3.43)
    Value For Money 
    2.86/5 2.86/5 2.86/5 2.86/5
     (2.86)
    Overall 
    3.14/5 3.14/5 3.14/5 3.14/5
     (3.14)

  4. The set of bar images for the default skin is located in the following directory:

    /rs/redqueen/skins/default/images/bar
    

    You can either replace the images directly, if needed, or upload new images from the Configure > Skin Images control panel. Again, the rating images on review pages are constructed from just a few "shards" of the final displayed bar. Full bar images are present in the /bar directory, but are reserved for use in RSS feeds.

  5. Thermometer Representation

    Average Rating based on 2 Reviews
    Recommend To Friend 
    5.00/5 5.00/5 5.00/5
     (5.00)
    Value For Money 
    4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)
    Overall 
    4.50/5 4.50/5 4.50/5 4.50/5
     (4.50)

    Compared to averages for similiar items
    Recommend To Friend 
    3.43/5 3.43/5 3.43/5 3.43/5
     (3.43)
    Value For Money 
    2.86/5 2.86/5 2.86/5 2.86/5
     (2.86)
    Overall 
    3.14/5 3.14/5 3.14/5 3.14/5
     (3.14)

  6. The set of thermometer images for the default skin is located in the following directory:

    /rs/redqueen/skins/default/images/therm
    

    You can either replace the images directly, if needed, or upload new images from the Configure > Skin Images control panel. As with the bar representation, the rating images on review pages are constructed from just a few "shards" of the final displayed thermometer. Full thermometer images are present in the /therm directory, but are reserved for use in RSS feeds.

  7. Colorometer Representation

    Average Rating based on 2 Reviews
    Recommend To Friend  5.00/5  (5.00)
    Value For Money  4.50/5  (4.50)
    Overall  4.50/5  (4.50)

    Compared to averages for similiar items
    Recommend To Friend  3.43/5  (3.43)
    Value For Money  2.86/5  (2.86)
    Overall  3.14/5  (3.14)

IMPORTANT: if you intend to use different rating scales throughout a given branch, be sure to avoid using the colorometer style, unless your rating scales are all a multiple of 5. There are only 10 states associated with this style. For a rating scale of 5, the gradations are 1/2. So a value of 1.5 can be represented (and the image whose value is nearest the actual rating value to be displayed is the one shown). If the rating scale is 10, the gradations are 1, so values of 1, 2, 3, ... 9, 10 can be displayed.

The set of colorometer images for the default skin is located in the following directory:

/rs/redqueen/skins/default/images/color

You can either replace the images directly, if needed, or upload new images from the Configure > Skin Images control panel. These images are NOT components of the final rating image, but are the fully formed final rating image.


« Table of Contents   |   Obtain Red Queen »


Copyright © 2004 Random Mouse Software. All Rights Reserved.