Hi,

When a user already voted at a node (thumbs up), the widget shouldn't be clickable, but it's being printed always as a clickable a href html tag.

If the user who already voted, clicks again the rate widget it doesn't compute more votes.
This behavior is correct, but the widget shouldn't be printed as a link if the user already voted.

I'd like to hide it or to show a disabled (non clickable) version.

Also, if the user didn't vote yet, but click and vote, there is an ajax call that updates the vote, but the button remains clickable, and it should be disabled as soon the vote is computed.

How to solve this?
Any help?

Thanks

Comments

carvalhar’s picture

ok,

i don't know why this isn't working...but i found a workaround:
http://drupal.org/node/356605

my code:

	$vote_array = votingapi_select_votes(array('uid'=> $user->uid,'content_id'=> $node->nid));
	if (!empty($vote_array)) {
		$mode = RATE_DISABLED;
		$mode_class = "rate-disabled";
	}
	else {
		$mode = RATE_FULL;
		$mode_class = "rate-full";
	}	
	echo '<div class="content-bar-gostei '.$mode_class.'">';
	print rate_generate_widget(1, 'node', $node->nid, $mode);
konon’s picture

lamp5’s picture

Issue summary: View changes
Status: Active » Closed (outdated)