2
I loathe <{php}> tags in themes, but either you should assign the user's rank in header.php or you can do it directly in the theme like this:
<{php}>
if ($xoopsUser) {
echo xoops_getrank($xoopsUser->getVar('rank'), $xoopsUser->getVar('posts') );
}
<{/php}>
Naturally, if you do this in header.php, you just take the code to get the rank and assign it to a Smarty variable inside this code:
if ($xoopsUser != '') {
$xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin, [b]'user_rank' => xoops_getrank($xoopsUser->getVar('rank'), $xoopsUser->getVar('posts')[/b]));
$groups = $xoopsUser->getGroups();
} else {
$xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false));
$groups = XOOPS_GROUP_ANONYMOUS;
}