In the
/admincp/rank.php
Find:
PHP Code:
print_form_header('ranks', 'insert', 0, 1, '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', 0, 1, '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']), 5, 1);
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']), 6, 1);
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.