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

Implemented Unserialize "custom_fields" in XenForo_ControllerPublic_Thread

SchmitzIT

Well-known member
#1
Cusotm Fields are great, and in our old forum setup, we used them to store anything that was worth storing, much of which ended up in the member-info block that is displayed in threads.

To accomplish something similar in XF, it would be nice if these custom fields are available for usage in a template. This does not seem to be currently possible without going in and doing something similar to what is being done to accomplish the Steam user block seen in this post.

Having the data available would mean no hacks have to be done on the core XF files, and it will ensure that add-on writers will not have to write their own methods to accomplish the same.

Thank you.
 
R

ragtek

Guest
#2
It's AFAUK already possible with the template helper
PHP:
'userfieldtitle' => array('self', 'helperUserFieldTitle'),
            'userfieldvalue' => array('self', 'helperUserFieldValue'),
 

feldon30

Well-known member
#5
It's unserialized in some places. Not others.

In some places, $user['customFields'] is set.

In some places, only $user['custom_fields'] exists as a serialized string.

The example I am running into is within the function helperAvatarHtml().