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)
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__);
You can also click the link for who's online, and click the username to put them into alphabetical order
Hi,
How can I do that with SMF 1.1 RC2 ? The code has changed...
Thanks.
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!
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 :)
:) 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
this doesnt work, anybody have an alternative solution?
no solutions? :(
Quote from: ninerskickass on October 24, 2007, 08:42:57 PM
this doesnt work, anybody have an alternative solution?
Yeah it doesn't work!
[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.
It doesn't work in "Users online today"
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?
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...
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
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..
Yes,Now Working ;)
http://www.dizi24.com/Forum24