Ok...I was getting off topic on your other post Eliot, so I'll just make a new one. I was actually wondering if the system uses like half a star for a rating of 5.5 or something like that? If not how many stars would a site with a rating of 5.5 get---5 or 6? If so, would I name half a star rate05.gif?? Or maybe the review system only uses numbers without decimals...I haven't been able to tell yet! Thanks.
May 31, 2000, 6:08 PM
Veteran (17240 posts)
May 31, 2000, 6:08 PM
Post #2 of 9
Views: 1385
If you are talking about the alt tag...it is taken care of in the following sub:
sub get_rating_image {
#-----------------------------------------------------
my ($rating) = @_;
my ($i, $image);
for ($i = 0; $i <= 20; $i++) {
$image = qq~<img src="$rating_images_url/rate$i.gif" alt="$rating" border="0">~ and last if ($rating <= $i/2);
}
return $image || $rating;
}
Notice the bolded codes...
Now...the Ratings are compiled the same way they are with the regular sub build_update_ratings. The difference is that the LinkIDs in the review.db are used to compile the percentage of the Ratings, which are updated in the links.db rather than the Votes field with the old rating system.
Regards,
Eliot Lee
Code:
sub get_rating_image {
#-----------------------------------------------------
my ($rating) = @_;
my ($i, $image);
for ($i = 0; $i <= 20; $i++) {
$image = qq~<img src="$rating_images_url/rate$i.gif" alt="$rating" border="0">~ and last if ($rating <= $i/2);
}
return $image || $rating;
}
Notice the bolded codes...
Now...the Ratings are compiled the same way they are with the regular sub build_update_ratings. The difference is that the LinkIDs in the review.db are used to compile the percentage of the Ratings, which are updated in the links.db rather than the Votes field with the old rating system.
Regards,
Eliot Lee
May 31, 2000, 10:03 PM
User (370 posts)
May 31, 2000, 10:03 PM
Post #5 of 9
Views: 1389
Ok...that's where I was getting confused, I haven't been using images for the rating system previously....I was just using numbers. A site can have a rating of 1-10, right? Ok, so how many images do I need to have? I read somewhere that I need 20 images---but here is what I don't get. To keep things easy...I'm using stars and I'm going to assume rate1.gif should obviously be an image of one star, but what would rate2.gif be? An image of half a star, one and a half stars, or two stars?? I know this can't be that difficult, but for the life of me the numbers just don't match in my head. :~! Thanks.