diff options
Diffstat (limited to 'mod/friends/views/default/widgets')
-rw-r--r-- | mod/friends/views/default/widgets/friends/content.php | 36 | ||||
-rw-r--r-- | mod/friends/views/default/widgets/friends/edit.php | 57 |
2 files changed, 0 insertions, 93 deletions
diff --git a/mod/friends/views/default/widgets/friends/content.php b/mod/friends/views/default/widgets/friends/content.php deleted file mode 100644 index 2f9ab71ea..000000000 --- a/mod/friends/views/default/widgets/friends/content.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php - -/** - * Elgg Friends - * Friend widget display view - * - * @package ElggFriends - * @subpackage Core - */ - - -// owner of the profile page -$owner = get_user($vars['entity']->owner_guid); - -// the number of friends to display -$num = (int) $vars['entity']->num_display; - -// get the correct size -$size = $vars['entity']->icon_size; - -// Get the user's friends -$friends = $owner->getFriends("", $num); - -// If there are any friends to view, view them -if (is_array($friends) && sizeof($friends) > 0) { - - echo "<div id=\"widget_friends_list\">"; - - foreach($friends as $friend) { - echo "<div class=\"widget_friends_singlefriend\" >"; - echo elgg_view("profile/icon",array('entity' => get_user($friend->guid), 'size' => $size)); - echo "</div>"; - } - - echo "</div>"; -} diff --git a/mod/friends/views/default/widgets/friends/edit.php b/mod/friends/views/default/widgets/friends/edit.php deleted file mode 100644 index 9a6499ede..000000000 --- a/mod/friends/views/default/widgets/friends/edit.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php - -/** - * Elgg Friends - * Friend widget options - * - * @package ElggFriends - * @subpackage Core - */ - -$selections = array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 30, 50, 100); -$icon_sizes = array('small', 'tiny'); - -// set defaults -if (!isset($vars['entity']->num_display)) { - $vars['entity']->num_display = 12; - $vars['entity']->icon_size = 'small'; -} - -// handle upgrade to 1.7.2 from previous versions -if ($vars['entity']->icon_size == 1) { - $vars['entity']->icon_size = 'small'; -} elseif ($vars['entity']->icon_size == 2) { - $vars['entity']->icon_size = 'tiny'; -} -?> - -<p> - <?php echo elgg_echo("friends:num_display"); ?>: - <select name="params[num_display]"> -<?php -foreach ($selections as $selection) { - $selected = ''; - if ($vars['entity']->num_display == $selection) { - $selected = 'selected="selected"'; - } - echo "<option value=\"$selection\" $selected>$selection</option>"; -} -?> - </select> -</p> - -<p> - <?php echo elgg_echo("friends:icon_size"); ?> - <select name="params[icon_size]"> -<?php -foreach ($icon_sizes as $size) { - $selected = ''; - if ($vars['entity']->icon_size == $size) { - $selected = 'selected="selected"'; - } - $label = elgg_echo("friends:$size"); - echo "<option value=\"$size\" $selected>$label</option>"; -} -?> - </select> -</p> |