Hi,
The easiest way, is to edit admin_user.html (with the attached HTML file).
Then, in
/lib/Community/Web/Admin.pm, replace the
_search_bar function (approx line 2184), with;
Code:
sub _search_bar {
#---------------------------------------------------------------------
# create quick search bar
#
my $current = $IN->param('alpha') || '';
my $user_db = $DB->table('comm_users');
my $count = $user_db->count;
my $url = "$CFG->{path_cgi_url}?do=admin_user&sb=comm_login_count&so=DESC";
my $search_bar = "";
if ((!$current or $current eq 'all') and !$IN->param('bsearch')) {
$search_bar = comm_language('ADMIN_SEARCH_ALL') . " ";
}
else {
$search_bar = qq~<a href="$url&alpha=all">~ . comm_language('ADMIN_SEARCH_ALL') . "</a> ";
}
foreach ('A' .. 'Z') {
my $count = $user_db->count(
GT::SQL::Condition->new(
'comm_username',
'LIKE',
"$_%"
)
);
if ($count) {
$search_bar .= uc $current eq $_ ? "$_ " : "<a href='$url&alpha=$_'>$_</a> ";
}
else {
$search_bar .= "$_ ";
}
}
# Make the special not validated searches show up on the next line
$search_bar .= '<br>';
# Entry to find users that have yet to validate their email addresses
my $count_not_validated = $user_db->count( { comm_email_val => 0 } );
my $notval_str = comm_language( 'ADMIN_NOT_VALIDATED' );
$search_bar .= ($count_not_validated and ($current ne 'notval'))
? "<a href='$url&alpha=notval'>$notval_str</a> "
: "$notval_str ";
# Entry to find users that have not yet been validated by the admin
if ( $CFG->{signup_validate_admin} ) {
$count_not_validated = $user_db->count( { comm_admin_val => 0 } );
$notval_str = comm_language( 'ADMIN_NOT_VALIDATED_ADMIN' );
$search_bar .= ($count_not_validated and ($current ne 'notvaladmin'))
? "<a href='$url&alpha=notvaladmin'>$notval_str</a> "
: "$notval_str ";
}
return $search_bar;
}
This will sort results based on comm_login_count (DESC).
Hope that helps.
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my
Amazon Wish List GLinks ULTRA Package | GLinks ULTRA Package PRO Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin |
Pre-Made Template Sets |
FREE GLinks Plugins!