• 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

Teapot

Well-known member
#1
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?
 

Jake Bunce

XenForo moderator
Staff member
#2
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>
 

Teapot

Well-known member
#4
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?