Only show 'Reset vote' link if user has voted on node/comment

matt@antinomia - January 16, 2008 - 23:26
Project:Vote Up/Down
Version:6.x-1.0-beta6
Component:Code
Category:bug report
Priority:normal
Assigned:ingo86
Status:needs review
Description

This patch creates a helper function vote_up_down_hasvoted() to check if the user has already voted on a node/comment. If not, it hides the 'Reset vote' link.

AttachmentSize
vote_up_down_reset_link.patch8.47 KB

#1

matt@antinomia - January 18, 2008 - 21:22

Rerolled against -dev. Also cleaned up patch, removing vote_up_down_hasvoted() in favor of VotingAPI's votingapi_get_user_votes() which does the same.

AttachmentSize
vote_up_down_reset_link.patch 1.78 KB

#2

kirie - January 30, 2008 - 06:11

Instead of having the 'Reset vote' link, would it be better to allow resetting a vote (if present) through the voting vidget?

#3

nenastoyashiy - February 28, 2009 - 18:19
Priority:minor» normal
Status:needs review» reviewed & tested by the community

#4

nenastoyashiy - February 28, 2009 - 18:33

This patch work for 5.x.

It is necessary for version 6.x too but in 6.x other functions

#5

lut4rp - April 5, 2009 - 12:12
Status:reviewed & tested by the community» fixed

Fixed!

#6

lut4rp - April 5, 2009 - 12:13
Status:fixed» needs work

err, wrong fix. Sorry :-/

#7

nenastoyashiy - August 31, 2009 - 08:35
Version:5.x-1.x-dev» 6.x-1.0-beta6
Status:needs work» needs review

patch for 6.x-1.0

AttachmentSize
vote_up_down.module.patch 2.43 KB

#8

ingo86 - September 6, 2009 - 13:57
Assigned to:Anonymous» ingo86

Will look to add this patch asap. Stay tuned for beta7.

 
 

Drupal is a registered trademark of Dries Buytaert.