Order in online user
-----
| Author | Message | |
|---|---|---|
|
vaivai |
||
| Fri Feb 11, 2005 5:40 pm Post subject: Order in online user | ||
|
hi
i've a question. Is possible to order the list of the online user not in alphabetic order but in time of login example 1) third login 2) second login 3)first login Thank you very much!!! sorry for my bad english |
||
|
Thoul |
||
| Fri Feb 11, 2005 8:02 pm Post subject: re: Order in online user | ||
|
Find this line in mods/prillian/im_main.php:
Code: ORDER BY u.username ASC, s.session_ip ASC';
Change it to Code: ORDER BY s.session_time DESC, s.session_ip ASC';
That should do it, I believe. Some users might start appearing in the online list twice, though. |
||
|
vaivai |
||
| Sun Feb 13, 2005 7:49 am Post subject: Re: re: Order in online user | ||
|
Thoul wrote: That should do it, I believe. Some users might start appearing in the online list twice, though. why some user appear twice? |
||
|
Thoul |
||
| Mon Feb 14, 2005 8:16 am Post subject: re: Order in online user | ||
|
It's a limitation of the session system used by Prillian and phpBB. I don't think it can be fixed without a total rewrite of that system.
|
||
|
vaivai |
||
| Mon Feb 14, 2005 11:49 am Post subject: re: Order in online user | ||
|
i have do this
Code: $sql = 'SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip, s.session_start
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s WHERE u.user_id = s.session_user_id AND s.session_time >= ' . ( time() - 300 ) . ' ORDER BY s.session_start DESC this work great but there is a problem. Some user appear twice .... a user appear twice if he have two session open. do you know a method to filter a user based on session_ip in phpbb_session table. for example Code: $sql = 'SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip, s.session_start
FROM ' . USERS_TABLE . ' u, ' . SESSIONS_TABLE . ' s WHERE u.user_id = s.session_user_id AND s.session_time >= ' . ( time() - 300 ) . ' ORDER BY s.session_start DESC, if two user have the same session_ip then display only one user thanks for your help thoul and great mod!!!!! [/code] |
||
|
Thoul |
||
| Tue Feb 15, 2005 6:39 pm Post subject: re: Order in online user | ||
|
No, there's no way to do that.
|
||
|
vaivai |
||
| Wed Feb 16, 2005 3:47 am Post subject: Re: re: Order in online user | ||
|
Thoul wrote: No, there's no way to do that.
ops ... ok ..thanks for help |
||
Page 1 of 1