MyBB Community Forums
User Titles? - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Extensions (https://community.mybb.com/forum-201.html)
+--- Forum: Plugins (https://community.mybb.com/forum-73.html)
+---- Forum: Plugin Development (https://community.mybb.com/forum-68.html)
+---- Thread: User Titles? (/thread-172316.html)



User Titles? - marcus123 - 2015-06-24

What value shows the user title like when it's empty it takes it from User Titles!

Newbie
Junior Member
Member
Senior Member
Posting Freak
Posting Legent

The query to usertitle only will show a custom title !


RE: User Titles? - Omar G. - 2015-06-24

What have you tried? Assuming you did.


RE: User Titles? - marcus123 - 2015-06-27

$mybb->user['usertitle']

doesn't show any titles like you see on postbit!


RE: User Titles? - Ad Bakker - 2015-06-27

When usertitle is set, this is displayed. When usertitle is not set, displaygroup is displayed and when displaygroup is not set, usergroup is displayed.
All other usergroups of a user are stored in additionalgroups as comma seperated group numbers.


RE: User Titles? - marcus123 - 2015-06-27

Any ideas how grab the title from (user titles feature) when the user title is empty and show? Point me in the right direction please?

Where can I find it in the source code so that I can backtrack it?


RE: User Titles? - Ad Bakker - 2015-06-27

I think it must be something like this:

$usergroups_cache = $cache->read('usergroups');
if (trim($user['usertitle']) != '')
{
	$usertitle = $user['usertitle'];
}
elseif ($user['displaygroup'] > 0)
{
	$usertitle = $usergroups_cache[$user['displaygroup']]['usertitle'];
}
else
{
	$usertitle = $usergroups_cache[$user['usergroup']]['usertitle'];
}



RE: User Titles? - marcus123 - 2015-06-28

Buddy thanks big time +1 The Problem is it reads groups not title!