aboutsummaryrefslogtreecommitdiff
path: root/mod/file/friends.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/friends.php')
-rw-r--r--mod/file/friends.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/mod/file/friends.php b/mod/file/friends.php
new file mode 100644
index 000000000..0693991d9
--- /dev/null
+++ b/mod/file/friends.php
@@ -0,0 +1,38 @@
+<?php
+ /**
+ * Elgg file browser
+ *
+ * @package ElggFile
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.com/
+ */
+
+ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
+
+ if (is_callable('group_gatekeeper')) {
+ group_gatekeeper();
+ }
+
+ $owner = page_owner_entity();
+
+ $title = sprintf(elgg_echo("file:friends"),$owner->name);
+
+ $area2 = elgg_view_title($title);
+
+ set_context('search');
+ $content = list_user_friends_objects($owner->guid, 'file', 10, false);
+ set_context('file');
+ $area1 = get_filetype_cloud($owner->guid, true);
+
+ // handle case where friends don't have any files
+ if (empty($content)) {
+ $area2 .= elgg_view('page_elements/contentwrapper',array('body' => elgg_echo("file:none")));
+ } else {
+ $area2 .= $content;
+ }
+
+ $body = elgg_view_layout('two_column_left_sidebar',$area1, $area2);
+
+ page_draw($title, $body);
+?> \ No newline at end of file