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

Username above avatar

Discussion in 'Styling and Customization Questions' started by James33, Dec 29, 2011.

  1. James33

    James33 Member

    How can i move user name above avatar ?
     
  2. Fuhrmann

    Fuhrmann Well-Known Member

    Search for the template message_user_info.

    Delete this hole block of the template:


    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}</xen:contentcheck></em></xen:if>
    <!-- slot: message_user_info_text -->
    </h3>
    </xen:hook>
    

    Copy this block of template:

    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}</xen:contentcheck></em></xen:if>
    <!-- slot: message_user_info_text -->
    </h3>
    </xen:hook>
    </xen:if>
    

    Past in here (replacing the red part):

    Code:
    <xen:require css="message_user_info.css" />
     
    <div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">
    <div class="messageUserBlock">
    PAST HERE THE BLOCK
    <xen:hook name="message_user_info_avatar" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
    <div class="avatarHolder">
    <span class="helper"></span>
    <xen:avatar user="$user" size="m" />
    <!-- slot: message_user_info_avatar -->
    </div>
    </xen:hook>
    

    1.png

    If you only want to keep the name above the avatar and the usertitle below, dont delete the following line in the first instruction:

    Code:
    <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
     
    
    This line is in the second block to, so you may want to remove it.
     
  3. James33

    James33 Member

    thans but too late for user title i already removed the code now where to put this ? i want user title below avatar.

    Code:
    <xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>
    
     
  4. Fuhrmann

    Fuhrmann Well-Known Member

    In the red part:

    Code:
    USER TITLE GOES HERE
    <xen:if hascontent="true">
    <div class="extraUserInfo">
    <xen:contentcheck>
    <xen:hook name="message_user_info_extra" params="{xen:array 'user={$user}', 'isQuickReply={$isQuickReply}'}">
    
     
    James33 likes this.
  5. UKD

    UKD Active Member

    Just to update this as I ran into problems before figuring out the issues. The method above will delete your user banner. To fix this just place this code

    Code:
    {xen:helper userBanner, $user, 'wrapped'}
    above the text "<!-- slot: message_user_info_avatar -->" and your banner/image will appear below your custom title.
     

Share This Page