1. 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! :(

Discussion in 'Styling and Customization Questions' started by zoldos, Jan 19, 2016.

  1. zoldos

    zoldos Well-Known Member

    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>
    
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    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'.
     
    zoldos likes this.
  3. zoldos

    zoldos Well-Known Member

    It returned NULL. So is this mod just not possible?? :)
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It would require custom development to expose the param to that template.
     
    zoldos likes this.
  5. zoldos

    zoldos Well-Known Member

    Okay thanks! I'm tinkering with the "Last seen" code to make that stand out more which is almost as good. :)
     

Share This Page