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

XF 1.1 Changing "Members" Tab to Recent Activity

Discussion in 'XenForo Questions and Support' started by Teapot, Jun 4, 2013.

  1. Teapot

    Teapot Well-Known Member

    Question as in title, really. I'd like to change the members tab so it links to /recent-activity/, preferably while maintaining the sublinks so the member list/1.2 Notable Members page and the online users page is still accessible. The reason I'd like to change the members tab instead of replacing it with an Activity one is because I'd still like member profile pages to be shown under the members tab.

    What's the most efficient way of doing this? If it requires writing code to do this, where should I start looking for how to override/extend navigation tabs?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> navigation

    Replace the red code:

    Code:
    		<!-- 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 registered_members}</a></li>
    						<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>
    
    ...with the blue code:

    Code:
    		<!-- members -->
    		<xen:if is="{$tabs.members}">
    			<li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">
    			
    				<a href="{xen:link recent-activity}" class="navLink">{$tabs.members.title}</a>
    				<a href="{xen:link recent-activity}" 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 registered_members}</a></li>
    						<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>
    
     
    Breixo, Teapot, mauzao9 and 1 other person like this.
  3. mauzao9

    mauzao9 Well-Known Member

    This sounds awesome! Recent activity indeed makes more sense to be the main page when users hit Members. ;)
     
    erich37 likes this.
  4. Teapot

    Teapot Well-Known Member

    Wow. I'm genuinely astounded as to how easy that was. Also astounded that I didn't figure it out myself!

    Thanks very much, Jake. Would you mind if I put this on the Resource Manager for others to find?
     
    Shelley likes this.
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Sure go ahead.
     
    Shelley likes this.
  6. Teapot

    Teapot Well-Known Member

Share This Page