vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   How to have a custom order in showgroups? (https://vborg.vbsupport.ru/showthread.php?t=81386)

Kriminal 05-12-2005 07:09 PM

How to have a custom order in showgroups?
 
Hi everybody!
I'd like to show the differents groups in showgroups.php in the "correct" order (can't find the word in english, in spanish is "orden jerárquico").
For example, I want to appear at top Administrators, then Super Moderators and at the end Moderators.
As vbulleting assigns the id 5:SM, 6:Admin, 7:Mods, I can't ORDER BY usergroupid ASC or DESC; and I can't find any function on MySQL or PHP to do something like "ORDER BY (6,5,7)"
Obviously, I don't want to change the usergroup ids to fetch that order... it must have be an "elegant" solution...

Well, thanks for all!

Primeval 08-01-2005 12:49 AM

I am looking for the same thing as well.

I gave it a tiny try to edit showgroup.php to arrange order by usergroupid and it did work with one php error, the array. I think it was ksort I edited.

I am no expret in php but it does seem to be a good step to figure out a way to add a custom code to arange forum leaders as usergroupid and a page to order it by a # of usergroupid?

On the next upgrade you might use it as a good default to order group as 6, 5, 7; admins, supermods, mods.

I do recall the original default is set in alphabetical order which makes it admin, mods, and supermods. The only normal way to fix it is to change supermods to global mods.
The downside is when you add more additional groups to display on showgroups, it will become out of order. It will be a really useful if there was a easy way to customize order by group id.

Edit: vb version 3.0.7 user.

bigcurt 08-01-2005 01:57 AM

<a href="https://vborg.vbsupport.ru/showthread.php?t=91246&highlight=administrators+to p" target="_blank">https://vborg.vbsupport.ru/showt...nistrators+top</a> ---found it for 3.5..give me an hour and I will see whats going on with 3.0.X..prolly not hard at all :P

~Curt

Primeval 08-01-2005 01:55 PM

Thanks for the link but that is not it.. its more complitcated. Have to create a whole new code to make a custom order.

The link you provided just moves the $showgroup code to the top or below the moderator bit. Thats not what I'm looking for (as I already fixed that issue on my forums)

Kurisu 12-17-2005 11:51 AM

I would really need that, too...
Hopefully someone will start to work on this


All times are GMT. The time now is 03:00 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.00963 seconds
  • Memory Usage 1,713KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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