The Admin/Mod flags still don't get displayed in showflat and showthreaded mode. The only appear in the post listing in threaded view but not on the current post.
I think the problem was due to the way the user status was recorded in the user and posts tables.
For example:
w3t_Users.U_Status = "Administrator"
w3t_Posts.B_UStatus = "A"
Maybe Rick might want to standardise these fields in both tables? Also, there was a problem with duplicate variable names being used for the status.
Anyhow, a fix which I've worked out for now is as follows:
In showthreaded.php,
line 63:
$PostStatus = $tree[$parentkeys[$x]]['Status'];
$Reged = $tree[$parentkeys[$x]]['Reged'];
to:
$PostStatus = $tree[$currentkey][$parentkeys[$x]]['UserStatus'];
$Reged = $tree[$currentkey][$parentkeys[$x]]['Reged'];
line 652:
if ($PostStatus == "A") {
to:
if ($PostStatus == "Administrator") {
line 655:
elseif ($PostStatus == "M") {
to:
elseif ($PostStatus == "Moderator") {
line 926:
while(list($anumber,$aparent,$aposted,$ausername,$asubject,$astatus,$aapproved,$aicon,$areged,$acolor,$astatus) = $dbh -> fetch_array($sth)) {
to:
while(list($anumber,$aparent,$aposted,$ausername,$asubject,$astatus,$aapproved,$aicon,$areged,$acolor,$austatus) = $dbh -> fetch_array($sth)) {
line 938:
$tree[$aparent][$anumber]['Status'] = $astatus;
to:
$tree[$aparent][$anumber]['UserStatus'] = $austatus;
In showflat.php, line 682:
if ($PostStatus == "A") {
to:
if ($PostStatus == "Administrator") {
line 685:
elseif ($PostStatus == "M") {
to:
elseif ($PostStatus == "Moderator") {
Hope this helps.
Thx for pointing that out.
You also need to change:
postlist.php ~ line 852
code:
// ---------------------------------------------------------
// We need to know if this was made by an admin or moderator
$UserStatus = "";
if ($PostStatus == "A") {
$UserStatus = "<img src="{$config['images']}/adm.gif" alt="{$ubbt_lang['USER_ADMIN']}" border="0" />";
}
elseif (($PostStatus == "M") && (stristr($modlist,",$Username,"))) {
$UserStatus = "<img src="{$config['images']}/mod.gif" alt="{$ubbt_lang['USER_MOD']}" border="0" />";
to:
code:
// ---------------------------------------------------------
// We need to know if this was made by an admin or moderator
$UserStatus = "";
if ($PostStatus == "Administrator") {
$UserStatus = "<img src="{$config['images']}/adm.gif" alt="{$ubbt_lang['USER_ADMIN']}" border="0" />";
}
elseif (($PostStatus == "Moderator") && (stristr($modlist,",$Username,"))) {
$UserStatus = "<img src="{$config['images']}/mod.gif" alt="{$ubbt_lang['USER_MOD']}" border="0" />";
Okay, the only problem I have with this fix is that in Flat mode and Threaded mode, the symbol appears next to a moderator's name regardless of whether they are a moderator of that forum or not. It doesn't show up in post list view, but it does when looking at the individual posts.
Any thoughts?