It does. Give anonymous users the permission to "vote on content". They will be able to vote only once for a given content with an IP address for a certain duration of time. That 'certain duration of time' is set through the configuration page of the Voting API module.
if (!$logged_in || user_access('vote on content')) {
$output .= '<div class="'. $message_class . '">';
if (!$logged_in && !user_access('vote on content')) {
$output .= '<small>'. l(t('Log in<br />to vote'), 'user', array('html' => TRUE)) .'</small>';
}
else if ($voted) { // User already voted.
$output .= check_plain(variable_get('plus1_you_voted', t('You voted')));
}
else if (user_access('vote on content')) {
// User is eligible to vote.
// The class name provided by Drupal.settings.plus1.link_class what we will search for in our jQuery later.
$output .= '<div class="plus1-vote">'. l(t('Vote'), 'plus1/vote/'. $node->nid, array('attributes' => array('class' => $link_class))) .'</div>';
}
$output .= '</div>';
}
Anonymous voting is indeed not supported in the first branch.
Comments
Comment #1
Chill35 commentedIt does. Give anonymous users the permission to "vote on content". They will be able to vote only once for a given content with an IP address for a certain duration of time. That 'certain duration of time' is set through the configuration page of the Voting API module.
Comment #2
moshe weitzman commentedThanks Chill35. I was just reading the theme function. It certainly looks to me like logged in is needed ...
Comment #3
Chill35 commentedYou are looking at the wrong branch.
What you're looking at is deprecated.
Here is the theming function:
Anonymous voting is indeed not supported in the first branch.
Comment #4
moshe weitzman commentedOh, thats much better. Thanks for setting me straight.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.