MyBB Community Forums

Full Version: Forum Leader Page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How can I get it to show user titles as well with the username on forum leaders page? thanks.
I've just tried doing this myself, proving to be more difficult than I thought.
({$usertitle}) on showteam_usergroup_user isn't working.

I'll keep trying and post back here when I get it.
Try:
{$mybb->settings['bburl']}/{$mybb->user['usertitle']}

Haven't tried it so not sure if it will work or is correct.
None of the above will work because the usertitle isn't included in the query that draws the user data. To be honest it's a bit of a pain but here is a relatively easy way:

Open showteam.php and find (around line 73):
$query = $db->simple_select("users", "uid, username, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

and change it to (adding usertitle to the query):
$query = $db->simple_select("users", "uid, username, usertitle, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

Then open your showteam_usergroup_user and showteam_moderators_mod templates and replace:
<a href="{$user['profilelink']}"><strong>{$user['username']}</strong></a>
with:
<a href="{$user['profilelink']}"><strong>{$user['username']}</strong></a><br />{$user['usertitle']}

If they don't have a custom usertitle it will show blank.
Thanks again Tim!