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

Custom User Field check box w/image?

#1
I would like a check box to tick for a custom user field, instead of a text string. Then when activated it would display an image under the avatar. If it's not ticked then there would be no image. I have the image code ready but I can't figure out the check box part. Is this possible?
 

Jake Bunce

XenForo moderator
Staff member
#2
Create a new user field:

Admin CP -> Users -> Custom User Fields

To create the image you need to specify the HTML:

General Options: Value Display HTML

For example:

Code:
<img src="path/to/{$value}.gif" alt="{$value}" />
Also, there is this option you need to enable:

General Options: Viewable in message user info

In addition, make sure this is enabled in your style:

Admin CP -> Appearance -> Style Properties -> Message Elements -> Show custom user fields

Now when a user enters a value into that field it will show the image in their posts.
 
#4
I applied this logic to the resource custom feild but it doesn't work. Is there anything else I need to apply or activate?


Create a new user field:

Admin CP -> Users -> Custom User Fields

To create the image you need to specify the HTML:

General Options: Value Display HTML

For example:

Code:
<img src="path/to/{$value}.gif" alt="{$value}" />
Also, there is this option you need to enable:

General Options: Viewable in message user info

In addition, make sure this is enabled in your style:

Admin CP -> Appearance -> Style Properties -> Message Elements -> Show custom user fields

Now when a user enters a value into that field it will show the image in their posts.
 

Jake Bunce

XenForo moderator
Staff member
#5
@Market1234

Nothing shows at all? It should show up in the user info area on the left side of posts.

If it's not working then it might be due to a style customization. Try reverting the message_user_info template in your style.