well i was analyzing that article before and its very confusing. i was wondering which is easier/better to do that way or vb's.
also i was look at vb's code:
PHP Code:
$iforumcache = array();
if ($getinvisibles) // get all forums including invisibles
{
foreach($forumcache AS $forumid => $forum)
{
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forumid"] = $forumid;
}
}
else // get all forums except invisibles
{
foreach($forumcache AS $forumid => $forum)
{
if ($forum['displayorder'] AND ($forum['options'] & $_FORUMOPTIONS['active']))
{
$iforumcache["$forum[parentid]"]["$forum[displayorder]"]["$forumid"] = $forumid;
}
else
{
unset($forumcache["$forumid"]);
}
}
}
// do some sorting (instead of sorting with MySQL and causing a filesort)
foreach($iforumcache AS $parentid => $devnull)
{
ksort($iforumcache["$parentid"]); // sort by display order
}
ksort($iforumcache); // sort by parentid (not actually sure if this is necessary)
i have never used ksort but ill assume its sorting it by parentid first then display?
also is childlist used at all in actually building the forum list/index?