As of September 23rd elektron-users has been replaced by elektronauts.com. Find out what this means here.
Elektron-Users Elektron Forum Site Suggestions Who's online ! (1 viewing)
Go to bottom Post Reply
TOPIC: Who's online !
#50508
Admin
Posts: 2839
0
Re:Who's online ! 15 Years, 3 Months ago
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'); $output     ''; // show online count if ($showmode==|| $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 == && !$session->usertype ) {             $guest_array++;         }         // if member increase member count by 1         if ( $session->guest == ) {             $user_array++;         }     }          // check if any guest or member is on the site     if ($guest_array != || $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 != && $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.
  The topic has been locked.
#50509
Hammer Bro
Posts: 725
MnM mkII // MD mkII // Tb-303
Re:Who's online ! 15 Years, 3 Months ago
are you guys really discussing why / what order peoples names are in on the site?
  The topic has been locked.
#50511
Admin
Posts: 2839
0
Re:Who's online ! 15 Years, 3 Months ago
nljdj wrote:
are you guys really discussing why / what order peoples names are in on the site?

hahah! that's what my inner voice said slow day at the e-u. lol.

seriously though, i don't mind. i want you all to feel this is your place, so all queries on the site are welcome.
  The topic has been locked.
#50512
Hammer Bro
Posts: 725
MnM mkII // MD mkII // Tb-303
Re:Who's online ! 15 Years, 3 Months ago
actuel wrote:
nljdj wrote:
are you guys really discussing why / what order peoples names are in on the site?

hahah! that's what my inner voice said slow day at the e-u. lol.

seriously though, i don't mind. i want you all to feel this is your place, so all queries on the site are welcome.

  The topic has been locked.
Go to top Post Reply
Powered by FireBoardget the latest posts directly to your desktop

Login Form

start Player