From 59da34fb0c7a590db505777742ca21e1dd5b5cba Mon Sep 17 00:00:00 2001 From: brettp Date: Thu, 4 Mar 2010 01:23:10 +0000 Subject: Merged members plugin's new layout. git-svn-id: http://code.elgg.org/elgg/trunk@5269 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/members/index.php | 65 +++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 25 deletions(-) (limited to 'mod/members/index.php') diff --git a/mod/members/index.php b/mod/members/index.php index ecfcabb1c..d9ef0a732 100644 --- a/mod/members/index.php +++ b/mod/members/index.php @@ -1,7 +1,6 @@ getGUID()); +} + // get filter parameters $limit = get_input('limit', 10); $offset = get_input('offset', 0); @@ -20,45 +26,54 @@ $filter = get_input("filter", "newest"); // search options $tag = get_input('tag'); +// friends links +$area1 = ""; //search members -$sidebar = elgg_view("members/search"); - -// get the correct content based on filter/search -switch ($filter) { +$area1 .= elgg_view("members/search"); + +// count members +$members = get_number_users(); + +// title +$pagetitle = elgg_echo("members:members")." ({$members})"; +$area2 = elgg_view_title($pagetitle); + +//get the correct view based on filter +switch($filter){ + case "newest": + $content = list_entities("user","",0,10,false); + break; case "pop": $filter_content = list_entities_by_relationship_count('friend', true, '', '', 0, 10, false); - break; + break; case "active": - $filter_content = elgg_view("members/online"); - break; + $filter_content = get_online_users(); + break; // search based on name case "search": set_context('search'); $filter_content = list_user_search($tag); - break; + break; // search based on tags case "search_tags": $filter_content = trigger_plugin_hook('search','',$tag,""); $filter_content .= list_entities_from_metadata("", $tag, "user", "", "", 10, false, false); - break; + break; case "newest": case 'default': $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE)); - break; + break; } -// create the members navigation/filtering -$members = get_number_users(); -$members_nav = elgg_view("members/members_sort_menu", array("count" => $members, "filter" => $filter)); - -$content = $members_nav . $filter_content; - -// title -$main_content = elgg_view_title(elgg_echo("members:members")); - -$main_content .= elgg_view('page_elements/contentwrapper', array('body' => $content, 'subclass' => 'members')); +$area2 .= elgg_view('page_elements/elgg_content', array('body' => elgg_view("members/members_navigation", array("count" => $members, "filter" => $filter)) . "
".$filter_content."
", 'subclass' => 'members')); -$body = elgg_view_layout("sidebar_boxes", $sidebar, $main_content); +//select the correct canvas area +$body = elgg_view_layout("one_column_with_sidebar", $area1, $area2); -page_draw(elgg_echo('members:members'), $body); +// Display page +page_draw(sprintf(elgg_echo('members:members'), $page_owner->name), $body); \ No newline at end of file -- cgit v1.2.3