aboutsummaryrefslogtreecommitdiff
path: root/mod/friends
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-16 02:12:03 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-16 02:12:03 +0000
commitfcc68792fd00a2778746f6813efd0a5d879584d6 (patch)
tree177d2e48710e46aa1b922a0a12b17dd0d7e4f9f9 /mod/friends
parent5922d93173db6353e3404c1c2a941842a9f166ed (diff)
downloadelgg-fcc68792fd00a2778746f6813efd0a5d879584d6.tar.gz
elgg-fcc68792fd00a2778746f6813efd0a5d879584d6.tar.bz2
moved friends widget into core
git-svn-id: http://code.elgg.org/elgg/trunk@7640 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/friends')
-rw-r--r--mod/friends/languages/en.php15
-rw-r--r--mod/friends/manifest.xml11
-rw-r--r--mod/friends/start.php14
-rw-r--r--mod/friends/views/default/widgets/friends/content.php36
-rw-r--r--mod/friends/views/default/widgets/friends/edit.php57
5 files changed, 0 insertions, 133 deletions
diff --git a/mod/friends/languages/en.php b/mod/friends/languages/en.php
deleted file mode 100644
index 1d09cfca6..000000000
--- a/mod/friends/languages/en.php
+++ /dev/null
@@ -1,15 +0,0 @@
-<?php
-
-$english = array(
-
- /**
- * Friends widget
- */
- 'friends:widget:description' => "Displays some of your friends.",
- 'friends:num_display' => "Number of friends to display",
- 'friends:icon_size' => "Icon size",
- 'friends:tiny' => "tiny",
- 'friends:small' => "small",
-);
-
-add_translation("en", $english);
diff --git a/mod/friends/manifest.xml b/mod/friends/manifest.xml
deleted file mode 100644
index 8cdd8c6bd..000000000
--- a/mod/friends/manifest.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<plugin_manifest>
- <field key="author" value="Curverider ltd" />
- <field key="version" value="1.7" />
- <field key="description" value="Provides friend widgets for your profile" />
- <field key="website" value="http://www.elgg.org/" />
- <field key="copyright" value="(c) Curverider 2008-2010" />
- <field key="licence" value="GNU Public License version 2" />
- <field key="elgg_version" value="2010030101" />
- <field key="admin_interface" value="simple" />
-</plugin_manifest>
diff --git a/mod/friends/start.php b/mod/friends/start.php
deleted file mode 100644
index 54675ee2f..000000000
--- a/mod/friends/start.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-/**
- * Elgg Friends widget
- * This plugin allows users to put a list of their friends on their profile
- *
- * @package ElggFriends
- */
-
-function friends_init() {
- elgg_register_widget_type('friends', elgg_echo("friends"), elgg_echo('friends:widget:description'));
-}
-
-elgg_register_event_handler('init', 'system', 'friends_init');
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>