vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Sorting order of users in showgroups. (https://vborg.vbsupport.ru/showthread.php?t=103452)

Cle 12-21-2005 03:36 PM

Sorting order of users in showgroups.
 
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:
PHP Code:

        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:
PHP Code:

        $u strtoupper($user['username']); 

and replace by:
PHP Code:

        // $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.


All times are GMT. The time now is 07:03 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00999 seconds
  • Memory Usage 1,720KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete