From 7b8a18ab7f993aa5f4f7f643478f06a8e3f7ed52 Mon Sep 17 00:00:00 2001 From: cash Date: Sat, 1 Jan 2011 17:55:18 +0000 Subject: almost finished updating the file plugin to work with new html/css git-svn-id: http://code.elgg.org/elgg/trunk@7804 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/file/index.php | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'mod/file/index.php') diff --git a/mod/file/index.php b/mod/file/index.php index bdda62786..940f9c30f 100644 --- a/mod/file/index.php +++ b/mod/file/index.php @@ -45,7 +45,7 @@ if ($owner->guid == get_loggedin_userid()) { } } -// Get objects +// List files $content = elgg_list_entities(array( 'types' => 'object', 'subtypes' => 'file', @@ -53,20 +53,18 @@ $content = elgg_list_entities(array( 'limit' => 10, 'full_view' => FALSE, )); - -$get_filter = get_filetype_cloud(elgg_get_page_owner_guid()); -if ($get_filter) { - $area1 .= $get_filter; -} else { - $area2 .= "

".elgg_echo("file:none")."

"; +if (!$content) { + $content = elgg_echo("file:none"); } -//get the latest comments on the current users files -$comments = get_annotations(0, "object", "file", "generic_comment", "", 0, 4, 0, "desc",0,0,elgg_get_page_owner_guid()); -$area3 = elgg_view('comments/latest', array('comments' => $comments)); +$sidebar = file_get_type_cloud(elgg_get_page_owner_guid()); +if (elgg_instanceof($owner, 'user')) { + $sidebar .= elgg_view_latest_comments(elgg_get_page_owner_guid(), 'object', 'file'); +} $params['content'] = $content; $params['title'] = $title; +$params['sidebar'] = $sidebar; $body = elgg_view_layout('content', $params); -- cgit v1.2.3