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

XF 1.5 Members Online Now

Discussion in 'XenForo Questions and Support' started by Ru Anderson, Aug 30, 2016.

  1. Ru Anderson

    Ru Anderson Member

    Hey guys!
    I had my 'members online now' box removed from my sidebar a while back and now want it activated again... but can't for the live of me find where to do this.

    Any ideas?

    Thanks in advance :)

    ~ Ru
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The only way to remove that is by editing the forum_list template, so you would need to revert whatever changes you made to that.
  3. Ru Anderson

    Ru Anderson Member

    Ah, I see.

    I checked it out.

    There's a lot of code between <!-- block: sidebar_online_users --> and <!-- end block: sidebar_online_users -->

    Is it simply a case of removing this or is there code to be edited elsewhere too?

  4. Amaury

    Amaury Well-Known Member

    Can you post of the contents of that section here?
  5. Brogan

    Brogan XenForo Moderator Staff Member

    If the template is unedited and the code is still present, then it's possible you removed it by some other method - CSS, a template modification, or an add-on.

    Do you use the WF add-on?
    Amaury likes this.
  6. Ru Anderson

    Ru Anderson Member

    Sure, here's the code:

    - block: sidebar_online_users -->
    <div class="section membersOnline userList">
    <div class="secondaryContent">
    <h3><a href="{xen:link online}" title="{xen:phrase see_all_online_users}">{xen:phrase members_online_now}</a></h3>

    <xen:if is="{$onlineUsers.records}">

    <xen:if is="{$visitor.user_id}">
    <xen:if hascontent="true">
    <h4 class="minorHeading"><a href="{xen:link account/following}">{xen:phrase people_you_follow}:</a></h4>
    <ul class="followedOnline">
    <xen:foreach loop="$onlineUsers.records" value="$user">
    <xen:if is="{$user.followed}">
    <li title="{$user.username}" class="Tooltip"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></li>
    <h4 class="minorHeading"><a href="{xen:link members}">{xen:phrase members}:</a></h4>

    <ol class="listInline">
    <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
    <xen:if is="{$i} <= {$onlineUsers.limit}">
    <xen:if is="{$user.user_id}">
    <a href="{xen:link members, $user}" dir="auto"
    class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}"><xen:avatar user="$user" size="s" img="true" class="_plainImage" /></a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
    <xen:else />
    {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
    <xen:if is="{$onlineUsers.recordsUnseen}">
    <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>

    <div class="footnote">
    {xen:phrase online_now_x_members_y_guests_z_robots_a, 'total={xen:number $onlineUsers.total}', 'members={xen:number $onlineUsers.members}', 'guests={xen:number $onlineUsers.guests}', 'robots={xen:number $onlineUsers.robots}'}
    <!-- end block: sidebar_online_users -->
  7. Ru Anderson

    Ru Anderson Member

    I'm not sure, I didn't actually do it.
  8. djbaxter

    djbaxter Active Member

    Did you resolve this? I have the same problem... deleted by previous admin or custom style.

Share This Page