diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-22 17:56:16 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-04-22 17:56:16 +0000 |
commit | f7b20eb31aeab71ab42e1f4e66d5b12506e9d526 (patch) | |
tree | ba070a7f5f23fff7fabeea8013d25f779a09a985 /mod/groups/views/default/groups | |
parent | fbf1ce69b529129c1d92772c2805f99480bd4650 (diff) | |
download | elgg-f7b20eb31aeab71ab42e1f4e66d5b12506e9d526.tar.gz elgg-f7b20eb31aeab71ab42e1f4e66d5b12506e9d526.tar.bz2 |
Updated groups to 1.7 api.
git-svn-id: http://code.elgg.org/elgg/trunk@5851 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/groups')
-rw-r--r-- | mod/groups/views/default/groups/groupprofile.php | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/mod/groups/views/default/groups/groupprofile.php b/mod/groups/views/default/groups/groupprofile.php index 5232e9a6f..f1ca92e4e 100644 --- a/mod/groups/views/default/groups/groupprofile.php +++ b/mod/groups/views/default/groups/groupprofile.php @@ -35,44 +35,57 @@ )); ?> </div> - + <div class="group_stats"> <?php echo "<p><b>" . elgg_echo("groups:owner") . ": </b><a href=\"" . get_user($vars['entity']->owner_guid)->getURL() . "\">" . get_user($vars['entity']->owner_guid)->name . "</a></p>"; ?> - <p><?php echo elgg_echo('groups:members') . ": " . get_entities_from_relationship('member', $vars['entity']->guid, true, 'user', '', 0, '', 9999, 0, true); ?></p> + <p><?php + $options = array( + 'relationship' => 'member', + 'relationship_guid' => $vars['entity']->guid, + 'inverse_relationship' => TRUE, + 'limit' => 0, + 'count' => TRUE + ); + + $count = elgg_get_entities_from_relationship($options); + + echo elgg_echo('groups:members') . ": " . $count; + + ?></p> </div> </div> - + <div class="group_profile_column info"> <?php if ($vars['full'] == true) { if (is_array($vars['config']->group) && sizeof($vars['config']->group) > 0){ - + foreach($vars['config']->group as $shortname => $valtype) { if ($shortname != "name") { $value = $vars['entity']->$shortname; - + if (!empty($value)) { //This function controls the alternating class $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; } - + echo "<p class=\"{$even_odd}\">"; echo "<b>"; echo elgg_echo("groups:{$shortname}"); echo ": </b>"; - + $options = array( 'value' => $vars['entity']->$shortname ); - + if ($valtype == 'tags') { $options['tag_names'] = $shortname; } - + echo elgg_view("output/{$valtype}", $options); - + echo "</p>"; } } |