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

How to change shown icon in messages?

Discussion in 'Styling and Customization Questions' started by the100yen, Mar 26, 2013.

  1. the100yen

    the100yen Member

    Hello, I have added below line to my message template to show my custom user field!
    its working fine, but now I would like to change the img file to something different than what is set in custom user field for "Youtube" for this only

    Are there anyway that I can change the img for this?

    {xen:helper userFieldValue, $userFieldsInfo.Youtube, $message, {$message.customFields.Youtube}}
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Rather than using {xen:helper userFieldValue...} which will use the display HTML from the custom field, you can just insert your own HTML with appropriate variables. Example:

    <img src="path/to/images/{$message.customFields.Youtube}.gif" />
    This example uses the value of the custom field as part of the image path.

Share This Page