Gossamer Forum
Home : Products : DBMan : Customization :

Ratings

Quote Reply
Ratings
Hi,
I'm currently working on a database and I want my visitors that add entires to a database to also add their own ratings.
So is is this possible:
When you create a database entry there is a field for "Rating" and you can select either 1,2,3,4,5
But when soemone views the record in a search he/she will not see "1" or "2", but instead see 1 star or 2 stars or 3stars, etc.

How do I go about doing somehting like this?
Any help would be appreciated!
Quote Reply
Re: Ratings In reply to
Do you want to have one star graphic that is repeated or do you want to have a different graphic for each rating?


------------------
JPD





Quote Reply
Re: Ratings In reply to
Whichever one is easier I guess! Smile
I guess one star repeating would be the easier one.
Quote Reply
Re: Ratings In reply to
Less room on your webspace. A little more coding. Smile

In html_record, in the place you want to print out your stars, add

Code:
|; # to close off any previous print qq| statement
for ($i=1; $i<=$rec{'Rating'}; ++$i) {
print qq|<img src="http://url/to/star.gif">|;
}

Then, use a print qq| statement to continue printing the rest of your subroutine.


------------------
JPD