getGUID()); } // get filter parameters $limit = get_input('limit', 10); $offset = get_input('offset', 0); $filter = get_input("filter", "newest"); // search options $tag = get_input('tag'); // friends links $area1 = "
"; //search members $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": $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE)); break; case "pop": $filter_content = list_entities_by_relationship_count('friend', true, '', '', 0, 10, false); break; case "active": $filter_content = get_online_users(); break; // search based on name case "search": elgg_set_context('search'); $filter_content = list_user_search($tag); break; // search based on tags case "search_tags": $options = array(); $options['query'] = $tag; $options['type'] = "user"; $options['offset'] = $offset; $options['limit'] = $limit; $results = trigger_plugin_hook('search', 'tags', $options, array()); $count = $results['count']; $users = $results['entities']; $filter_content = elgg_view_entity_list($users, $count, $offset, $limit, false, false, true); break; case 'default': $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE)); break; } $area2 .= elgg_view('page_elements/content', array('body' => elgg_view("members/members_navigation", array("count" => $members, "filter" => $filter)) . "