SMF Development > Fixed or Bogus Bugs
[fixed]If a username contains only numbers, Users Online sorting is broken
(1/1)
porplemontage:
If a username contains only numbers, that user will always be the first person in the "Users Online" list on the forum index. The list is supposed to be sorted by activity, yet these users are "pinned" to the top of the list regardless of their activity (as long as they classify as online). Note that this is not an issue when viewing the full Who's Online list (index.php?action=who), just at the bottom of the forum index.
I'm using SMF 2.0.2. The theme is essentially the default with custom styling.
emanuele:
Hello porplemontage and welcome to sm.org! :)
Thanks for the report.
Yep, this is a bug that has been fixed recently in the development code.
The fix is rather easy, in Subs-MembersOnline.php you have to apply the following four changes:
--- Code: (find) ---$membersOnlineStats['users_online'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = array(
--- End code ---
--- Code: (replace with) ---$membersOnlineStats['users_online'][$row[$membersOnlineOptions['sort']] . '_' . $row['member_name']] = array(
--- End code ---
--- Code: (find) ---$membersOnlineStats['list_users_online'][$row[$membersOnlineOptions['sort']] . $row['member_name']] = empty($row['show_online']) ? '<em>' . $link . '</em>' : $link;
--- End code ---
--- Code: (replace with) ---$membersOnlineStats['list_users_online'][$row[$membersOnlineOptions['sort']] . '_' . $row['member_name']] = empty($row['show_online']) ? '<em>' . $link . '</em>' : $link;
--- End code ---
--- Code: (find) ---$membersOnlineStats['users_online'][$sort . $spiders[$id]] = array(
--- End code ---
--- Code: (replace with) ---$membersOnlineStats['users_online'][$sort . '_' . $spiders[$id]] = array(
--- End code ---
--- Code: (find) ---$membersOnlineStats['list_users_online'][$sort . $spiders[$id]] = $link;
--- End code ---
--- Code: (replace with) ---$membersOnlineStats['list_users_online'][$sort . '_' . $spiders[$id]] = $link;
--- End code ---
AngelinaBelle:
I added the notation "fixed" because I could not find it in the bug tracker.
emanuele:
It's in the fixed/bogus boards.
This topic should be moved, I kept it here just for porplemontage's convenience so that he can easily find it in the "close" future. :)
Navigation
[0] Message Index
Go to full version