|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
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.
|
|
|
|
Joined: Sep 1999
Posts: 76
Power User
|
Power User
Joined: Sep 1999
Posts: 76 |
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.
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
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" />";
|
|
|
|
Joined: Jan 2002
Posts: 218
Enthusiast
|
Enthusiast
Joined: Jan 2002
Posts: 218 |
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?
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,931
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|