View Full Version : [REQUEST] Add Rating to post/thread?
Is it possible to add a Rating system to each post or thread? So that users can rate the usability of each post on the forum. A total rating to the thread (accumulated by related post in the same thread) will be shown in the forumdisplay page.
Also, current counter of each post/thread did the way a page view do. I think it would be better to show how many unique user have had read the post but not only page views.
How do you guys think about that?
Fine idea...my guess is we'll see this in an upcoming release...don't know when though.
i never liked the idea of rating posts.... too judgemental for me :D
It's easy to do.
Add a column called "rating" to the post table, and then to the forum table.
Modify your postbit template to include something like
<a href="postings.php?action=rate&postid=$postid&value=1>Up</a>
<a href="postings.php?action=rate&postid=$postid&value=-1>Down</a>
Then modify postings.php to take that into account. Some SQL like "UPDATE post SET rating = rating + $value WHERE postid = $postid" will do the trick. (Also one for the thread table as well) Obviously check the $value var for illegal use (like someone modifying the URL to read "&value=9999" to stuff the ballot.
Also do some checking to make sure that the current $bbuserid is not the same as the post's in question (so as to not allow someone to rate their own).
Create another table called "Post_rating" or somesuch, with two elements:
"userid, postid"
That way you check to see if the user has already rated the post, if not insert the primary key set (userid, postid) from the given information to keep a record of it.
Other things you can do:
check to see if the post is available (not closed or whatnot)
check to see if the user has rights to it (so you can't rate something in a moderators-only forum)
etc.
Even though this is fairly easy -- it's a good primer for SQL and PHP so you should give it a shot -- if you have any problems let us (me? ;)) know and we can help you through it! :D
Note, that was not intended to be a slam against you -- but learning PHP now will give you great flexibility in the future with modification of VB -- and it means you don't have to rely on other people taking forever to come up with solutions! :)
I may have already worked on this for something too secret do divulge... shh! Once it is released I can show you all. ;)
wow...working overtime are we :D
Originally posted by mrogish
I may have already worked on this for something too secret do divulge... shh! Once it is released I can show you all. ;)
Thanks, mrogish.
Plus I have seen many types of rating.
1. drop down menu
2. combo boxes (rate 1-5 or 1-10 or what you want it to be)
and each user could decide to leave their comments of their rating. Also, other users could vote if the comments is useful to them. It was just like the Amazon.com do on their web site, ya know.
Hope this helps. :-)
Things to consider:
1) Only registered members can vote and they can only vote on each post once (need to add userid with each post and then check for duplicates)
2) Members profiles includes their average rating
3) A page that lists the top ranked members
I think perhaps some link to the "auto ignore" mod people have been talking about. Ignore people you dislike thing where their posts just collapse into a single line and you do not get emails when they post.
I would personally make the ratings all positive. If you don't vote then you don't think the post is that good. So like
1) = useful, 2) extremley useful 3) Perfect
something like that. Maybe enlarge to 5. I guess this would be left to each person to decide.
Just some ramblings. What do people think?
Originally posted by acidburn
[QUOTE]
and each user could decide to leave their comments of their rating. Also, other users could vote if the comments is useful to them. It was just like the Amazon.com do on their web site, ya know.
Hope this helps. :-)
You don't need a comments section in a Discussion Board. They could just reply. Also you could integrate the ratings into the reply form. :) Could be a very neat feature.
I also like Chris' idea of making the ratings all positive, wouldn't hurt feelings.
Good point - you're bound to have a few "rating wars" of some sort or another with a hack like this...as for the "Top Rated Members"...I thought the idea was to rate topics? I suppose both would work; just caught me off guard a bit.
I think there would definetly have to be some way (cookie or otherwise) to ensure that multiple ratings do not occur...otherwise the entire hack is hardly worth it.
Aggh.. not through cookies far to easy to cheat. Much better to do it through mySQL,
arr. one thing. Are we rating threads or are we rating posts. I thought posts as rating posts..
so... each post has another column in the table for "average rating", and "rated_users". The average rating speeks for itself and the rated users is a list of the users that have already rated that post so they can't again.
The user bit, ie popular user would be harder i guess because some how info would have to go in the member table as well but perhaps a column for number of "excellent ratings" for example could go there and then you can just sort the memberlist by the number of "excellent" post ratings.
More thoughts ...
"I also like Chris' idea of making the ratings all positive, wouldn't hurt feelings."
Thank you, i like giving out ideas just wish i could make them, will slowly learn - only been here 3 weeks :)
You don't need a comments section in a Discussion Board. They could just reply. Also you could integrate the ratings into the reply form. :) Could be a very neat feature.
Yap, you're right. :)
Originally posted by chrispadfield
Just some ramblings. What do people think?
Actually this is what I think originally and did not mentioned. Thanks for point this out. I like this idea. :)
Originally posted by chrispadfield
Aggh.. not through cookies far to easy to cheat. Much better to do it through mySQL,
I think this should be resolved by using a session ID.
After the user rated, a flag is recorded in the session ID and updated to MySQL after the user logged out ?
arr. one thing. Are we rating threads or are we rating posts. I thought posts as rating posts..
I think it should be for post. Since a thread contains many people's thought. But there might have a accumulated ratings for a thread which sum up rating credits for posts in the same thread. How do you think?
Sounds good....
Although thinking about it more a rating for the whole thread is a nice idea for really big forums. It would give a different meaning to "popular topics" but i am not sure if it will be that useful or not.
Well, if you wanted a thread rating, it would be the summation of all post ratings contained in it... so if you rate post 1: 4, and post 2: 20, your thread rating is 24...
And yes, you'd definately want to use mySQL for it -- that's what it is there for!
Although I disagree with keeping a column in the post table for the usernames of the people who voted. The whole point of a relational DB is to create "relations" that you can tie stuff together to. It ruins the whole point if you keep stuffing text fields with data -- that's one of my beefs with VB is that the DB design is... well, lacking a bit and I bet if it was optimized to really take advantage of the SQL language (JOINS, better tables, indicies, etc.) it would improve performance a ton.
Originally posted by mrogish
Well, if you wanted a thread rating, it would be the summation of all post ratings contained in it... so if you rate post 1: 4, and post 2: 20, your thread rating is 24...
I think it should be an average of rating, that is, summation divided by the number of posts in the thread.
That sounds fine too. Althought I'm interested in your methodology with that... why average? Seems to be more indicitive of the user's rating? More fair that way?
Something I'm missing?
my views ona cool way to rate ;) :
Replies are only ratable within 48 hours after posting. You can rate a post between -2 and +4. After each hour, the significance of your rate will become less (so the rating will become more 'stable' after a while). The avarage of all the ratings will be the actual rating.
That if for thread rating?
One way of doing that would be say:
Rating after 1 day, multiply by 5
Rating after 2 day, multiply by 4
Rating after 3 day etc...
Sounds like too much work though. I am still not quite sure what the use of a thread rating is going to be or where you are even going to put the information? I think generally the number of replies/views show how useful a thread is dosen't it.
I also think the usefullness of a rating of a post is in two parts, firstly a highly rated posts (say if i gets 10 5 stars) then it gets highlighed somehow. Secondly, that usres who consistantly get high ratings of their posts get a little icon on their left of post profile saying something to that extent.
Originally posted by mrogish
That sounds fine too. Althought I'm interested in your methodology with that... why average? Seems to be more indicitive of the user's rating? More fair that way?
Something I'm missing?
Yes. I think the average is to know how users admired a thread.
Here's an example:
In thread Q, there were post AA & BB.
For user A & B rates 3 & 5 for post AA, A, B, C, & D rates 1, 3, 4, 2 for post BB and the rating credit wwre:
post AA: (3 + 5)/ 2 = 4
post BB: (4+4+4+4)/4=4
thread Q: (4 + 4)/2 = 4
I think a rating credit is to show up a post or thread's value or quality but not a page view (summation). How do you think? Or there's another methodology we can discuss about it. :)
[Edited by acidburn on 09-18-2000 at 01:02 AM]
Erhard_007
02-15-2002, 01:17 PM
test
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.