Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By bombaclot on
I think this is the section in the og module where it displays, but I can't sort out the addition to it to have it show the group manager's picture. Help me out?
function og_list_groups_page() {
global $user;
$result = pager_query(db_rewrite_sql("SELECT n.nid, n.title, n.body, n.uid, u.name, og.description FROM {og} og INNER JOIN {node} n ON og.nid = n.nid INNER JOIN {users} u ON n.uid = u.uid WHERE og.directory=1 AND n.status=1 ORDER BY n.nid DESC"), 50);
$header = array(t("Title"), t('Subscribers'), t("Owner"), t('Description'));
while ($node = db_fetch_object($result)) {
$cnt = db_num_rows(db_query(og_list_users_sql(), $node->nid));
$rows[] = array(
array("data" => l($node->title, "node/$node->nid")),
array("data" => in_array($node->nid, array_keys($user->og_groups)) ? l($cnt, "og/users/$node->nid") : $cnt),
array("data" => format_name($node)),
array("data" => check_plain($node->description)),
);
}
if (!$rows) {
$rows[] = array(array('data' => t('No groups'), 'colspan' => 4));
}
$output = theme('table', $header, $rows). theme('pager', NULL, 50);
print theme('page', $output);
}