hide Forum statistics from sidebar ?

erich37

Well-known member
Hello,

1)
I would like to hide "Members Online Now" and "Forum Statistics" in the sidebar. I want to hide it both for members and visitors.

2)
I would like to put the blocks "Find Member", "Highest Posting Members" and "Newest Members" to the Sidebar at the Homepage. Exactly the same blocks as are being shown at the "Members Page".
I want to have these blocks positioned atop the "Share this Page"-block (in the Sidebar) at the Homepage.

Could you please give me a quick help on this?

Thanks!
 
For 1, add to EXTRA.css:
Code:
#boardStats {
display: none;
}
 
.sidebar .userList {
display: none;
}

For 2, what homepage are you using?
If this is a portal, you will need to ask in the add-on thread as I don't have any installed.
 
For 2, what homepage are you using?
If this is a portal, you will need to ask in the add-on thread as I don't have any installed.

Hi Brogan,

I am just using XF default. The Forum-Nodes are the Homepage. Not using any portal or any custom design.
Appreciate your kind help! Thanks!
 
2)
I would like to put the blocks "Find Member", "Highest Posting Members" and "Newest Members" to the Sidebar at the Homepage. Exactly the same blocks as are being shown at the "Members Page".
I want to have these blocks positioned atop the "Share this Page"-block (in the Sidebar) at the Homepage.

Could you please give me a quick help on this?

Thanks!



Borbole's great Add-ons actually solved my above request:

http://xenforo.com/community/resources/authors/borbole.512/
 
To hide the forum stats for guests you'll need to modify the forum_stats block in the forum_list template.

Add this code at the top:
Code:
<xen:if is="{$visitor.user_id}">


Add this code at the bottom:
Code:
</xen:if>


so that it will look like this:
Code:
<!-- block: forum_stats -->
    <xen:if is="{$visitor.user_id}">
        <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>
    </xen:if>
        <!-- end block: forum_stats -->
 
For 1, add to EXTRA.css:
Code:
#boardStats {
display: none;
}

.sidebar .userList {
display: none;
}
.....

Paul, I just tried this to hide the core stats because I'm using an addon for stats and don't want both stat fields in the sidebar (they do not match anyway). It didn't work - is it no longer a valid edit for 1.4?
 
Hmm. Wonder what I am doing wrong then. I copied your code and placed it in the said template and the stat box is still there. Any idea why it might not be working?

extra css.webp

That shows the codes both on the same lines, but I tried it exactly as you had it shown also and it didn't make a difference.
 
Okay, I deleted the code and saved it as a bank page, because I wasn't sure that the 'Delete Template' option would only delete the edit.

So should I not use that code for editing individual themes either?
 
That is the correct code if you want to hide those blocks in the sidebar.

It needs to be added to the EXTRA.css template for each (parent) style.
 
I'm not asking the right questions I realize. Let me try it this way. I want to hide the core stat field . . . .
side stats1.webp

. . . . so that I can enable the AO that I have which shows more statistics. I would like to hide the core field and show the AO field once I enable it. How can I do this?
 
Once again, the code above will hide the default statistics block on the sidebar.

If you are using a custom style, you may need to use different selectors.
 
Okay I did that, but it hid everything in the sidebar except the Staff Online field. I won't trouble y'all with this further it's a little beyond my grasp so I will ask my tech to do this for me. Thanks for the help guys I appreciate it.
 
Top Bottom