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

XF 1.3 About members online

Discussion in 'XenForo Questions and Support' started by Cidrack, May 23, 2014.

  1. Cidrack

    Cidrack Active Member

    - I would like that the only admin can see what members online is viewing.

    Is it possible? How?

    Thanks.
     
    Last edited: May 23, 2014
  2. Tracy Perry

    Tracy Perry Well-Known Member

    Template edits to exclude all but certain user groups that you want to allow should work.
     
  3. Cidrack

    Cidrack Active Member

    Which template Please? And what I edit?

    I would like that members can see members online but dont what the members online is viewing.

    Thanks.
     
  4. Tracy Perry

    Tracy Perry Well-Known Member

    member_card is one
    Code:
            <xen:comment><xen:if is="{$canViewOnlineStatus}">
                <dl class="pairsInline lastActivity">
                    <dt>{xen:phrase x_was_last_seen, 'username={$user.username}'}:</dt>
                    <dd>
                        <xen:if is="{$user.activity}">
                            <xen:if is="{$user.activity.description}">
                                {$user.activity.description}<xen:if is="{$user.activity.itemTitle}"> <em><a href="{$user.activity.itemUrl}" class="concealed">{$user.activity.itemTitle}</a></em></xen:if>,
                            <xen:else />
                                {xen:phrase viewing_unknown_page},
                            </xen:if>
                            <xen:datetime time="{$user.effective_last_activity}" class="muted" />
                        <xen:else />
                            <xen:datetime time="{$user.effective_last_activity}" />
                        </xen:if></xen:comment>
    
    member_view is another
    Code:
                    <xen:comment><xen:if is="{$canViewOnlineStatus}">
                        <dl><dt>{xen:phrase last_activity}:</dt>
                            <dd><xen:datetime time="$user.effective_last_activity" /></dd></dl>
                    </xen:if></xen:comment>
    
    You need to find the section for the online status and preface it with <xen:comment> and close it with </xen:comment> (which has been done in those two template segments)
    That will not show any of the online status (what they are viewing/doing) in the member card or the members profile view. There may be others - you need to check each template and see if you can find similar code and comment it out. @Brogan or @Jake Bunce may be able to tell you exactly all the templates. I've tagged them and maybe one of them will chime in.
     
    Cidrack likes this.
  5. Brogan

    Brogan XenForo Moderator Staff Member

    Commenting out the code will remove it for everyone.

    If you want the admin only to be able to do that, add $visitor.is_admin to the conditional statement.
     
    Cidrack and Tracy Perry like this.
  6. Tracy Perry

    Tracy Perry Well-Known Member

    Ooops.. I had overlooked the Admin only portion. But the those two areas would be the only ones needed, correct @Brogan?
     
  7. Brogan

    Brogan XenForo Moderator Staff Member

    The member card also shows the activity.
     
  8. Cidrack

    Cidrack Active Member

    I didnt understand....

    What I put In Member card and member view?

    Like this?

    <xen:if is="{$visitor.is_admin}"><xen:if is="{$canViewOnlineStatus}">
    <dl><dt>{xen phrase last_activity}:</dt>
    <dd><xen:datetime time="$user.effective_last_activity" /></dd></dl>
    </xen:if>
    </xen:if>
     

Share This Page