| Author |
Message |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 209
|
Posted:
Wed Dec 19, 2007 1:49 pm |
  |
Please, can someone help me?
I have a block to show the users that are online in my site. But I want to show show them per username order. for example:
users online:
aradsa
badasda
dasaea
rsdasa
etc...
Can someone help me? Heres my block code:
http://casinosonline.com.sapo.pt/block.txt
 |
|
|
   |
 |
jammyme
Nuke Soldier


Joined: Jan 29, 2007
Posts: 22
Location: South Yorkshire, UK
|
Posted:
Fri Dec 21, 2007 2:18 am |
  |
Hi Divvy,
This should be fairly easy to achieve, it should just mean re-sorting the values the script fetches from the database by username.
I can't access the code you have linked, but if you're using the standard User Info block that comes with RavenNuke 7.6, the line you wish to edit should be around line #38:
| Code: |
| $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0'"); |
You just want to add a "Order By" statement to change the order these are listed:
| Code: |
| $result = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest='0' ORDER BY uname"); |
If you don't have a suitable editor, you can either use a simple text editor (like notepad.exe) or download a great free one like HAPedit (http://hapedit.free.fr).
Hope this helps,  |
|
|
    |
 |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 209
|
Posted:
Fri Dec 21, 2007 3:16 am |
  |
Hi mate,
Thank you for your reply
But Im not using the standard User Info block.
Im using USER MENU v2.0 for PHP-Nuke 6.5+ © 2003 by Pitcher@Home
I have uploaded the file to another host, please take a look:
http://www.celebridadesdespidas.com/block.txt
Thanks for helping me |
|
|
   |
 |
jammyme
Nuke Soldier


Joined: Jan 29, 2007
Posts: 22
Location: South Yorkshire, UK
|
Posted:
Fri Dec 21, 2007 4:05 am |
  |
Hey Divvy,
Edit the file you have (Save a Backup First) and change the following line:
| Code: |
| $memres = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest=0"); |
so that it reads:
| Code: |
| $memres = $db->sql_query("SELECT uname, guest FROM $prefix"._session." WHERE guest=0 ORDER BY uname"); |
Hopefully that should work for you (taking a very quick look)  |
_________________ Phil
Project Developer
 |
|
    |
 |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 209
|
Posted:
Fri Dec 21, 2007 6:18 am |
  |
|
   |
 |
jammyme
Nuke Soldier


Joined: Jan 29, 2007
Posts: 22
Location: South Yorkshire, UK
|
Posted:
Fri Dec 21, 2007 6:39 am |
  |
No worries dude, happy to help.
Making more mods now you've mentioned it, just to tidy my own user info block. Cheers! |
_________________ Phil
Project Developer
 |
|
    |
 |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 209
|
Posted:
Thu Dec 27, 2007 4:12 pm |
  |
Btw, I have a long list with members online. And I notice that after they leave the site, their nicks keep appearing in the list.
How can I reduce that time? For example, appear only based on users active over the past 15 minutes.
Heres my block code:
http://casinosonline.com.sapo.pt/block.txt |
|
|
   |
 |
Divvy
Lieutenant


Joined: Jul 25, 2004
Posts: 209
|
Posted:
Sat Dec 29, 2007 10:23 am |
  |
|
   |
 |
|
|