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

XF 1.2 richUserName in visitor_panel?

Discussion in 'Styling and Customization Questions' started by iGloo', Mar 7, 2014.

  1. iGloo'

    iGloo' Member

    As the title say, I am looking to add the richUserName or anything else on the username who appear on the visitor panel, I made some research over here and I found nothing about it, but I know it's possible, I did it before... :censored:
    The fact is I want the exact line of code to change, because it seems that I can't use it on the visitor_panel for now...
    Screenshot : http://prntscr.com/2ykxxr

    Thank you for future answers.
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> sidebar_visitor_panel

    Add the red piece (9 lines down):

    <xen:if is="{$visitor.user_id}">
    <div class="section visitorPanel">
    	<div class="secondaryContent">
    		<xen:avatar user="$visitor" size="m" img="true" />
    		<div class="visitorText">
    			<h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay', 1}'}</h2>		
    			<div class="stats">
    			<xen:hook name="sidebar_visitor_panel_stats">
    				<dl class="pairsJustified"><dt>{xen:phrase messages}:</dt> <dd>{xen:number $visitor.message_count}</dd></dl>
    				<dl class="pairsJustified"><dt>{xen:phrase likes}:</dt> <dd>{xen:number $visitor.like_count}</dd></dl>
    				<dl class="pairsJustified"><dt>{xen:phrase points}:</dt> <dd>{xen:number $visitor.trophy_points}</dd></dl>
    <xen:else />
    <div class="section loginButton">		
    	<div class="secondaryContent">
    		<label for="LoginControl" id="SignupButton"><a href="{xen:link login}" class="inner">{xen:if $xenOptions.registrationSetup.enabled, {xen:phrase sign_up_now}, {xen:phrase log_in}}</a></label>
    <xen:include template="ad_sidebar_below_visitor_panel" />
    iGloo' and Amaury like this.
  3. Amaury

    Amaury Well-Known Member

    I've also been wanting to do this, so many thanks for posting this, Jake!
  4. iGloo'

    iGloo' Member

    You're the best, thank you! :')
    Just saying, but it should be as an option on Xenforo to be able to activate rich username. *-*

Share This Page