Moving Visitor Tabs to the Moderator Bar - Forsaken

Discussion in 'XenForo Discussions' started by Brandon, Jan 31, 2013.

  1. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,707
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    I'd like to thank Forsaken for allowing us to repost this guide at Admin Talk.

    moderator_bar

    Replace the following:
    Code:
    <xen:hook name="moderator_bar" />
    
    With:
    Code:
    <xen:if is="{$visitor.user_id}">
    <xen:include template="navigation_visitor_tab" />
    </xen:if>
     
    <xen:hook name="moderator_bar" />
    
    navigation_visitor_tab

    Replace the following:
    Code:
    <xen:if is="{$tabs.account.selected}">
    <li class="navTab selected PopupClosed">
    <div class="tabLinks">
    <div class="primaryContent menuHeader">
    <h3>{$tabs.account.title}</h3>
    <div class="muted">{xen:phrase quick_links}</div>
    </div>
    <ul class="secondaryContent blockLinksList">
    <xen:hook name="navigation_tabs_account">
    <li><a href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
    <li><a href="{xen:link conversations}">{xen:phrase conversations}</a></li>
    <li><a href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li>
    <li><a href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
    <!--<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>-->
    </xen:hook>
    </ul>
    </div>
    </li>
    </xen:if>
    
    With:
    Code:
    <xen:comment>
    <xen:if is="{$tabs.account.selected}">
    <li class="navTab selected PopupClosed">
    <div class="tabLinks">
    <div class="primaryContent menuHeader">
    <h3>{$tabs.account.title}</h3>
    <div class="muted">{xen:phrase quick_links}</div>
    </div>
    <ul class="secondaryContent blockLinksList">
    <xen:hook name="navigation_tabs_account">
    <li><a href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
    <li><a href="{xen:link conversations}">{xen:phrase conversations}</a></li>
    <li><a href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li>
    <li><a href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
    <!--<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>-->
    </xen:hook>
    </ul>
    </div>
    </li>
    </xen:if>
    </xen:comment>
    
    navigation

    Replace the following:
    Code:
    <xen:if is="{$visitor.user_id}"><xen:include template="navigation_visitor_tab" /></xen:if>
    
    With:
    Code:
    <xen:if is="{$tabs.account.selected}">
    <li class="navTab selected blankTab PopupClosed">
    <div class="tabLinks">
    <div class="primaryContent menuHeader">
    <h3>{$tabs.account.title}</h3>
    <div class="muted">{xen:phrase quick_links}</div>
    </div>
    <ul class="secondaryContent blockLinksList">
    <xen:hook name="navigation_tabs_account">
    <li><a href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
    <li><a href="{xen:link conversations}">{xen:phrase conversations}</a></li>
    <li><a href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li>
    <li><a href="{xen:link account/likes}">{xen:phrase likes_youve_received}</a></li>
    <!--<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>-->
    </xen:hook>
    </ul>
    </div>
    </li>
    </xen:if>
    </ul>
     
    <xen:comment>
    <xen:if is="{$visitor.user_id}"><xen:include template="navigation_visitor_tab" /></xen:if>
    </xen:comment>
    
    PAGE_CONTAINER

    Replace the following:
    Code:
    <xen:if is="{$visitor.is_moderator} || {$visitor.is_admin}">
    <xen:include template="moderator_bar" />
    <xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
    <xen:include template="login_bar" />
    </xen:if>
    
    With:
    Code:
    <xen:if is="{$visitor.user_id}">
    <xen:include template="moderator_bar" />
    <xen:elseif is="!{$visitor.user_id} && !{$hideLoginBar}" />
    <xen:include template="login_bar" />
    </xen:if>
    
    extra.css

    Add the following:
    Code:
    #moderatorBar .adminLink
    {
    float:left;
    }
    #moderatorBar .visitorTabs
    {
    float: right;
    }
    #moderatorBar .visitorTabs li
    {
    float:left;
    }
    #moderatorBar .visitorTabs .navLink
    {
    line-height: 16px;
    }
    #moderatorBar .visitorTabs .navLink:hover
    {
    }
    #moderatorBar .visitorTabs .navLink .itemCount
    {
    line-height: 16px;
    }
    #moderatorBar .visitorTabs .navLink .itemCount:hover
    {
    }
    
    You'll need to modify your CSS on your own, but the above code should be all you should need.

    1.png
    2.png
    3.png
     
    bigbigfan and Allan like this.
  2. Allan

    Allan It's All Good

    Joined:
    Oct 23, 2009
    Messages:
    240
    Likes Received:
    50
    Location:
    Northeast PA
    This works great, Great post share Brandon.
     
    Brandon likes this.
  3. bigbigfan

    bigbigfan Regular Member

    Joined:
    Jan 18, 2013
    Messages:
    61
    Likes Received:
    22
    What exactly does it do? Which template does it do it for?

    I don't have Xenforo software but this sounds like one of the guide types I'd like to bookmark.
     
  4. Brandon

    Brandon Regular Member

    Joined:
    Jun 1, 2009
    Messages:
    6,602
    Likes Received:
    1,707
    Location:
    Topeka, Kansas
    First Name:
    Brandon
    The templates are listed above in bold.
    It looks like it just moves some info to the moderator bar, which is generally on top of the forums above everything else.
    I'll be honest, I haven't checked this edit out to closely yet, plus the style we have from @Miner has the moderator bar at the bottom.
     

Share This Page