Rich Username in Recent activity tab, Navigation menu, and last seen sentence?

#1
Hey guys,

I need a little help doing 3 things with rich username and I have pictures to explain what i need help with.


This image below is where I want to make rich username text to appear in the recent activity tab in the user profile.
This image below is where I want to make rich username text appear in the "Last Seen" sentence.​
And this image is where I want rich username text to appear in both the top navigation and inside the navigation settings menu.
I would appreciate it very much if someone could give me some code on how to change these things!
Thanks, Houston​
 

Jake Bunce

XenForo moderator
Staff member
#2
An addon is required for the first two.

For the profile tab you can edit the navigation_visitor_tab template and replace the two instances of {$visitor.username} with {xen:helper richusername, $visitor}. But to make it work with the default CSS selectors for username markup you need to also add a username class.

Rich (BB code):
<xen:edithint template="navigation.css" />

<ul class="visitorTabs">

	<xen:hook name="navigation_visitor_tabs_start" />

	<!-- account -->
	<li class="navTab account Popup PopupControl PopupClosed {xen:if $tabs.account.selected, 'selected'}">
	
		<a href="{xen:link account}" class="navLink accountPopup username" rel="Menu"><strong>{xen:helper richusername, $visitor}</strong></a>
		
		<div class="Menu JsOnly" id="AccountMenu">
			<div class="primaryContent menuHeader">
				<xen:avatar user="$visitor" size="m" class="NoOverlay plainImage" title="{xen:phrase view_your_profile}" />
				
				<h3><a href="{xen:link members, $visitor}" class="concealed username" title="{xen:phrase view_your_profile}">{xen:helper richusername, $visitor}</a></h3>
				
				<xen:if hascontent="true"><div class="muted"><xen:contentcheck>{xen:helper usertitle, $visitor}</xen:contentcheck></div></xen:if>
				
				<ul class="links">
					<li class="fl"><a href="{xen:link members, $visitor}">{xen:phrase your_profile_page}</a></li>
				</ul>
			</div>
The result:

Screen shot 2013-01-10 at 3.34.21 AM.png
 
#3
An addon is required for the first two.

For the profile tab you can edit the navigation_visitor_tab template and replace the two instances of {$visitor.username} with {xen:helper richusername, $visitor}. But to make it work with the default CSS selectors for username markup you need to also add a username class.

Rich (BB code):
<xen:edithint template="navigation.css" />
 
<ul class="visitorTabs">
 
<xen:hook name="navigation_visitor_tabs_start" />
 
<!-- account -->
<li class="navTab account Popup PopupControl PopupClosed {xen:if $tabs.account.selected, 'selected'}">
 
<a href="{xen:link account}" class="navLink accountPopup username" rel="Menu"><strong>{xen:helper richusername, $visitor}</strong></a>
 
<div class="Menu JsOnly" id="AccountMenu">
<div class="primaryContent menuHeader">
<xen:avatar user="$visitor" size="m" class="NoOverlay plainImage" title="{xen:phrase view_your_profile}" />
 
<h3><a href="{xen:link members, $visitor}" class="concealed username" title="{xen:phrase view_your_profile}">{xen:helper richusername, $visitor}</a></h3>
 
<xen:if hascontent="true"><div class="muted"><xen:contentcheck>{xen:helper usertitle, $visitor}</xen:contentcheck></div></xen:if>
 
<ul class="links">
<li class="fl"><a href="{xen:link members, $visitor}">{xen:phrase your_profile_page}</a></li>
</ul>
</div>
Thanks, Jake
 
Top