XF 1.X Moving username above avatar in message user info panel

Russ

Pixel Exit Staff
#2
Hello, i would like to know how to move the username above the avatar in user info panel in postbit.
Thank you.
Hey,

Open up the template:

sidebar_visitor_panel



Re-arrange the h2 where it shows the username like this:

Move this:

Code:
     <h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay'}'}</h2>
Above the
Code:
<xen:avatar user="$visitor" size="m" img="true" />
Like so:
Code:
<xen:if is="{$visitor.user_id}">

<div class="section visitorPanel">
   <div class="secondaryContent">
     <h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay'}'}</h2>
     <xen:avatar user="$visitor" size="m" img="true" />
    
     <div class="visitorText">    
       <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>
       </div>
       </xen:hook>
 
#3
Hey,

Open up the template:

sidebar_visitor_panel



Re-arrange the h2 where it shows the username like this:

Move this:

Code:
     <h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay'}'}</h2>
Above the
Code:
<xen:avatar user="$visitor" size="m" img="true" />
Like so:
Code:
<xen:if is="{$visitor.user_id}">

<div class="section visitorPanel">
   <div class="secondaryContent">
     <h2>{xen:phrase signed_in_as_x_sidebar, 'name={xen:helper username, $visitor, 'NoOverlay'}'}</h2>
     <xen:avatar user="$visitor" size="m" img="true" />
   
     <div class="visitorText">   
       <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>
       </div>
       </xen:hook>
Thank you but i said in postbit not in sidebar =)
 

Russ

Pixel Exit Staff
#4
Thank you but i said in postbit not in sidebar =)
So you did :), I just read user panel.

Open up message_user_info:

Find this(towards the top)

Code:
<xen:if is="!{$isQuickReply}">
   <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
     <h3 class="userText">
       <xen:username user="$user" itemprop="name" rich="true" />
       <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
       {xen:helper userBanner, $user, 'wrapped'}
       <!-- slot: message_user_info_text -->
     </h3>
   </xen:hook>
Remove this part:

Code:
   <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
     <h3 class="userText">
       <xen:username user="$user" itemprop="name" rich="true" />
       <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
       {xen:helper userBanner, $user, 'wrapped'}
       <!-- slot: message_user_info_text -->
     </h3>
   </xen:hook>
Next add this:

Code:
<xen:if is="!{$isQuickReply}">
   <xen:hook name="message_user_info_text" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
     <h3 class="userText">
       <xen:username user="$user" itemprop="name" rich="true" />
       <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user, 1, 1}</xen:contentcheck></em></xen:if>
       {xen:helper userBanner, $user, 'wrapped'}
       <!-- slot: message_user_info_text -->
     </h3>
   </xen:hook>
</xen:if>
Right beneath:

Code:
<div class="messageUserBlock {xen:if $user.isOnline, online}">
 
Last edited:
#5
I find what you said confusing, sorry but im newbie, all i want is this
Code:
<xen:username user="$user" itemprop="name" rich="true" />
To be shown above avatar and not usertitle and banner ext ...
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.