Quote:
Originally Posted by nerbert
But now your problem is figuring out navbits. If you view a thread or forum that shows on forum22 the first link in your navbits should take you to forum22 instead of forum.
|
You will have to do some file edits because no hooks for that
in forumdisplay.php .. directly under
PHP Code:
$navbits[''] = $foruminfo['title'];
put
PHP Code:
$forum2list = array(1,2,3); //id's of forums of forum2.php
if (in_array($forumid, $forum2list)) {
foreach ($navbits as $key => $value) {
if ($key == 'forum.php') {
$nav['forum2.php'] = $value;
} else {
$nav[$key] = $value;
}
}
$navbits = $nav;
}
and put the same code in showthread.php directly under
PHP Code:
$navbits[''] = $thread['prefix_rich'] . ' ' . $thread['title'];
--------------- Added [DATE]1421133482[/DATE] at [TIME]1421133482[/TIME] ---------------
If you don't want to edit files you can use the next hook location and redo all navbar work
for example
showthread_complete in showthread.php
PHP Code:
$navbits = array();
$navbits[fetch_seo_url('forumhome', array())] = $vbphrase['forum'];
$parentlist = array_reverse(explode(',', substr($forum['parentlist'], 0, -3)));
foreach ($parentlist AS $forumID)
{
$forumTitle = $vbulletin->forumcache["$forumID"]['title'];
$navbits[fetch_seo_url('forum', array('forumid' => $forumID, 'title' => $forumTitle))] = $forumTitle;
}
$navbits[''] = $thread['prefix_rich'] . ' ' . $thread['title'];
$forum2list = array(1,2,3); //id's of forums of forum2.php
if (in_array($forumid, $forum2list)) {
foreach ($navbits as $key => $value) {
if ($key == 'forum.php') {
$nav['forum2.php'] = $value;
} else {
$nav[$key] = $value;
}
}
$navbits = $nav;
}
$navbits = construct_navbits($navbits);
$navbar = render_navbar_template($navbits);