function dlike_user_list in Drupal like (Flag counter) 7.3
Same name and namespace in other branches
- 7 dlike.inc \dlike_user_list()
- 7.2 dlike.inc \dlike_user_list()
Get list of names of all the users who flagged particular content.
1 string reference to 'dlike_user_list'
- dlike_menu in ./
dlike.module - Implementation of hook_menu().
File
- ./
dlike.inc, line 21 - This file contains all the include functions.
Code
function dlike_user_list($flag_type, $content_id, $flag_name, $js = FALSE) {
$flaggers = flag_get_entity_flags($flag_type, $content_id, $flag_name);
$output = '';
$output .= "<div class='dlike'>";
$title = variable_get('dlike-modal-window-title-' . $flag_name, NULL);
$output .= '<h2>' . $title . '</h2>';
foreach ($flaggers as $flagger) {
$output .= '<div class="dlike-user-row">' . views_embed_view('dlike_user_view', 'default', $flagger->uid) . '</div>';
}
$output .= "</div>";
// Use Lightbox if the module is installed.
if (module_exists('lightbox')) {
print $output;
exit;
}
// Render a CTools modal with a graceful fallback.
if ($js) {
ctools_include('ajax');
ctools_include('modal');
ctools_modal_render(NULL, $output);
// above command will exit().
}
else {
drupal_set_title($title);
return $output;
}
}