diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-03-03 17:53:05 +0000 |
commit | 4766f36a4d74924f21ff329c4318ce4e069ffa04 (patch) | |
tree | 969b84632f2a8b0db79788a8a6db8e41d63e5cb4 /mod/members/index.php | |
parent | 57a217fd6b708844407486046a1faa23b46cac08 (diff) | |
download | elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.gz elgg-4766f36a4d74924f21ff329c4318ce4e069ffa04.tar.bz2 |
Pulled in the interface changes.
git-svn-id: http://code.elgg.org/elgg/trunk@5257 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/members/index.php')
-rw-r--r-- | mod/members/index.php | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/mod/members/index.php b/mod/members/index.php new file mode 100644 index 000000000..ecfcabb1c --- /dev/null +++ b/mod/members/index.php @@ -0,0 +1,64 @@ +<?php + +/** + * Elgg members index page - called from filter or search + * + * @package ElggMembers + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Curverider <info@elgg.com> + * @copyright Curverider Ltd 2008-2010 + * @link http://elgg.com/ + */ + +require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php"); + +// get filter parameters +$limit = get_input('limit', 10); +$offset = get_input('offset', 0); +$filter = get_input("filter", "newest"); + +// search options +$tag = get_input('tag'); + + +//search members +$sidebar = elgg_view("members/search"); + +// get the correct content based on filter/search +switch ($filter) { + case "pop": + $filter_content = list_entities_by_relationship_count('friend', true, '', '', 0, 10, false); + break; + case "active": + $filter_content = elgg_view("members/online"); + break; + // search based on name + case "search": + set_context('search'); + $filter_content = list_user_search($tag); + 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; + case "newest": + case 'default': + $filter_content = elgg_list_entities(array('type' => 'user', 'offset' => $offset, 'full_view' => FALSE)); + 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')); + +$body = elgg_view_layout("sidebar_boxes", $sidebar, $main_content); + +page_draw(elgg_echo('members:members'), $body); |