Jump to content

Comment System with Ranting


OutCaster

Recommended Posts

Hi,

 

I've seen many websites that have comment systems with a little "+" or "-" next to the comment.  I'm assuming it's a type of rating system where the visitors vote up or down a comment.  Obviously when showing the comments you can sort them by rating, but do these types of comment system have some sort of check that prevents a certain user from voting down all the comments or voting up all the comments?  I guess what I'm asking is how does the system work.

 

Thanks,

OutCaster

Link to comment
https://forums.phpfreaks.com/topic/70791-comment-system-with-ranting/
Share on other sites

Maybe make it so once a user votes for a comment they can't vote for that comment again...that way someone can't just keep clicking the + or -.

 

When they rate it, just add it to a table in the database called something like "comment_rates". Record the players ID and the Comments ID...then every time they try to rate a comment, have it check to see if they have already done so.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.