• 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?

#1
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}}
 

Jake Bunce

XenForo moderator
Staff member
#2
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:

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