Gossamer Forum
Quote Reply
ratings mod
I want to do something different than the rate between 1 and 10.

I want 3-5 different things they rate the site on and it then averages those for their overall rating. Detail page would show the different ratings for the different specifics.

Example:

How does this bowling center Rate?

1. Lanes ----- ****

2. Food ----- ***

3. Price ----- *****

4. Bowling Leagues ----- **

Overall Rating: ****



Something like that anyway...

Michael Carpenter

Adult DVD Links
Adult Detective
Quote Reply
Re: [adultdvdlinks] ratings mod In reply to
The easiest way would be to clone the ratings.cgi script/tables 3 times, and then have a global that just fetched the information based on the links record.

The more elegant way would be to modify the ratings system I have, to include additional columns/options.

I had originally thought about that -- an install option for the user to set how many ratings fields they wanted (ie: 10, 5, 20, 100), which would determine how many fields the table would have. That seemed to be sort of messy, since it meant mucking with the structure of the table during install, and every site would potentially have a different table structure.

Using a concept of a table with LinkID:Rating as a primary key pair, would allow an arbitrary amount of ratings columns (even changes on the fly) since each rating would be a unique key entry.

You'd need to have a more sophisticated global to pull out key data then, since a query to the database would not return a single record, but one record for each rating value. Also, you'd want to keep a second table of stats, to cut down on the processing overhead.

It starts to get to be a tug of war between flexibility and data normalization, and pragmatism and processing overhead.

But, on the original question, the addition of other ratings categories would simply be the addition of fields and flags to work with those fields, rather than any major new code.

You could also then return an overall ratings value by editing the simple formula of how you want the various individual ratings added up.

[ (2xfood) + (3xconvenience) + (5xnumber of lanes)] / 10 = overall rating, for example.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.