0

I'm planning to create a voting page, where users can vote on different ideas or suggestions. I think for my situation it will be best to use a Thumbs Up / Thumbs Down type voting system. Can anyone explain how these work? Do they use division, average, etc?

Thanks

6
Contributors
5
Replies
7
Views
7 Years
Discussion Span
Last Post by coolest_987
1

I'm planning to create a voting page, where users can vote on different ideas or suggestions. I think for my situation it will be best to use a Thumbs Up / Thumbs Down type voting system. Can anyone explain how these work? Do they use division, average, etc?

Thanks

thumbs up is +1,thumbs down is -1
0
thumbs up is +1,thumbs down is -1

Its ok the logic about the post, and his rating up with by 1, but i want to understand how to mark that one user is like the current post. If there no check about this, one user can use Tump UP more than 1 time. This is what i want to know, how to remember that user A is vote alrady for post B.

0

you can have one table for storing user_id and post_id.
When user vote any post there will be entry in that table and if there is any entry vote up-down arrow will not be shown for that post.

0

Do you have a system for users to login. That way you can make sure that only one user can vote once for a post, just like what vibhadevit says.In addition to the user_id and post_id, also put in the +1 or -1 which you can then use to calculate the rating.

Once you get that then either use (number of thumbs up - number of thumbs down) as a rating method or divide that number by the total of users voted and then multiply by 10 to get the rating on a 1-10 rating scale.

On the other hand if you do not have a login system, then you can use cookies, however, this is not a foolproof method since clearing the cookie cache would allow the user to vote again.

Edited by sudeepjd: n/a

-1

Create table for storing user_id and post_id.
When user vote any post there will be entry in that table check database if user has already post ie entry must be there in post_id with user_id if yes then dont show voting image use AJAX for this functionality it will be great.Using Ajax you can change image ie thumb up or thumb down .

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.