2. Create a plugin at the hook process_templates_complete
PHP Code:
if (THIS_SCRIPT == 'xxx') // also defined('ragteknews') possible
{
//set selected tab
$vbulletin->options['selectednavtab'] = 'ragteknews';
}
// add the "subtemplate" to the navbartemplate
$template_hook['navtab_middle'] .= vB_Template::create('ragtek_news_navbar')->render();
As you see, i've defined "ragteknews" on my news.php page.If ragteknews is defined, $vbulletion->options['selectednavtab'] will be set to ragteknews.
Thats important because where using a condition in the template:
2. Create a plugin at the hook process_templates_complete
PHP Code:
if (THIS_SCRIPT == 'xxx') // also defined('ragteknews') possible
{
//set selected tab
$vbulletin->options['selectednavtab'] = 'ragteknews';
}
// add the "subtemplate" to the navbartemplate
$template_hook['navtab_middle'] .= vB_Template::create('ragtek_news_navbar')->render();
As you see, i've defined "ragteknews" on my news.php page.If ragteknews is defined, $vbulletion->options['selectednavtab'] will be set to ragteknews.
Thats important because where using a condition in the template:
Everything turns out good.. just have one issue (see screenshot).. I added both tabs, "auction" & "news". When I click news, only the news tab is selected which is what it is supposed to do, however when i select auction, both news & auction are selected..
Everything turns out good.. just have one issue (see screenshot).. I added both tabs, "auction" & "news". When I click news, only the news tab is selected which is what it is supposed to do, however when i select auction, both news & auction are selected..
very strange, any ideas?
Is this part unique for each?
Code:
if (THIS_SCRIPT == 'xxx') // also defined('ragteknews') possible
{
//set selected tab
$vbulletin->options['selectednavtab'] = 'ragteknews';
}
Yes, I have made sure that neither plugins or templates has anything similar, each are using unique templates and plugins.
When I click the "Auction" link both are selected, but when I click "New" only news is selected, so I was thinking that something was wrong with the auction template or plugin, but I can't find anything wrong since it was not unique. Thanks.
Ok, I red the entire thread but didn`t find solution for my problem.
The tab is successfully displayed on my forum navbar, but when I am on the homepage which is CMS I don`t see my new tab, only the default ones: Home, Forum, Blogs, What's New?
Yes, I have made sure that neither plugins or templates has anything similar, each are using unique templates and plugins.
When I click the "Auction" link both are selected, but when I click "New" only news is selected, so I was thinking that something was wrong with the auction template or plugin, but I can't find anything wrong since it was not unique. Thanks.
You'll need to post your code for both so we can see it.
Quote:
Originally Posted by nasko
Ok, I red the entire thread but didn`t find solution for my problem.
The tab is successfully displayed on my forum navbar, but when I am on the homepage which is CMS I don`t see my new tab, only the default ones: Home, Forum, Blogs, What's New?
Any help ?
Are you using a different style on the CMS section?
I have a question about using this with vBa CMPS...I'd like the subnav links to be the various pages of my vBa CMPS. Basically I want the links in the Site Navigation module to show in my navbar.
I've pieced a few things together, but obviously I've done something horribly wrong as they aren't working...
I basically just copied and pasted code, so some of this code is not playing well with other parts. I just need to figure out where I need to change things...
Here's my plugin code:
PHP Code:
$navigationbits = array();
if (!empty($vbulletin->adv_portal_page)) { $navpages = array_keys($vbulletin->adv_portal_page); }
if (!empty($mod_options['portal_navigation_excludepages'])) { $navpages = array_diff($navpages, $mod_options['portal_navigation_excludepages']); }
if (THIS_SCRIPT == 'adv_index') // also defined('ragteknews') possible { //set selected tab $vbulletin->options['selectednavtab'] = 'portal'; } // add the "subtemplate" to the navbartemplate $template_hook['navtab_start'] .= vB_Template::create('portal_navbar')->render();
(with parts taken directly from the navigation.php module code)