function theme_og_picture_grid in Organic groups 5.2
Same name and namespace in other branches
- 5.8 og.module \theme_og_picture_grid()
- 5 og.module \theme_og_picture_grid()
- 5.3 og.module \theme_og_picture_grid()
- 5.7 og.module \theme_og_picture_grid()
1 theme call to theme_og_picture_grid()
File
- ./
og.module, line 954
Code
function theme_og_picture_grid($result) {
$content = '<table class="og-picture-grid">';
$count = 0;
$total = count($users);
while ($user = db_fetch_object($result)) {
$item = '';
if ($count % 5 == 0) {
$content .= '<tr>';
}
$picture = theme('user_picture', $user);
$name = theme('username', $user);
$group_role = $user->is_admin ? t('admin') : ' ';
$content .= "<td class=\"og-picture-grid-item\">{$picture}<div class=\"og-name\">{$name}</div>";
if ($user->is_admin) {
$txt = t('admin');
$content .= "<div class=\"group-role\">{$txt}</div>";
}
$content .= "</td>\n";
$count++;
if ($count % 5 == 0 || $count == $total) {
$content .= '</tr>';
}
}
$content .= '</table>';
if ($content) {
return $content;
}
}