MyBB Central

Full Version: [Request/Suggestion] Adding Custom Fields to unsupported pages
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to customize the forum team page to display custom fields as well as the regular fields displayed there.

Of course, myBB didn't add global support for custom fields, so the only function that will work is a query for YOUR custom field({$mybb->user['fid_']} which displays the current users browsing custom field for every area, which just doesn't work.

{$user['fid_'} doesn't work either.

So I'm curious, how would I go about modifying a page(showteam.php) or functions to add support to the showteam page, or has someone already done something similar?
It's a relatively simple core file edit, depends if you'd want to edit files though.

PHP Code:
$query $db->simple_select("users""uid, username, displaygroup, usergroup, ignorelist, hideemail, receivepms"

Line 73, (part of) the query that loads the staff. If you add another field to select, you can then use {$user['whatever']} in the templates.
That selects the information from the users table, whereas custom profile fields are from within the profilefields table.

So modifying that line with the field name doesn't work.
Oh yeah, that worked for another default field, I had in my mind it worked for a custom one too.

Looks like you'd have to join the userfields table then... I could give that a go later, at work now.
Alright. My PHP is a little rusty and I've tried creating the fid function myself for it and have ended up just failing miserably.

If you could give it a go, I'm sure it would help more people than just myself.

Thanks,
Lotor