The order of the member is still mysterious It's really not all that mysterious if you know php. You can see it all here:
Code: : |
get( 'showmode', 0 );
$output = '';
// show online count
if ($showmode==0 || $showmode==-2) {
$query = "SELECT guest, usertype"
. "_CRLF_ FROM #__session"
;
$database->setQuery( $query );
$sessions = $database->loadObjectList();
// calculate number of guests and members
$user_array = 0;
$guest_array = 0;
foreach( $sessions as $session ) {
// if guest increase guest count by 1
if ( $session->guest == 1 && !$session->usertype ) {
$guest_array++;
}
// if member increase member count by 1
if ( $session->guest == 0 ) {
$user_array++;
}
}
// check if any guest or member is on the site
if ($guest_array != 0 || $user_array != 0) {
$output .= _WE_HAVE;
// guest count handling
if ($guest_array == 1) {
// 1 guest only
$output .= sprintf( _GUEST_COUNT, $guest_array );
} else if ($guest_array > 1) {
// more than 1 guest
$output .= sprintf( _GUESTS_COUNT, $guest_array );
}
// if there are guests and members online
if ($guest_array != 0 && $user_array != 0) {
$output .= _AND;
}
// member count handling
if ($user_array == 1) {
// 1 member only
$output .= sprintf( _MEMBER_COUNT, $user_array );
} else if ($user_array > 1) {
// more than 1 member
$output .= sprintf( _MEMBERS_COUNT, $user_array );
}
$output .= _ONLINE;
}
}
// show online member names
if ($showmode > 0) {
$query = "SELECT DISTINCT a.username"
."_CRLF_ FROM #__session AS a"
."_CRLF_ WHERE a.guest = 0"
;
$database->setQuery($query);
$rows = $database->loadObjectList();
if ( count( $rows ) ) {
// output
$output .= '';
foreach($rows as $row) {
$output .= '';
$output .= '';
$output .= $row->username;
$output .= '';
$output .= '';
}
$output .= '';
}
}
echo $output;
?>
|
it's all usertype > session. usertype = administrator, guest, moderator, registered user, super administrator. session = since you last logged in. it looks at the session then orders by usertype.
at least that's what the code says.