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

XF 1.3 Hide Sidebar from guests....

Discussion in 'Styling and Customization Questions' started by n1cks21, Mar 18, 2014.

  1. n1cks21

    n1cks21 Member

    Hi Guys,
    I need help, can anyone please explain how I can hide the sidebar from guests? if you look HERE on my testrig I would like to remove the sidebar to guests so I can stretch my image carousel to fill the screen.

    any help would be much appreciated

    Ta
     
  2. borbole

    borbole Well-Known Member

    At the forum_list template, find this code:

    Code:
    <xen:sidebar>
        <xen:edithint template="sidebar.css" />
       
        <xen:hook name="forum_list_sidebar">
            <xen:include template="sidebar_online_users" />
           
            <!-- 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>
           
        </xen:hook>
    </xen:sidebar>
    And replace it with this:

    Code:
    <xen:if is="{$visitor.user_id}">   
    <xen:sidebar>
        <xen:edithint template="sidebar.css" />
       
        <xen:hook name="forum_list_sidebar">
            <xen:include template="sidebar_online_users" />
           
            <!-- 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>
           
        </xen:hook>
    </xen:sidebar>
    </xen:if>
     
    JohnDer and n1cks21 like this.
  3. n1cks21

    n1cks21 Member

    Thanks for the quick reply, it worked a treat :)
     
    borbole likes this.
  4. RoldanLT

    RoldanLT Well-Known Member

    I suggest you use BD Widget Framework (y)
     
  5. borbole

    borbole Well-Known Member

    You are welcome :)
     
    n1cks21 likes this.

Share This Page