TinyPortal

Development => Feedback => Topic started by: ontap on May 17, 2006, 03:41:45 PM

Title: rating stars in articles
Post by: ontap on May 17, 2006, 03:41:45 PM

i know the rating system has only being added, would be nice to see stars instead of "Rating: 1 (1 rates)"
Title: Re: rating stars in articles
Post by: bloc on May 17, 2006, 04:15:20 PM
Heh..that was my first thought. I opted for an easy text version though.

But what would be better? 5 stars in a row..like pressing the 4th give "4"..or simply pictures of 1 star, 2 stars, 3 stars etc.?
Title: Re: rating stars in articles
Post by: deniz on May 17, 2006, 04:48:20 PM
1 to 5 is not enough.
it should be until 10 and numeric display
Title: Re: rating stars in articles
Post by: ontap on May 17, 2006, 04:52:10 PM
1-5 or 1-10 (maybe an option to set this in TP Admin)

clickin the 4th star would rate the article 4 stars, and so on.
Title: Re: rating stars in articles
Post by: feline on May 17, 2006, 05:01:43 PM
Rating 1-10 in two colors ...

1..5 as blue, 6..10 as red
overlapped
so see only 5 stars

4 blue gives a rating of 4
2 red 3 blue gives  7
5 red gives 10  ::)

Fel

Title: Re: rating stars in articles
Post by: feline on May 19, 2006, 11:46:43 AM
I have add the Rating start for articel, steps 1..10  ::)

Look at the picture ...
Title: Re: rating stars in articles
Post by: Crip on May 19, 2006, 12:42:59 PM
Go Fel! :) :up: :up:

crip
Title: Re: rating stars in articles
Post by: bloc on May 19, 2006, 01:58:47 PM
oh, that looked rather good! :) Good to sue small squares instead og big(ish) stars. But I am bit confused on the red/blue thing..so 1-5 is all blue squares, but what after that? Like this:

1-5 blue
6- 1 red 4 blue
7- 2 red 3 blue
8- 3 red 2 blue
9- 4 red 1 blue
10- 5 red?

Sort of like 1-5 is all blue, after that the blue starts to be replaced by red?
Title: Re: rating stars in articles
Post by: feline on May 19, 2006, 02:14:44 PM
exactly Bloc (I gives him a note ONE  ;D)

here the code:

if(isset($story['options']['rating']))
{
$ratings = '<span class="smalltext">' . $txt['tp-ratingaverage'].' ';
$rate10cnt = $story['rating_average'] - 5;
if ($rate10cnt <= 0)
{
$rate5cnt = $story['rating_average'];
$rate10cnt = 0;
}
else
{
$rate5cnt = 5 - $rate10cnt;
}
$ratings .= str_repeat('<img src="'.$settings['images_url'].'/rate10.gif" alt="" />', $rate10cnt);
$ratings .= str_repeat('<img src="'.$settings['images_url'].'/rate5.gif" alt="" />', $rate5cnt);
$opts[] .= $ratings.' ('.$story['rating_votes'].'x)</span>';
}


the starpics added ...

Fel
Title: Re: rating stars in articles
Post by: ontap on May 19, 2006, 02:44:56 PM

red-blue is a big confusin, i dont get it.

nice bit of code fel
Title: Re: rating stars in articles
Post by: bloc on May 19, 2006, 04:20:50 PM
Um. I think I agree. But I like the blue/reds too. Maybe something like..when it gets over 5, they all get red? So showing 1-10 stars, but only in blue for 1-5, for 6-10 its all red ones? Sort of like a quick "threshold" indicator.
Title: Re: rating stars in articles
Post by: IchBin on May 19, 2006, 04:21:47 PM
Wow Feline..... I cannot say this enough. You are my HERO!!! I seriously covet your php skills. And Blocs of course. lol
Title: Re: rating stars in articles
Post by: feline on May 22, 2006, 06:57:17 PM
I have modify the grafic Rating a little bit .. look now better  ;)
Title: Re: rating stars in articles
Post by: bloc on May 22, 2006, 11:03:51 PM
I don't know..I kind of liked the single-row one - that looked very cool...2 rows just seems too much...

Maybe we should just stick with one color and 5 levels? Really, i can't see why one needs 1-10 either...I think most poeple will either vote 0-1 or 5 or  8-10. Then you effectivley only have 4-5 "levels" they tend to use anyway. Better with just 5 basic "levels" then.
Title: Re: rating stars in articles
Post by: feline on May 22, 2006, 11:09:00 PM
Get them a option ... Max Rating  ;)

For Germany ... I give ten points ...   :laugh:
Title: Re: rating stars in articles
Post by: bloc on May 22, 2006, 11:18:24 PM
lol yeah, that seems to be the best alternative.
Title: Re: rating stars in articles
Post by: G6Cad on May 22, 2006, 11:44:31 PM
I rate Swe Hockey 10 points of 10 :) VM champions :)
Yes... Me likes Hockey now when im old ;)