reset password
Author Message
abajpai
Posts: 52
Posted 22:26 Apr 18, 2011 |

Regarding the voting system:- Let's say a user gives a positive vote (+1) on an answer and later decides to change his vote. When he selects the negative vote (-1) option, should his vote be reset to a 0 or should it go directly to -1 ?

abess
Posts: 26
Posted 22:28 Apr 18, 2011 |

Mine goes down to 0 first...

cysun
Posts: 2935
Posted 22:39 Apr 18, 2011 |

It should reset to 0 first because changing the vote could mean that the user decides not to vote, 

Vanquish39
Posts: 134
Posted 00:44 Apr 19, 2011 |

Professor is my functionality okay?


Once a user submits a vote, there is a vote for an answer.  If he wants to change it, it switches.


For example:  If the user first gives a +1 to a vote, then it's final.  The user cannot take the vote away.  He can change it however.  He can change his vote from +1 to -1 and vice versa, but he cannot take it away once he submits a vote.  I don't see a lot of forums where you can take away a vote once it's submitted.

cysun
Posts: 2935
Posted 08:42 Apr 19, 2011 |
Vanquish39 wrote:
...

For example:  If the user first gives a +1 to a vote, then it's final.  The user cannot take the vote away.  He can change it however.  He can change his vote from +1 to -1 and vice versa, but he cannot take it away once he submits a vote. ...

I'd prefer having the option to remove a vote, but if you decide to do it this way, it's OK too.

Since you are using +/- for the user interface, the logic should be fairly easy to implement:

when "-" is clicked:

if the user has a +1 vote

remove the vote

else if the user has not voted yet

add a -1 vote

else, i.e. the user has a -1 vote already

do nothing

Last edited by cysun at 08:42 Apr 19, 2011.
abajpai
Posts: 52
Posted 23:17 Apr 19, 2011 |

Another question regarding the voting system, how friendly does the voting UI have to be? For example, if a user has given a -1 vote and further tries to give a negative vote, should the user be alerted that he/she will not be able to do this or page just not do anything? Or when trying to vote on an answer submitted by that user?

Last edited by abajpai at 23:17 Apr 19, 2011.
cysun
Posts: 2935
Posted 23:23 Apr 19, 2011 |
abajpai wrote:

Another question regarding the voting system, how friendly does the voting UI have to be? For example, if a user has given a -1 vote and further tries to give a negative vote, should the user be alerted that he/she will not be able to do this or page just not do anything? Or when trying to vote on an answer submitted by that user?

It's up to you. You can show an error message or simply ignore the action.