MyBB Community Forums

Full Version: usertitle in forumteam
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

i just have quick question about usertitles. I am trying to make show the usertitle in the forum team page, i know how to set up all but the only thing i miss is the code so it detects the usertitle of the user, i tried alot but i just cant find it.

e.g. <td width="13%" class="{$bgcolor}">{$user['usertitle']}</td>

"{$user['usertitle']}" <<< this part must be something else.

Thanks for any help.
k1R@.
Your code would be ok if there was usertitle in showteam.php query. But there isn't so you need to add it yourself in that file. Change:
$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'));
to:
$query = $db->simple_select("users", "uid, username, displaygroup, usergroup, usertitle, 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:
		$user['profilelink'] = get_profile_link($user['uid']);
to:
		$user['profilelink'] = get_profile_link($user['uid']);
		$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
Just thank you. Definitely instructive.