Info
- 1 post
- 1 voice
- Started 3 years ago by Daiv Mowbray
- This topic is not resolved
Adding info to Admin / User list page
-
- Posted 3 years ago #
I wanted all info on the admin page which lists all users, so I have edited admin-functions.php.
I thought someone may be looking to do the same , so here you are. Nothing to difficult.
Just change the function bb_user_role to something like the following:
function bb_user_row( $user_id, $role = '', $email = false ) {
$user = bb_get_user( $user_id );
$r = "\t<tr id='user-$user->ID'" . get_alt_class("user-$role") . ">\n";
$r .= "\t\t<td>$user->ID</td>\n";
$r .= "\t\t<td>ID ) . "'>" . get_user_name( $user->ID ) . "</td>\n";
if ( $email ) {
$a = bb_get_user_email( $user->ID );
$r .= "\t\t<td>$a</td>\n";
$a = $user->user_url;
$r .= "\t\t<td>$a</td>\n";
$a = $user->from;
$r .= "\t\t<td>$a</td>\n";
$a = $user->occ;
$r .= "\t\t<td>$a</td>\n";
$a = $user->interest;
$r .= "\t\t<td>$a</td>\n";
...
And change function display to have somthing like this:
$r .= "<thead>\n";
$r .= "\t<tr>\n";
$r .= "\t\t<th style='width:10%;'>" . __('ID') . "</th>\n";
if ( $show_email ) {
$r .= "\t\t<th style='width:10%;'>" . __('Username') . "</th>\n";
$r .= "\t\t<th style='width:20%;'>" . __('Email') . "</th>\n";
$r .= "\t\t<th style='width:20%;'>" . __('Url') . "</th>\n";
$r .= "\t\t<th style='width:10%;'>" . __('From') . "</th>\n";
$r .= "\t\t<th style='width:10%;'>" . __('Occ') . "</th>\n";
$r .= "\t\t<th style='width:10%;'>" . __('Interest') . "</th>\n";
} else {
$r .= "\t\t<th style='width:60%;'>" . __('Username') . "</th>\n";
}
$r .= "\t\t<th style='width:15%;'>" . __('Registered Since') . "</th>\n";
$r .= "\t\t<th style='width:5%;'>" . __('Actions') . "</th>\n";
$r .= "\t</tr>\n";
$r .= "</thead>\n\n";
-
You must log in to post.