diff options
author | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-09 15:12:23 +0000 |
---|---|---|
committer | dave <dave@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-08-09 15:12:23 +0000 |
commit | 441bf62e1e767991ac3d25c14ed8d1291b142639 (patch) | |
tree | 1abe6f1bc8069caca40741c77c201c7aecc66646 /mod/groups/views/default/widgets | |
parent | a74d4216eb5a89743e0938d831db0ec57fc8df05 (diff) | |
download | elgg-441bf62e1e767991ac3d25c14ed8d1291b142639.tar.gz elgg-441bf62e1e767991ac3d25c14ed8d1291b142639.tar.bz2 |
a simple widget that displays a users groups on their profile
git-svn-id: https://code.elgg.org/elgg/trunk@1811 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/groups/views/default/widgets')
-rw-r--r-- | mod/groups/views/default/widgets/a_users_groups/edit.php | 14 | ||||
-rw-r--r-- | mod/groups/views/default/widgets/a_users_groups/view.php | 20 |
2 files changed, 34 insertions, 0 deletions
diff --git a/mod/groups/views/default/widgets/a_users_groups/edit.php b/mod/groups/views/default/widgets/a_users_groups/edit.php new file mode 100644 index 000000000..1dbb5900d --- /dev/null +++ b/mod/groups/views/default/widgets/a_users_groups/edit.php @@ -0,0 +1,14 @@ +<p>
+ <?php echo elgg_echo("groups:widget:num_display"); ?>:
+ <select name="params[num_display]">
+ <option value="1" <?php if($vars['entity']->num_display == 1) echo "SELECTED"; ?>>1</option>
+ <option value="2" <?php if($vars['entity']->num_display == 2) echo "SELECTED"; ?>>2</option>
+ <option value="3" <?php if($vars['entity']->num_display == 3) echo "SELECTED"; ?>>3</option>
+ <option value="4" <?php if($vars['entity']->num_display == 4) echo "SELECTED"; ?>>4</option>
+ <option value="5" <?php if($vars['entity']->num_display == 5) echo "SELECTED"; ?>>5</option>
+ <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option>
+ <option value="7" <?php if($vars['entity']->num_display == 7) echo "SELECTED"; ?>>7</option>
+ <option value="8" <?php if($vars['entity']->num_display == 8) echo "SELECTED"; ?>>8</option>
+ <option value="9" <?php if($vars['entity']->num_display == 9) echo "SELECTED"; ?>>9</option>
+ </select>
+</p>
\ No newline at end of file diff --git a/mod/groups/views/default/widgets/a_users_groups/view.php b/mod/groups/views/default/widgets/a_users_groups/view.php new file mode 100644 index 000000000..030cbc3c9 --- /dev/null +++ b/mod/groups/views/default/widgets/a_users_groups/view.php @@ -0,0 +1,20 @@ +<?php
+
+ /**
+ * Group profile widget - this displays a users groups on their profile
+ **/
+
+ //the number of groups to display
+ $number = (int) $vars['entity']->num_display;
+ if (!$number)
+ $number = 4;
+
+ //the page owner
+ $owner = $vars['entity']->owner_guid;
+
+ //$groups = get_users_membership($owner);
+ $groups = list_entities("group", "", $owner, $number, true, false);
+
+ echo $groups;
+
+?>
\ No newline at end of file |