Adding an image under custom title for each user group??

Ranger375

Well-known member
How can I add an image under the custom title area in the post bit. I am trying to do this so it is user group based, so essentially each usergroup would have its own image.

Thx
 
Admin CP -> Appearance -> Templates -> message_user_info

Add this code:

Code:
                <xen:if is="{$user.user_group_id} == 2">
		    <img src="PATH/TO/image.gif" />
                </xen:if>

...as shown below:

Code:
<xen:require css="message_user_info.css" />

<div class="messageUserInfo" itemscope itemtype="http://data-vocabulary.org/Person">
	<div class="messageUserBlock">
		<div class="avatarHolder"><xen:avatar user="$user" size="m" itemprop="photo" /></div>

<xen:if is="!{$isQuickReply}">
	<h3 class="userText">
		<a {xen:if $user.user_id, 'href="{xen:link members, $user}" '}class="username" itemprop="name">{xen:helper richUserName, $user}</a>
		<xen:if hascontent="true"><em class="userTitle" itemprop="title"><xen:contentcheck>{xen:helper userTitle, $user}</xen:contentcheck></em></xen:if>

                <xen:if is="{$user.user_group_id} == 2">
		    <img src="PATH/TO/image.gif" />
                </xen:if>

	</h3>

	<xen:if hascontent="true">

Change the image location and usergroupid number appropriately. You can add more instances of that code to cover other groups.

edit - this only checks the primary usergroup.
 
One of the posts in the tips and tricks forum shows that you can add an image to the side of your user name with the following code:

font-family: "Lucida Grande" ,Helvetica,Arial,sans-serif;
font-weight: bold;
color: #73427c;
background-image: url(styles/default/xenforo/smilies/admin.png);
background-repeat: no-repeat;
padding-left: 13px;

Is there a way to modify this code to have the image appear below, rather that to the side? The above
code is placed in the usergroup css section, and would solve my problem.
 
Top Bottom