diff options
Diffstat (limited to 'mod/groups/views')
-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 |