XF 1.4 Hide "Staff Online Now" and "Members Online Now" to Guests?

Deceptive

Active member
How do I hide "Staff Online Now" and "Members Online Now" to guests? I have tried editing the sidebar_online_users template. I added <xen:if is="{$visitor.user_id}"> and it did not change anything. Editing the forum_lst template didn't change anything either.
 
Last edited:
See Mike's reply above. Where did you place it in the template?

This can be accomplished with a conditional, though.
I installed the add-0ns that Andy listed above.

For all 3, I put the conditional statements like this:
Code:
<xen:if is="{$visitor.user_id}">
<!-- block: forum_stats -->
        <div class="section">
            <div class="secondaryContent statsList" id="boardStats">
                <h3>{xen:phrase forum_statistics}</h3>
                <div class="pairsJustified">
                    <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
                        <dd>{xen:number $boardTotals.discussions}</dd></dl>
                    <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
                        <dd>{xen:number $boardTotals.messages}</dd></dl>
                    <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
                        <dd>{xen:number $boardTotals.users}</dd></dl>
                    <dl><dt>{xen:phrase latest_member}:</dt>
                        <dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
                    <!-- slot: forum_stats_extra -->
                </div>
            </div>
        </div>
        <!-- end block: forum_stats -->
</xen:if>

Clear the cache.
Sorry, I didn't see your reply until after Andy's reply.
 
Ok, that code is for the sidebar only on the forum list. Are you viewing the forum list, or a page from another addon that includes the sidebar. For example, our forum uses a Portal addon that includes the sidebar but uses a different template for it.
 
Ok, that code is for the sidebar only on the forum list. Are you viewing the forum list, or a page from another addon that includes the sidebar. For example, our forum uses a Portal addon that includes the sidebar but uses a different template for it.
I'm viewing the index(no portal add-on) as a guest.
 
Top Bottom