function og_user_title_list in Organic groups 5.3
Same name and namespace in other branches
- 5.8 og.module \og_user_title_list()
- 5 og.module \og_user_title_list()
- 5.7 og.module \og_user_title_list()
2 calls to og_user_title_list()
- og_block_subscribers_list in ./
og.module - API function for retrieving a list of group members. Used by og and og_panels
- og_block_users_network in ./
og.module
File
- ./
og.module, line 2277
Code
function og_user_title_list($result, $gid = NULL, $show_more = TRUE, $show_picture = NULL) {
if (is_null($show_picture)) {
$show_picture = og_is_picture();
}
while ($row = db_fetch_object($result)) {
if ($show_picture) {
//showing member pictures
$link = theme('user_picture', $row) . theme('username', $row);
$links[] = "\n" . '<div class="og-picture-wrapper">' . "\n" . $link . "\n" . '</div>' . "\n";
}
else {
$link = theme('username', $row);
$links[] = "\n" . $link . "\n";
}
}
if ($links) {
$max = variable_get('og_block_cnt_2', 10);
if (count($links) > $max - 1) {
array_pop($links);
$txt = t('more');
$title = array(
'title' => t('View all members.'),
);
if ($show_more) {
$more = $show_picture ? l($txt, "og/users/{$gid}/faces", $title) : l($txt, "og/users/{$gid}", $title);
$append = "<div class=\"more-link\">{$more}</div>";
}
}
return theme('item_list', $links) . $append;
}
}