Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

Ratings/Review Mod?

Quote Reply
Ratings/Review Mod?
I pulled this out of another thread, hopefully to get some input on it Smile


==> Last night I was thinking about how to add the ratings mod in, and make the votes more descriptive. Just add a ratings table:
(realize this is still rough, and I'm typing from memory, not notes):

Code:
ID , ingeger
Link_ID , integer
Vote01 , integer
Vote02 , ingeger
Vote03 , ingeger
Vote04 , ingeger
Vote05 , ingeger
Vote06 , ingeger
Vote07 , ingeger
Vote08 , ingeger
Vote09 , ingeger
Vote10 , ingeger Legacy_Votes , ingeger
Legacy_Rate , ingeger
Each "vote" would be added to the appropriate table entry with an increment command to the appropriate column. This could be done in _real_ time, since database access for this is quite quick.

The Legacy_ fields import the current vote and ratings, so that when new ratings are counted, the counts ratings come out ok.

The ratings could be updated with each _build_ as usual, or even dynamically generated, depending on the activing and presentation of your site.
Quote Reply
Re: Ratings/Review Mod? In reply to
That's what I was hoping someone would say Smile

Ok, Smile

You are now playing my devil's advocate.

How would you set it up so that you could use an arbitrary rating?

I used 0-10, or 1-10 whatever I picked, as an example, but as with most databases, you need to define the fields when you create it.

So, perhaps allowing the person to pick the number of increments they want, on table creation, then having to live with that decision Smile

A conversion routine could always be made to map old ratings onto new ratings, if the admin changed their mind about 1-10 and wanted 1-15. It wouldn't be exact, but it could preserve data.

Using numerically incremented rate fields, allows the use of loops to access the data, where using actual names would require hard coding of the values in someway, even a hash would have problems, unless it assumed any fields after the first 5 were rate fields.

Quote Reply
Re: Ratings/Review Mod? In reply to
This is a good idea, and will work well for building the same sort of graphs that you can get from cgi-resources.

The only downside I can see is you limit yourself to a rating scale of 1 to 10. Is that a problem really?

Cheers,

Alex