function rate_preprocess_rate_template_thumbs_up in Rate 6.2
Same name and namespace in other branches
- 7 rate.module \rate_preprocess_rate_template_thumbs_up()
Preprocess function for the thumbs_up_down template.
File
- ./
rate.module, line 1101 - Rate module
Code
function rate_preprocess_rate_template_thumbs_up(&$variables) {
extract($variables);
$variables['up_button'] = theme('rate_button', $links[0]['text'], $links[0]['href'], 'rate-thumbs-up-btn-up');
$info = array();
if ($mode == RATE_CLOSED) {
$info[] = t('Voting is closed.');
}
if ($mode != RATE_COMPACT && $mode != RATE_COMPACT_DISABLED) {
if ($results['user_vote']) {
$info[] = format_plural($results['count'], 'Only you voted.', '@count users have voted, including you.');
}
else {
$info[] = format_plural($results['count'], '@count user has voted.', '@count users have voted.');
}
}
$variables['info'] = implode(' ', $info);
}