aboutsummaryrefslogtreecommitdiff
path: root/pages/friends.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-08-22 15:10:42 +0000
committerCash Costello <cash.costello@gmail.com>2009-08-22 15:10:42 +0000
commit3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66 (patch)
tree00aa120b631e00a3305d8e5b12db54332d95cada /pages/friends.php
parent4546f4f1e55042cebc9c77c84a37974ff01c08ff (diff)
downloadelgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.gz
elgg-3c7ff4340f018d6b70cf8f2dd60de0250d3fcb66.tar.bz2
moved core pages to new pages structure
Diffstat (limited to 'pages/friends.php')
-rw-r--r--pages/friends.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/pages/friends.php b/pages/friends.php
new file mode 100644
index 000000000..8ac1e21d0
--- /dev/null
+++ b/pages/friends.php
@@ -0,0 +1,38 @@
+<?php
+ /**
+ * Tidypics Friends Albums Listing
+ *
+ * List all the albums of someone's friends
+ */
+
+ include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
+
+ $username = get_input('username');
+
+ // if no username, redirect to world photo albums
+ if (!$username) {
+ forward('pg/photos/world');
+ }
+
+ // setup title
+ $user = get_user_by_username($username);
+ if (!$user) {
+ forward('pg/photos/world');
+ }
+ if ($user->guid == get_loggedin_userid())
+ $title = elgg_echo('album:yours:friends');
+ else
+ $title = sprintf(elgg_echo('album:friends'), $user->name);
+
+ $area2 = elgg_view_title($title);
+
+ // get html for viewing list of photo albums
+ set_context('search');
+ set_input('search_viewtype', 'gallery'); // need to force gallery view
+ $area2 .= list_user_friends_objects($user->guid, 'album', 10, true, false);
+
+
+ $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
+
+ page_draw($title, $body);
+?> \ No newline at end of file