Quote:
Originally Posted by AlokSharma
Just in case, if someone only wants to add a tab, here is the modified code:
PHP Code:
$tabselected = ''; $tablinks = ''; if (THIS_SCRIPT == 'chat') { $vbulletin->options['selectednavtab']='chat'; $tabselected = ' class="selected"'; } $template_hook['navtab_end'] .= '<li'.$tabselected.'><a class="navtab" href="chat.php">Chat</a>'.$tablinks.'</li>' ;
Replace:
PHP Code:
if (THIS_SCRIPT == 'chat')
and
PHP Code:
$vbulletin->options['selectednavtab']='chat';
With some unique name.
|
Here is what I have:
PHP Code:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'home')
{
$vbulletin->options['selectednavtab']='home';
$tabselected = ' class="selected"';
}
$template_hook['navtab_start'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.egcglobal.com">Home</a>'.$tablinks.'</li>' ;
The tab itself shows up on all my pages, even my vBa main page, but I still cannot for the life of me figure out how to have the "Home" button be highlighted when it is selected.
If I click on it, it takes me to my main vBa portal page (
www.egcglobal.com) but it is the "Forum" button that stays highlighted.
Anyone have any ideas on how to fix this?
[SOLUTION BELOW]
Ok, so for anyone else who may be having the same issue as I was, if you are running vBa and want a "home" button, your plugin should look like below. Just remember to change the URL to your main page.
PHP Code:
$tabselected = '';
$tablinks = '';
if (THIS_SCRIPT == 'adv_index')
{
$vbulletin->options['selectednavtab']='Home';
$tabselected = ' class="selected"';
}
$template_hook['navtab_start'] .= '<li'.$tabselected.'><a class="navtab" href="http://www.egcglobal.com">Home</a>'.$tablinks.'</li>' ;
Thanks again to both Hippy & PankajKumar for helping me out and to Lynn for starting me on this quest : )