XF 1.2 Putting Username/User Title Above Avatar?

JABRONI

Well-known member
How exactly do I put the username/user title above the avatar? Every time I try to switch around the code in messageUserInfo, it works, but the avatar doesn't show on the quick reply below the thread.

Edit: A simple search brought me this. I apologize for not searching first, and if anyone else was wondering, there's the answer.
 
Last edited:
Actually, that code is a bit outdated for the newer version of XenForo. If you'd like to keep your user banners then you want to find and remove this code:

Code:
<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>

Now copy this code:

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

Paste the code in the template:

Code:
<xen:require css="message_user_info.css" />
<div class="messageUserInfo" itemscope="itemscope" itemtype="http://data-vocabulary.org/Person">
<div class="messageUserBlock">
PAST THE CODE HERE
<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>

Save and then you're all done. Now you get to keep your user banners and still move the username and title.
 
Top Bottom