Hi,
I don't really think this is the right way to do this. What is really needed is a plugin that adds tabs like Alpha and Most Active and allows you to order the tabs and choose the default view.
But all I wanted was for Popular to be the default instead of Newest because the Newest account are often the least interesting.
So I did this.
/**
* Members page handler
*
* @param array $page url segments
* @return bool
*/
function members_page_handler($page) {
$base = elgg_get_plugins_path() . 'members/pages/members';
if (!isset($page[0])) {
$page[0] = 'popular';
}
Where I changed the word newest to popular and it worked.
I'm new to Elgg so any thoughts on this are appreciated.
Thanks,
Hairy Larry
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Nikolai Shcherbin@rivervanrain

Nikolai Shcherbin - 0 likes
- Team Webgalli@webgalli

Team Webgalli - 0 likes
You must log in to post replies.@hairylarry
My own solution for ALWAYS DELETING newest and online members
Index
Navigation:
If you are on 1.8, the way of doing it is unregister the members_page_handler() function. Register your own page handler for members page. and copy the pages/index.php to your plugin's pages/index.php \. Change the switch as folllows
switch ($vars['page']) {
case 'popular':
default:
$options['relationship'] = 'friend';
$options['inverse_relationship'] = false;
$content = elgg_list_entities_from_relationship_count($options);
break;
case 'online':
$content = get_online_users();
break;
case 'newest':
$content = elgg_list_entities($options);
break;
}