Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 2000
Posts: 1,471
Addict
Addict
Offline
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.

Sponsored Links
Joined: Sep 1999
Posts: 76
Power User
Power User
Offline
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
Offline
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
Offline
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?


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)