$area2 = elgg_view_title(elgg_echo("file:friends:type:" . $tag)); } else { if (page_owner() && page_owner() != $_SESSION['guid']) { $area2 = elgg_view_title(sprintf(elgg_echo("file:user:type:" . $tag), page_owner_entity()->name)); } else { $area2 = elgg_view_title(elgg_echo("file:type:" . $tag)); } } } if ($friends) { $area1 = get_filetype_cloud($friends, true); } else { if ($owner_guid) { $area1 = get_filetype_cloud($owner_guid); } else { $area1 = get_filetype_cloud(); } } // Set context set_context('search'); $limit = 10; if ($search_viewtype == "gallery") { $limit = 12; } if (!empty($tag)) { $area2 .= list_entities_from_metadata($md_type, $tag, 'object', 'file', $owner_guid, $limit); } else { $area2 .= list_entities("object", "file", $owner_guid, $limit); } set_context("file"); $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2);
<?php /** * Elgg file browser * * @package ElggFile * @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ */ require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php"; if (is_callable('group_gatekeeper')) { group_gatekeeper(); } $area2 = elgg_view_title($title = elgg_echo('file:yours:friends')); set_context('search'); $area2 .= list_user_friends_objects(page_owner(), 'file'); set_context('file'); $area1 = get_filetype_cloud(page_owner(), true); $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2); // Finally draw the page page_draw(sprintf(elgg_echo("file:friends"), $_SESSION['user']->name), $body);
* @author Curverider Ltd * @copyright Curverider Ltd 2008-2009 * @link http://elgg.com/ * * * TODO: File icons, download & mime types */ //require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); require_once dirname(dirname(dirname(__FILE__))) . "/engine/start.php"; if (is_callable('group_gatekeeper')) { group_gatekeeper(); } //set the title if (page_owner() == $_SESSION['user']) { $area2 = elgg_view_title($title = elgg_echo('file:yours')); } else { $area2 = elgg_view_title($title = elgg_echo('files')); } // Get objects set_context('search'); $area2 .= list_entities("object", "file", page_owner(), 10); set_context('file'); $get_filter = get_filetype_cloud(page_owner()); if ($get_filter) { $area1 = $get_filter; } else { $area2 .= elgg_view('page_elements/contentwrapper', array('body' => elgg_echo("file:none"))); } $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2); // Finally draw the page page_draw(sprintf(elgg_echo("file:user"), page_owner_entity()->name), $body);
* 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); $area1 = elgg_view('page_elements/content_header', array('context' => "friends", 'type' => 'file')); set_context('search'); // offset is grabbed in list_user_friends_objects $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 .= "<p class='margin_top'>" . elgg_echo("file:none") . "</p>"; } else { $area2 .= $content; } //get the latest comments on all files $comments = get_annotations(0, "object", "file", "generic_comment", "", 0, 4, 0, "desc"); $area3 = elgg_view('annotation/latest_comments', array('comments' => $comments)); $content = "<div class='files'>" . $area1 . $area2 . "</div>"; $body = elgg_view_layout('one_column_with_sidebar', $content, $area3); page_draw($title, $body);