Trouble Rearranging Namespaces
Having trouble having wiki forums appear before non-wiki forums in the same forum category.
Fixed for the next build. In
vault/special_plugins_forumdisplay.php, find:
PHP Code:
'displayorder' => ($space['displayorder'] > 0 ? 1000 + $space['displayorder'] : 0),
Replace with:
PHP Code:
'displayorder' => ($space['displayorder'] > 0 ? $space['displayorder'] : 0),
Find:
Code:
// put them after regular forums
$vbulletin->forumcache["$spaceid"]['displayorder'] = ($ord > 0 ? 1000 + $ord : 0);
$vbulletin->forumcache["$parent"]['childlist'] = str_replace(',-1', ',' . $spaceid . ',-1', $vbulletin->forumcache["$parent"]['childlist']);
Replace with:
Code:
$vbulletin->forumcache["$spaceid"]['displayorder'] = ($ord > 0 ? $ord : 0);
foreach (explode(',', $vbulletin->forumcache["$parent"]['childlist']) AS $child)
{
if ($child == -1 OR $child == $spaceid)
{
continue;
}
if (
$vbulletin->forumcache["$child"]['parentid'] == $parent AND
$vbulletin->forumcache["$child"]['displayorder'] > $ord
)
{
// this should reorder later entries after wikis
$pop = $vbulletin->forumcache["$child"];
unset($GLOBALS['vbulletin']->forumcache["$child"]);
$GLOBALS['vbulletin']->forumcache["$child"] = $pop;
}
}
$vbulletin->forumcache["$parent"]['childlist'] = str_replace(',-1', ',' . substr($vbulletin->forumcache["$spaceid"]['childlist'], 0), $vbulletin->forumcache["$parent"]['childlist']);