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

XF 1.5 Can I disable "forum statistics" and "share this page" in sidebar?

#1
Due to regulatory measures being put in place by the state department, I'm going to have to cut off public access to my forum. I will also have to vet members prior to giving them access to content, so everyone will have to use their real name, DOB, location, etc.

I've already turned off guest access to member lists and threads, but guests can still see the newest member in the sidebar. I want them to be able to see the node list, obviously I don't want them to be able to see any information on any member.

I also will no longer need the sharing icons since there won't be anything to share publicly.
 
#3
Generally, you'd need to remove them from the relevant template. In this case, forum_list.
Okay, I will try that. What line do I need to look for? I'm not really able to make heads or tails of the code in there.

Also, just to double check, I've created a child style, so editing the template won't affect the parent style, correct? So if I screw it up or there's an unexpected bug I can just delete the child and start over?
 

Mike

XenForo developer
Staff member
#4
You're removing:
Code:
        <!-- 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:include template="sidebar_share_page">
            <xen:set var="$url">{xen:link canonical:forums}</xen:set>
        </xen:include>
Also, just to double check, I've created a child style, so editing the template won't affect the parent style, correct? So if I screw it up or there's an unexpected bug I can just delete the child and start over?
Editing a child style won't affect the parent. If this is the only change, then you can just delete the child style. Though it's simpler to just revert the template in question.
 
#5
You're removing:
Code:
        <!-- 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:include template="sidebar_share_page">
            <xen:set var="$url">{xen:link canonical:forums}</xen:set>
        </xen:include>

Editing a child style won't affect the parent. If this is the only change, then you can just delete the child style. Though it's simpler to just revert the template in question.
I updated to 2.0 since doing this, and the template seems to have changed. How can I accomplish this mod in 2.0? I just want to get rid of where it shows the latest member.
 

Mike

XenForo developer
Staff member
#6
To remove the areas you talked about, it'd be done by widgets.

To customize the forum stats widget, it'd be the widget_forum_statistics template.
 
#7
To remove the areas you talked about, it'd be done by widgets.

To customize the forum stats widget, it'd be the widget_forum_statistics template.
I actually might have a better way to do it. If I can make it to where guests can see the homepage but not the forums page then that would actually be better. Do you think that would be possible?