Users Online - Alphabetical Order

Started by Pause, November 22, 2004, 10:03:06 AM

Previous topic - Next topic

Pause

Any chance that the Users Online box at the bottom of forums can actually be set to Alphabetical Order? It'd save a lot of time if you're trying to quickly see if a certain fellow forum-member is online!

(I haven't actually looked properly on my own forums as I'm pretty much the only user, but I have noticed on these forums)
"You and me, inside that box, now." - The Doctor

Bite Fusion
Fusion Web Network
VG Fusion
Wrestling Fusion + Wrestling Fusion Forums

Oldiesmann

Sources/BoardIndex.php

Find
// Load the users online right now.
$result = db_query("
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))", __FILE__, __LINE__);


Replace
// Load the users online right now.
$result = db_query("
SELECT
lo.ID_MEMBER, lo.logTime, mem.realName, mem.memberName, mem.showOnline,
mg.onlineColor, mg.ID_GROUP, mg.groupName
FROM {$db_prefix}log_online AS lo
LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = lo.ID_MEMBER)
LEFT JOIN {$db_prefix}membergroups AS mg ON (mg.ID_GROUP = IF(mem.ID_GROUP = 0, mem.ID_POST_GROUP, mem.ID_GROUP))
ORDER BY mem.realName ASC", __FILE__, __LINE__);
Michael Eshom
Christian Metal Fans

Amacythe

You can also click the link for who's online, and click the username to put them into alphabetical order

Lunatic_10QT

Hi,

How can I do that with SMF 1.1 RC2 ? The code has changed...

Thanks.

2pac

anyway to have your name not be first on the list either, have it be alphabetically ordered with the rest of them? is there a quick fix or is that just asking too much? thanks!

rockinaway

Quote from: Lunatic_10QT on January 10, 2006, 05:16:01 PM
Hi,

How can I do that with SMF 1.1 RC2 ? The code has changed...

Thanks.

Really you should be looking to update to 1.1.4, serious security risks there :)
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

cferd

 :) He probably already did. That post was over a year and a half ago.

And the code in 1.1.4 is still the same


2pac

this doesnt work, anybody have an alternative solution?

2pac


Hoochie Coochie Man

İnadına SMF 1.1.X

Hoochie Coochie Man

İnadına SMF 1.1.X

Sarge

#11
[edit]
Tested and working.
[/edit]

In BoardIndex.php, find:

$context['users_online'][$row['logTime'] . $row['memberName']] = array(


Replace with:

$context['users_online'][strtolower($row['memberName'])] = array(





Find:

$context['list_users_online'][$row['logTime'] . $row['memberName']] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;


Replace with:

$context['list_users_online'][strtolower($row['memberName'])] = empty($row['showOnline']) ? '<i>' . $link . '</i>' : $link;





Find:

krsort($context['users_online']);


Replace with:

ksort($context['users_online']);





Find:

krsort($context['list_users_online']);


Replace with:

ksort($context['list_users_online']);


The above should list online users alphabetically instead of in order of activity.

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Hoochie Coochie Man

It doesn't work in "Users online today"
İnadına SMF 1.1.X

Sarge


    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Hoochie Coochie Man

Quote from: Sarge on December 14, 2007, 08:31:37 AM
Quote from: Hoochie Coochie Man on December 14, 2007, 07:39:20 AM
It doesn't work in "Users online today"

Do you have any mods installed?

Yes, I have lots of mods installed.

You said "I haven't tested"..
well test it if say so...
İnadına SMF 1.1.X

Sarge

#15
Quote from: Hoochie Coochie Man on December 14, 2007, 09:49:16 AM
Yes, I have lots of mods installed.

Do you have "Users Online Today" or some other similar mod installed?

Quote from: Hoochie Coochie Man on December 14, 2007, 09:49:16 AM
You said "I haven't tested"..
well test it if say so...

Tested and working.

[edit]
www.zeriyt.com

    Please do not PM me with support requests unless I invite you to.

http://www.zeriyt.com/   ~   http://www.galeriashqiptare.net/


Quote
<H> I had zero posts when I started posting

Hoochie Coochie Man

Quote from: Sarge on December 15, 2007, 04:07:20 AM
Quote from: Hoochie Coochie Man on December 14, 2007, 09:49:16 AM
Yes, I have lots of mods installed.

Do you have "Users Online Today" or some other similar mod installed?


Yes I have "Users Online Today" and I think it doesn't work on "Users Online Today"
Thankyou..
İnadına SMF 1.1.X

mersindost

I Am Simple Machines Hero, Because I LOVE Simple Machines

Advertisement: