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

XF 1.2 Have 'Recent Activity' on nav bar

Discussion in 'XenForo Questions and Support' started by Antonio Coelho, Dec 13, 2013.

  1. Hello all,

    The 'Recent Activity' link is under Members tab.
    Is it possible to have it on the Nav bar itself?

    Also, is it possible to remove the 'Current Visitors' link from the Members tab?


    Screen Shot 2013-12-13 at 18.34.51.png

    Thanks in advance.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    You can edit the navigation template and move/add links as required.
     
  3. Well... I could remove the one about 'Current Visitors', but am struggling to create the new one regarding the 'Recent Activity'

    what I have done was:

    PHP:
            <!-- members -->
            <
    xen:if is="{$tabs.members}">
                <
    li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">
             
                    <
    a href="{$tabs.members.href}class="navLink">{$tabs.members.title}</a>
                    <
    a href="{$tabs.members.href}class="SplitCtrl" rel="Menu"></a>
                 
                    <
    div class="{xen:if {$tabs.members.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} membersTabLinks">
                        <
    div class="primaryContent menuHeader">
                            <
    h3>{$tabs.members.title}</h3>
                            <
    div class="muted">{xen:phrase quick_links}</div>
                        </
    div>
                        <
    ul class="secondaryContent blockLinksList">
                        <
    xen:hook name="navigation_tabs_members">
                            <
    li><a href="{xen:link members}">{xen:phrase notable_members}</a></li>
                            <
    xen:if is="{$xenOptions.enableMemberList}"><li><a href="{xen:link members/list}">{xen:phrase registered_members}</a></li></xen:if>
                        <!--    <
    li><a href="{xen:link online}">{xen:phrase current_visitors}</a></li> -->
                            <
    xen:if is="{$xenOptions.enableNewsFeed}"><li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li></xen:if>
                        </
    xen:hook>
                        </
    ul>
                    </
    div>
                </
    li>
            </
    xen:if>             

        <
    li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li>

             
            <!-- 
    extra tabsend -->
            <
    xen:if is="{$extraTabs.end}">
            <
    xen:foreach loop="$extraTabs.end" key="$extraTabIdvalue="$extraTab">
                <
    xen:if is="{$extraTab.linksTemplate}">
                    <
    li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">
             
                    <
    a href="{$extraTab.href}class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
                    <
    a href="{$extraTab.href}class="SplitCtrl" rel="Menu"></a>
                 
                    <
    div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} {$extraTabId}TabLinks">
                        <
    div class="primaryContent menuHeader">
                            <
    h3>{$extraTab.title}</h3>
                            <
    div class="muted">{xen:phrase quick_links}</div>
                        </
    div>
                        {
    xen:raw $extraTab.linksTemplate}
                    </
    div>
                </
    li>
                <
    xen:else />
                    <
    li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
                        <
    a href="{$extraTab.href}class="navLink">{$extraTab.title}</a>
                        <
    xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                    </
    li>
                </
    xen:if>
            </
    xen:foreach>
            </
    xen:if>
    Can you please help?
    This isn't my forte, sorry...
     
  4. Brogan

    Brogan XenForo Moderator Staff Member

    It needs to look something like this:
    Code:
    <li class="navTab PopupClosed"><a href="{xen:link recent-activity}" class="navLink">{xen:phrase recent_activity}</a></li>
     
    Antonio Coelho likes this.
  5. oman

    oman Well-Known Member

    Create a hidden link forum. Then put it on the nav bar with the nodes as tabs add on.
     
    Antonio Coelho likes this.
  6. Cool, it worked :D
    Thanks mate
     
  7. Need to try that add on ;)
     
  8. oman

    oman Well-Known Member

    No template edits required. But I can understand if you prefer to make the template edit.
     

Share This Page