• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.5 online/offline icon code snippet NOT working on member profiles! :(

zoldos

Well-known member
#1
I use the below code to show when someone is on-line or off-line when reading posts. It displays the respective icon right below the user's avatar and I placed it in template "member_user_info".

I also want to use it in template "member_view" (member profiles) below the avatar but it won't work. It just shows everyone as off-line while it works perfectly when reading posts.

Help please! Thanks!

Code:
<xen:if is="{$user.isOnline}"><img src="images/online.gif"><xen:else /><img src="images/offline.gif"></xen:if>
 

Brogan

XenForo moderator
Staff member
#2
That param likely isn't available in that template.

You can check by dumping it:
Code:
{xen:helper dump, $user.isOnline}
If it returns 'null' then it's not available, otherwise it should return 'true' or 'false'.