Log in

View Full Version : Sorting order of users in showgroups.


Cle
12-21-2005, 03:36 PM
I'm trying to adjust to the 3.5 versions of vB and so far it's going pretty well. There is something that's bothering me though. In the Showgroups page, every user is sorted alphabetically, in its usergroup and in the section of whoever is a moderator of a forum.

However, I want to sort the users in a usergroup in userids, and leave the users who moderate a forum alphabetically ordered. Do any of you know how to do that, by any chance? I tried modifying showgroups.php, but without any luck.

Thanks in advance. :D

Cle
12-23-2005, 08:17 AM
Anyone? :(

Marco van Herwaarden
12-23-2005, 08:30 AM
Remove the following line (comment it out) from showgroup.php and it might do what you want:
ksort($users); // alphabetically sort users

Cle
12-23-2005, 01:15 PM
Thanks, Marco! It worked for all users, except for one. Do you think there's another code to add instead of the ksort($users) to make all userids in the correct order? Like $userids, where this variable should be referring to the userids in the database?

Marco van Herwaarden
12-23-2005, 02:37 PM
Try the following:

Find:
$u = strtoupper($user['username']);
and replace by:
// $u = strtoupper($user['username']);
$u = $user['userid'];

Then uncomment/put back, the ksort line.

this is all untested.

Cle
12-25-2005, 09:19 AM
Awesome, Marco! It worked. :D Thanks for your help.