aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/profile/index.php3
-rw-r--r--mod/profile/views/default/profile/profile_contents/groups.php11
-rwxr-xr-xmod/profile/views/default/profile/profile_navigation.php5
3 files changed, 18 insertions, 1 deletions
diff --git a/mod/profile/index.php b/mod/profile/index.php
index 41552602d..3b3a882e6 100644
--- a/mod/profile/index.php
+++ b/mod/profile/index.php
@@ -29,6 +29,9 @@ if ($user = get_user_by_username($username)) {
case 'friends':
$body .= elgg_view('profile/profile_contents/friends', array("entity" => $user));
break;
+ case 'groups':
+ $body .= elgg_view('profile/profile_contents/groups', array("entity" => $user));
+ break;
case 'extend':
$body .= elgg_view('profile/profile_contents/extend', array("entity" => $user));
break;
diff --git a/mod/profile/views/default/profile/profile_contents/groups.php b/mod/profile/views/default/profile/profile_contents/groups.php
new file mode 100644
index 000000000..323bb61f1
--- /dev/null
+++ b/mod/profile/views/default/profile/profile_contents/groups.php
@@ -0,0 +1,11 @@
+<?php
+/**
+ * Profile groups
+ **/
+$groups = list_entities_from_relationship('member',$vars['entity']->getGUID(),false,'group','',0, $limit,false, false);
+
+if(!$groups) {
+ $groups = '<p>' . elgg_echo('profile:no_groups') . '</p>';
+}
+
+echo $groups; \ No newline at end of file
diff --git a/mod/profile/views/default/profile/profile_navigation.php b/mod/profile/views/default/profile/profile_navigation.php
index bf7ece422..5a7283a9c 100755
--- a/mod/profile/views/default/profile/profile_navigation.php
+++ b/mod/profile/views/default/profile/profile_navigation.php
@@ -22,7 +22,9 @@ switch($section){
case 'details':
$details = 'class="selected"';
break;
-
+ case 'groups':
+ $groups = 'class="selected"';
+ break;
case 'twitter':
$twitter = 'class="selected"';
break;
@@ -42,6 +44,7 @@ switch($section){
<li <?php echo $activity; ?>><a href="<?php echo $url; ?>"><?php echo elgg_echo('activity'); ?></a></li>
<li <?php echo $details; ?>><a href="<?php echo $url . 'details'; ?>"><?php echo elgg_echo('Details'); ?></a></li>
<li <?php echo $friends; ?>><a href="<?php echo $url . 'friends'; ?>"><?php echo elgg_echo('friends'); ?></a></li>
+ <li <?php echo $groups; ?>><a href="<?php echo $url . 'groups'; ?>"><?php echo elgg_echo('groups'); ?></a></li>
<li <?php echo $commentwall; ?>><a href="<?php echo $url . 'commentwall'; ?>"><?php echo elgg_echo('profile:commentwall'); ?></a></li>
<?php
//check to see if the twitter username is set