Welcome to Geeklog, Anonymous Wednesday, April 24 2024 @ 03:20 pm EDT

Geeklog Forums

Indicating 'banned-ness' in the user list


Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
I wanted to somehow indicate in the user list which users I'd banned, but I didn't want to add another column to show it. So I added a little bit of code to strike-through the UID and the email address of banned users. This requires two small changes:

In public_html/admin/user.php, around line 295, we need to add the 'status' to the sql statement:

$sql = "SELECT {$_TABLES['users']}.uid,username,fullname,email,photo,status,regdate$select_userinfo FROM {$_TABLES['users']} $join_userinfo WHERE 1";

Then in geeklog/system/lib-admin.php, in the function ADMIN_getListField_users, add this [around line 610]:
Text Formatted Code

        case "uid":
        case "email":
                if ( $A['status'] == 0 )
                   $retval = '<s>' . $fieldvalue . '</s>';
                else
                   $retval = $fieldvalue;
                break;
 
before this:
Text Formatted Code

        default:
            $retval = $fieldvalue;
            break;
 


Voila!

- Andy
 Quote

Status: offline

asmaloney

Forum User
Full Member
Registered: 02/08/04
Posts: 214
Errr... un-voila.

Some other places use this code, so we need to check if the status has been retrieved. So the code in ADMIN_getListField_users should be this:

if ( isset( $A['status'] ) && $A['status'] == 0 )

instead of this:

if ( $A['status'] == 0 )


- Andy
 Quote

All times are EDT. The time is now 03:20 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content