Implemented Unserialize "custom_fields" in XenForo_ControllerPublic_Thread

SchmitzIT

Well-known member
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.
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
It's AFAUK already possible with the template helper
PHP:
'userfieldtitle' => array('self', 'helperUserFieldTitle'),
            'userfieldvalue' => array('self', 'helperUserFieldValue'),
 
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().
 
Top Bottom