Hello elggers,
I am using members plugin to show members list, and i would like to have only 2 tabs: Friends and Suggested friends. Thanks to this post https://community.elgg.org/discussion/view/1550369/list-of-friends-function-not-working, i could obtain the friends tab, but i don't how to code the other one ( which will only display those who are members but not friends of the user).
Any help will be appreciated.
Thank you.
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.
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- http://learn.elgg.org/en/1.11/tutorials/blog.html#registering-a-page-handler
- http://learn.elgg.org/en/1.11/tutorials/blog.html#displaying-list-of-my-blogs
- mary@mary
mary - 0 likes
- Juho Jaakkola@juho.jaakkola
Juho Jaakkola - 0 likes
- mary@mary
mary - 0 likes
You must log in to post replies.You can create a page with list of people just like you would create a page with a list of blogs. Start by reading how this tutorial creates a page for listing the blogs: http://learn.elgg.org/en/1.11/tutorials/blog.html
See especially there two steps:
Thank's @Judo,
I have already had a look on that. The thing is I just want to override the 'members' plugin to handle a new more tab "friends". I've tried on my test website this piece of code:
function members_list_friends($hook, $type, $returnvalue, $params){
if($returnvalue != null){ return;}
$options = array(
'relationship' => 'friend',
'relationship_guid' => $user_guid,
'inverse_relationship' => FALSE,
'type' => 'user',
'full_view' => FALSE
);
return elgg_list_entities_from_relationship($options);
}
function members_nav_friends($hook, $type, $returnvalue, $params) {
$returnvalue['friends'] = array(
'title' => elgg_echo('friends'),
'url' => "members/friends",
);
return $returnvalue;
}
And it did displayed all the members who are friends already and those who haven't approved the friend request yet.
But on my production site, the same plugin display all the users in friends tab!
I don't know how to fix it. Do you have any idea?
Any help will be appreciated .
Thank you.
Check that all plugins are in the same order in both environment. Some other plugin may be overriding your changes.
I've just checked, All the plugins are in the same order in both environment.
I don't know what's wrong about it