jrFollower change?

blindmime
@blindmime
5 years ago
772 posts
I think there has possibly been a change in jrFollower or maybe jrUser that has broken something on my site. I wonder if you know what it is and can steer me toward a fix.

On the site index page, I have been listing the profiles a user is following with the following jrCore_list function:
{jrCore_list module="jrFollower" search1="_user_id = `$_user._user_id`" order_by="_created desc" limit=10000 template="index_list_following.tpl"}

index_list_following.tpl:
{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}

index_list_following_profile.tpl:
{if isset($_items)}
{foreach $_items as $item}

         <div class="p5 center" style="position:relative">
            <a href="{$jamroom_url}/{$item.profile_url}">{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_image" item_id=$item._profile_id size="large" crop="auto" class="img_scale" width=false height=false alt="{$txt|jrCore_entity_string}" title="{$txt|jrCore_entity_string}"}</a><br><a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a><br>
        </div>
    
{/foreach}
{/if}

updated by @blindmime: 10/25/19 11:27:03AM
nate
@nate
5 years ago
911 posts
What's this part?

{$txt|jrCore_entity_string}

Are you seeing anything in the error log?
paul
@paul
5 years ago
4,324 posts
The latest Follower module doesn't use a datastore any more so the 'jrCore_list' call isn't going to work now.

To show this on the index page now you might need to use the Follower module functions directly. Checkout the jrFollower_get_profiles_followed_by_profile_id($profile_id) - That should return an array of profiles followed that can then be used by the template -

{$_items = jrFollower_get_profiles_followed_by_profile_id($_user_id.profile_id)}
{if isset($_items)}
{foreach $_items as $item}

         <div class="p5 center" style="position:relative">
            <a href="{$jamroom_url}/{$item.profile_url}">{jrCore_module_function function="jrImage_display" module="jrProfile" type="profile_image" item_id=$item._profile_id size="large" crop="auto" class="img_scale" width=false height=false alt="{$txt|jrCore_entity_string}" title="{$txt|jrCore_entity_string}"}</a><br><a href="{$jamroom_url}/{$item.profile_url}">@{$item.profile_url}</a><br>
        </div>
    
{/foreach}
{/if}



--
Paul Asher - JR Developer and System Import Specialist
brian
@brian
5 years ago
10,136 posts
paul:
The latest Follower module doesn't use a datastore any more so the 'jrCore_list' call isn't going to work now.

That's actually not true - you just need to change the "module" parameter to be "jrUser" instead of "jrFollower", which makes sense - you are in effect making a list of USERS.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
paul
@paul
5 years ago
4,324 posts
Thanks Brian - Yes, forgot that was the way to do it now. Sorry :-)

@blindmime - The jrCore_list call to use now would be -

{jrCore_list module="jrUser" follow_profile_id=$_user._profile_id . . . etc . . .}


--
Paul Asher - JR Developer and System Import Specialist

Tags