Skip to:
Content
Pages
Categories
Search
Top
Bottom

Adding info to Admin / User list page

  • 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 .= "tt<td>$user->ID</td>n";

    $r .= "tt<td>ID ) . "'>" . get_user_name( $user->ID ) . "</td>n";

    if ( $email ) {

    $a = bb_get_user_email( $user->ID );

    $r .= "tt<td>$a</td>n";

    $a = $user->user_url;

    $r .= "tt<td>$a</td>n";

    $a = $user->from;

    $r .= "tt<td>$a</td>n";

    $a = $user->occ;

    $r .= "tt<td>$a</td>n";

    $a = $user->interest;

    $r .= "tt<td>$a</td>n";

    ...

    And change function display to have somthing like this:

    $r .= "<thead>n";

    $r .= "t<tr>n";

    $r .= "tt<th style='width:10%;'>" . __('ID') . "</th>n";

    if ( $show_email ) {

    $r .= "tt<th style='width:10%;'>" . __('Username') . "</th>n";

    $r .= "tt<th style='width:20%;'>" . __('Email') . "</th>n";

    $r .= "tt<th style='width:20%;'>" . __('Url') . "</th>n";

    $r .= "tt<th style='width:10%;'>" . __('From') . "</th>n";

    $r .= "tt<th style='width:10%;'>" . __('Occ') . "</th>n";

    $r .= "tt<th style='width:10%;'>" . __('Interest') . "</th>n";

    } else {

    $r .= "tt<th style='width:60%;'>" . __('Username') . "</th>n";

    }

    $r .= "tt<th style='width:15%;'>" . __('Registered Since') . "</th>n";

    $r .= "tt<th style='width:5%;'>" . __('Actions') . "</th>n";

    $r .= "t</tr>n";

    $r .= "</thead>nn";

  • You must be logged in to reply to this topic.
Skip to toolbar