MyBB Community Forums

Full Version: Wish to display custom field data in threads
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have added a custom field to the user profiles and I wish to display that data right under the poster's name.

How would I go about getting the right data ( fid3 from 'mybb_userfields' ) for the member's posts? And what would I have to modify for template and php files?
Most of the time you can just use $post[fid3] in the template and it will work correctly. However if you want to start mucking about by adding a BR for people who have the value set then you would need to edit the PHP file inc/functions_post.php in makepostbit().

if($post['fid3']
{
$post['fid3'] .= "<br />";
}

Simply add that, then $post[fid3] where you want it in the post.