Is there a way to link Trophy User Titles to images in the userinfo area?

Lone Wolf

Well-known member
I currently use a template edit which allows me to put an image into the user area of a specific usergroup. But I have 20 different images I'd like to use and I dont want to create 20 usergroups, it would be easier to link the images to User Titles instead.

Currently I edit message_user_info and add the following...

Code:
<!-- Start User Ranks -->

<xen:if is="{xen:helper ismemberof, $user, 2}">
<span class="userrank"><img src="styles/flexile/xenforo/ranks/top_cat.png"></span>
</xen:if>

<xen:if is="{xen:helper ismemberof, $user, 5}">
<span class="userrank"><img src="styles/flexile/xenforo/ranks/posting_mad.png"></span>
</xen:if>

<!-- End User Ranks -->

What I need is to replace the 'user is member of' field to 'user has trophy title X'

Does anyone know what command I need to achieve that?
 
There is no function you can use to directly check the trophy title. But you can check the user's title, trophy or not:

Rich (BB code):
<xen:if is="{xen:helper userTitle, $user} == 'title here'">

</xen:if>

Presumably your trophy titles are unique so you can get away with a string compare like this.
 
Thanks Jake, that works perfectly. I guess I could hide the user title from public view and let the user rank image do the talking. Do you know how I could do that?

It's a shame because I was hoping to let users have custom titles and use images as a user ranks system.
 
Im trying to create a query to add user images for specific users. I've tried the following but neither works...

Code:
<xen:if is="{xen:helper user_id, $user} == '3'">
<span class="userrank"><img src="styles/flexile/xenforo/ranks/admin.png"></span>
</xen:if>

Code:
<xen:if is="{xen:helper username, $user} == 'XFuser'">
<span class="userrank"><img src="styles/flexile/xenforo/ranks/admin.png"></span>
</xen:if>
 
I guess I could hide the user title from public view and let the user rank image do the talking. Do you know how I could do that?

You can remove the code for the user title from message_user_info:

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