View Single Post
  #24  
Old 01-31-2009, 06:44 AM
n8td n8td is offline
 
Join Date: Jun 2007
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the /admincp/rank.php

Find:
PHP Code:
            print_form_header('ranks''insert'01'name''');
            
print_table_header($vbphrase['images']);
            
construct_hidden_code('usergroupid'$vbulletin->GPC['usergroupid']);
            
construct_hidden_code('ranklevel'$vbulletin->GPC['ranklevel']);
            
construct_hidden_code('minposts'$vbulletin->GPC['minposts']);
            
construct_hidden_code('doinsert'$vbulletin->GPC['rankimg']); 
Change it to:
PHP Code:
            print_form_header('ranks''insert'01'name''');
            
print_table_header($vbphrase['images']);
            
construct_hidden_code('usergroupid'$vbulletin->GPC['usergroupid']);
            
construct_hidden_code('ranklevel'$vbulletin->GPC['ranklevel']);
            
construct_hidden_code('minposts'$vbulletin->GPC['minposts']);
            
construct_hidden_code('rankorder'$vbulletin->GPC['rankorder']);
            
construct_hidden_code('doinsert'$vbulletin->GPC['rankimg']); 
This allows the variable for rankorder to be called.


Find:
PHP Code:
            print_table_header(iif($rank['usergroupid'] == 0$vbphrase['all_usergroups'], $rank['title']), 51);
            
print_cells_row(array($vbphrase['user_rank'], $vbphrase['minimum_posts'], $vbphrase['display_type'], $vbphrase['stack_rank'], $vbphrase['controls']), 1''
Change it to:
PHP Code:
            print_table_header(iif($rank['usergroupid'] == 0$vbphrase['all_usergroups'], $rank['title']), 61);
            
print_cells_row(array($vbphrase['user_rank'], $vbphrase['minimum_posts'], $vbphrase['display_type'], $vbphrase['stack_rank'], 'Rank Order'$vbphrase
Going from 5 to 6 increases the number of headers. Adding 'Rank Order' gives the column a name.


Find:
PHP Code:
        $cell = array(
            
$rankhtml,
            
vb_number_format($rank['minposts']),
            (
$rank['display'] ? $vbphrase['displaygroup'] : $vbphrase['always']),
            (
$rank['stack'] ? $vbphrase['yes'] : $vbphrase['no']),
            
construct_link_code($vbphrase['edit'], "ranks.php?" $vbulletin->session->vars['sessionurl'] . "do=edit&rankid=$rank[rankid]") . construct_link_code($vbphrase['delete'], "ranks.php?" $vbulletin->session->vars['sessionurl'] . "do=remove&rankid=$rank[rankid]")
        ); 
Change it to:
PHP Code:
        $cell = array(
            
$rankhtml,
            
vb_number_format($rank['minposts']),
            (
$rank['display'] ? $vbphrase['displaygroup'] : $vbphrase['always']),
            (
$rank['stack'] ? $vbphrase['yes'] : $vbphrase['no']),
            
vb_number_format($rank['rankorder']),
            
construct_link_code($vbphrase['edit'], "ranks.php?" $vbulletin->session->vars['sessionurl'] . "do=edit&rankid=$rank[rankid]") . construct_link_code($vbphrase['delete'], "ranks.php?" $vbulletin->session->vars['sessionurl'] . "do=remove&rankid=$rank[rankid]")
        ); 
This adds the rankorder number to show up on the User Rank Manager page.


Find:
PHP Code:
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify')
{
    
$ranks $db->query_write("
        SELECT rankid, ranklevel, minposts, rankimg, ranks. usergroupid,title, type, display, stack
        FROM " 
TABLE_PREFIX "ranks AS ranks
        LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup USING(usergroupid)
        ORDER BY ranks.usergroupid, minposts 
Change it to:
PHP Code:
// ###################### Start modify #######################
if ($_REQUEST['do'] == 'modify')
{
    
$ranks $db->query_write("
        SELECT rankid, ranklevel, minposts, rankimg, ranks. usergroupid,title, type, display, stack, rankorder
        FROM " 
TABLE_PREFIX "ranks AS ranks
        LEFT JOIN " 
TABLE_PREFIX "usergroup AS usergroup USING(usergroupid)
        ORDER BY rankorder, ranks.usergroupid, minposts
    "
); 
This changes the display order on the User Rank Manager page.

All these steps should display the rankorder on the User Rank Manager page.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01421 seconds
  • Memory Usage 1,842KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete