PDA

View Full Version : Thread rateing hack


12-27-2000, 02:48 AM
Hello,

I would like to give users the ability to rate a thread from 1 to 10 and show the top rated threads on homepage/another page, is there a known hack for it?

Regards,

JDreamer

12-27-2000, 04:09 AM
I'm looking for something a little familiar, except it's a rating on the forums. Not the threads. Anyone have it ?

12-27-2000, 11:38 PM
I'm looking for something a little familiar, except it's a rating on the Users . Not the threads or forums . Anyone have it ? ;)

12-28-2000, 01:49 AM
my users have developed a system to 'rate' threads. generally speaking your average usefull thread (on my forums) will have 10 views/post. if it is particularly usefull it will have less then 10 views/post, and obviously if it has more then 10 vies/post it is deemed more a more useless thread. of course thats just a generalization, but maybe you could devide the # of views by 10 (or whatever), and then get the ratio of [views/10]:posts to rate a thread.

of course thats just an idea, but i would require hella-less work then coding up a rating system.

12-28-2000, 12:41 PM
This actually wouldn't be too hard...

1. Put a list of ratings on the "newreply" template. 1-10 per se.
2. Store that rating with each new post (would require a new field)
3. Your average thread rating would be the average of the ratings for each reply.

To pull this out just do a query before you display the thread info.

SELECT avg(rating) as rating from post where threadid=$threadid

The rest I leave up to you. Not hard if you know a little PHP.