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

If condition custom field x show x image

Nudaii

Well-known member
#1
I'm about to move a large forum to xenforo, and one of the key parts of the forum is custom field images


we have 3 distinct groups

Example vb code
Code:
<if condition="$post[field20]">
<img src="$post[field20].gif" width=35 height=25 border="0" alt="$post[field20]">
</if>
What would be the XF code for this?

Thanks in advance
 

Jake Bunce

XenForo moderator
Staff member
#2
Admin CP -> Appearance -> Templates -> message_user_info

This is a direct translation:

Code:
<xen:if is="{$user.customFields.field_id}">
<img src="{$user.customFields.field_id}.gif" width=35 height=25 border="0" alt="{$user.customFields.field_id}">
</xen:if>
 
#3
Admin CP -> Appearance -> Templates -> message_user_info

This is a direct translation:

Code:
<xen:if is="{$user.customFields.field_id}">
<img src="{$user.customFields.field_id}.gif" width=35 height=25 border="0" alt="{$user.customFields.field_id}">
</xen:if>
Hi Jake,

This will show a custom field on the users member page correct?

How I get this to show on the post box info...not sure what this is called. I mean the box that shows your avatar and and info below it next to every message post. I want to be able to add information there. How do I do that?

Ken
 
#5
I want to make custom icons too, where exactly in the code should I insert this ?
Admin CP -> Appearance -> Templates -> message_user_info

This is a direct translation:

Code:
<xen:if is="{$user.customFields.field_id}">
<img src="{$user.customFields.field_id}.gif" width=35 height=25 border="0" alt="{$user.customFields.field_id}">
</xen:if>