1. 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

Discussion in 'Styling and Customization Questions' started by Nudaii, May 15, 2012.

  1. Nudaii

    Nudaii Well-Known Member

    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
    <if condition="$post[field20]">
    <img src="$post[field20].gif" width=35 height=25 border="0" alt="$post[field20]">
    What would be the XF code for this?

    Thanks in advance
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Admin CP -> Appearance -> Templates -> message_user_info

    This is a direct translation:

    <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}">
    Russ likes this.
  3. Kenneth Holland

    Kenneth Holland Active Member

    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?

  4. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Nope. It shows in their posts.
  5. Hristo Avramov

    Hristo Avramov Active Member

    I want to make custom icons too, where exactly in the code should I insert this ?

Share This Page