solved Following List

blindmime
@blindmime
7 years ago
772 posts
How do I list the profiles a user is following on her profile index page?
updated by @blindmime: 06/18/17 07:20:23PM
douglas
@douglas
7 years ago
2,790 posts
You can use a jrCore_list function with the jrFollower module.

Something like this maybe?

{jrCore_list module="jrFollower" search1="follow_profile_id = #" search2="follow_active = 1" order_by="_created desc" pagebreak=9 page=$_post.p template=$ftpl pager=true}

of course change the # to the correct profile_id.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

updated by @douglas: 01/24/17 06:22:37AM
blindmime
@blindmime
7 years ago
772 posts
I don't know what the correct profile_id since that is actually determined by whom she might be following. What's the search to find the profiles a user is following?
updated by @blindmime: 02/05/17 02:27:07PM
paul
@paul
7 years ago
4,326 posts
{$_followers = jrFollower_get_users_following($_profile_id)}

The function will will return a list of users who follow the profile_id so then you can loop round the $_followers array to show them - (user_id => user_name)
hth


--
Paul Asher - JR Developer and System Import Specialist
blindmime
@blindmime
7 years ago
772 posts
Sounds good.

How does {$jamroom_url}/follows/following work? That shows what I want as well.
michael
@michael
7 years ago
7,715 posts
blindmime:...How does {$jamroom_url}/follows/following work?....
That URL is powered by the jrFollower modules following view.

To see the code that powers that, you'd look in:
/modules/jrFollower/index.php

for the view_jrFollower_following() function.
blindmime
@blindmime
7 years ago
772 posts
Another approach with jrCore_list is this:
   {jrCore_list module="jrFollower" search1="_user_id = `$_user._user_id`" order_by="_created desc" limit=10000 template="index_list_following.tpl"}
Where index_list_following is
{jrCore_module_url module="jrFollower" assign="murl"}
{if isset($_items)}
{foreach $_items as $item}

{if $item._user_id == $_user._user_id}

<div class="col3">
 {jrCore_list module="jrProfile" profile_id=$item.follow_profile_id template="index_list_following_profile.tpl"}
 </div>

{/if}

{/foreach}
{/if}

updated by @blindmime: 03/19/17 03:13:21PM

Tags