I suppose most of the task could be done specifying $userRanks array, which handles almost the same things as you are trying to put (special rankings for the user). 'Admin' and 'moderator' are already appearing automatically in miniBB already. I personally would avoid any duplications on the screen, specially that ones which affect user's statuses and ranks etc.; but anyway, the code is attached.
parseUserInfo function works both for the user's profile and 'vthread'. parseMessage is for 'vthread' only, so if this is only for 'vthread', we shall use it instead of parseUserInfo. 'vthread' is more correct way also in a case of referring variables.
Here is what you need to put in:
bb_specials.php - specify new array defining your very custom titles that way:
$specialTitles=array(
1=>'<strong>Community Chief</strong>',
2=>'Rocking Guy',
3=>'Relaxing Girl',
);
assigning user IDs and titles. Then modify
bb_plugins.php, and add to the end of parseMessage function before closing bracket, the following code:
function parseMessage(){
/* Special member titles */
$uid=$GLOBALS['poster_id'];
$isMod=FALSE;
if(is_array($GLOBALS['mods'])){
foreach($GLOBALS['mods'] as $key=>$val) if(is_array($val) and in_array($uid, $val)) {
$isMod=TRUE; break;
}
}
if($isMod) $GLOBALS['userSpecialTitle']='<em>Moderator</em>';
elseif(isset($GLOBALS['specialTitles'][$uid])) $GLOBALS['userSpecialTitle']=$GLOBALS['specialTitles'][$uid];
else $GLOBALS['userSpecialTitle']='';
if($GLOBALS['userSpecialTitle']!='') $GLOBALS['userSpecialTitle'].='<br />';
/* --Special member titles */
}
Such function is used widely for many other add-ons, so you need either to extend it either to create from scratch, but not duplicate it, because it will stop forums program to run.
Finally, paste
{$userSpecialTitle} in
main_posts_cell.html template in the place you would like such title to appear.