By Ashley Rosenthal on Thursday, 23 January 2014
Posted in General Issues
Replies 1
Likes 0
Views 827
Votes 0
Hi there!

I know you all are busy at work and I don't want to distract from that, but I have a quick question about my current code customizing venture. As I've mentioned, I am trying to create a minifeed for blog posts only from a users friends. I have most of the minifeed itself actually constructed and I am starting work on the PHP portion of the project.

I obviously have to first access a list of the Foundry::user's EasySocial friends. I am deciding which is the best way to go about this. My first instinct was to do a mysqli search similar to the one I used for our subscription minifeed. However, I've spent the last hour or so digging around the phpadmin trying to find what table has a list of users and their friends with very little success. I found a table that says social_friends but it is only showing the people that I have requested as friends, but not those who have requested me (at least not as the same category title)

Anyways, my question is, would it work to use this code to create a list of user's friends so that I can then access the posts that have been created by that list of friends:

$my = Foundry::user();

$my->getListFriends();

I saw the "getTotalFriends" command on the stackideas documentation and was wondering if the above code would work for my purposes?

A simple yes/no answer would be fine because I do not want to take you away from your current developments! Thanks sooo much!
Hi,

You can look at:

/administrator/components/com_easysocial/models/friends.php getFriends() for your purpose.

Foundry::model('friends')->getFriends( $userId );
·
Thursday, 23 January 2014 09:52
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post