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

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

Discussion in 'Styling and Customization Questions' started by xihouston, Jan 8, 2013.

  1. xihouston

    xihouston Member

    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​
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    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.

    <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>
    The result:

    Screen shot 2013-01-10 at 3.34.21 AM.png
    xihouston likes this.
  3. xihouston

    xihouston Member

    Thanks, Jake

Share This Page