private function make_forum_breadcrumbs()
{
global $aidlink;
/* Make an infinity traverse */
function breadcrumb_arrays($index, $id)
{
global $aidlink;
$crumb = array('link' => array(), 'title' => array());
if (isset($index[get_parent($index, $id)])) {
$_name = dbarray(dbquery("SELECT forum_id, forum_name FROM " . DB_FORUMS . " WHERE forum_id='" . intval($id) . "'"));
$crumb = array('link' => array(FUSION_SELF . $aidlink . "&parent_id=" . $_name['forum_id']), 'title' => array($_name['forum_name']));
if (isset($index[get_parent($index, $id)])) {
if (get_parent($index, $id) == 0) {
return $crumb;
}
$crumb_1 = breadcrumb_arrays($index, get_parent($index, $id));
$crumb = array_merge_recursive($crumb, $crumb_1);
// convert so can comply to Fusion Tab API.
}
}
return $crumb;
}
// then we make a infinity recursive function to loop/break it out.
$crumb = breadcrumb_arrays($this->forum_index, $_GET['parent_id']);
add_breadcrumb(array('link' => FUSION_SELF . $aidlink, 'title' => self::$locale['forum_000c']));
for ($i = count($crumb['title']) - 1; $i >= 0; $i--) {
add_breadcrumb(array('link' => $crumb['link'][$i], 'title' => $crumb['title'][$i]));
}
return $crumb;
}