I need to display the feeds from logged in user and his friends only in River, how can I do that.
Following code displays the posts from friends only but not included the posts from logged in users ( RIVER)
elgg_get_entity_relationship_where_sql($options['subject_guid'], $options['relationship_guid'] = elgg_get_logged_in_user_guid()) ;
$options['relationship'] = 'friend';
Please help
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.
We're talked about already: here and here
I had tried this but it is not displaying.
Please suggest
Else, if we are passing it through elgg_view array with setting order by
the feeds are not displaying in timely order as displaying the feeds of mine first and then friends.
Please help.
Please help by someone ?
Remove/Overwrite filter_context
Also, make your own layout w/o filter_context instead of elgg_view_layout('content', $params);
@RVR Thanks for your message.
Sorry, I couldn't able to understand the concept. Would you please confirm I am following correct steps as you explained.
A different layout is already using feed_view_layout('content',$params); and its files are inside , views/default/feeds and I have removed the filter.php file completely from layout/content/ directory, but still displaying as old.
Once again explaining the issue, Mine and Friends posts are displaying correctly, but the only issue is river is displaying mine posts first then bottom of that displaying the friends post, then we can understand it is not displaying as timely manner desc. Hope you understand ? Iam looking for a solution on this.
Your clauses are incorrect, you will have to use a more complex query. The simpler (less efficient) version is to add all friend guids to the subject guids parameter:
More complex query:
I haven't tested the queries though, just posting from top of my head.
Thank you very much but the error I am getting is but it is corrected when putting friend inside 'friend'
#1054 - Unknown column 'friend' in 'where clause'
@Ismayil Khayredinov
FANTASTIC !! You are Truly Awesome :) Seems you have sound knowledge in core of elgg. Noted you :)
friend.relationship = 'friend'
May I know the limit of post for this query, ? How set it as unlimited ?
- Previous
- 1
- 2
- Next
You must log in to post replies.