function vud_denied_vote in Vote Up/Down 7
Same name and namespace in other branches
- 6.3 vud.module \vud_denied_vote()
- 6.2 vud.module \vud_denied_vote()
- 7.2 vud.module \vud_denied_vote()
Menu callback; show widget message.
1 string reference to 'vud_denied_vote'
- vud_menu in ./
vud.module - Implementation of hook_menu().
File
- ./
vud.module, line 166 - Implements the core voting module on top of Voting API.
Code
function vud_denied_vote($js = FALSE, $code = VUD_WIDGET_MESSAGE_ERROR) {
$widget_message_codes = array(
VUD_WIDGET_MESSAGE_ERROR => t('Sorry, there was problem on the vote.'),
VUD_WIDGET_MESSAGE_DENIED => t('You are not allowed to vote.'),
);
drupal_alter('vud_widget_message_codes', $widget_message_codes);
if ($js) {
ctools_include('ajax');
ctools_include('modal');
ctools_modal_render('', $widget_message_codes[$code]);
}
else {
return $widget_message_codes[$code];
}
}