The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[HOW TO - vB4] Remove the vB Default Navtabs
[HOW TO - vB4] Remove the vB Default Navtabs Here is a quick article on how to remove some of the default vbulletin navtabs from the navbar template. Removing the What's New navtab: Find (near the top of the template): Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> Code:
<vb:if condition="!$vboptions['selectednavtab']"> Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT == 'search'"> <vb:if condition="$show['member']"> <li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a> ... a bunch more stuff inbetween to remove ... </li> </vb:if> <vb:elseif condition="$show['member']" /> <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li> <vb:else /> <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li> </vb:if> In a default navbar template, after removing the chunk of code above, you should end up with this in the template where the code used to be: Code:
{vb:raw template_hook.navtab_middle} {vb:raw template_hook.navtab_end} Go to Plugins & Products > Plugin Manager > Product: vBulletin CMS > Navbar: Insert CMS Navbar Entry Plugin is Active: NO SAVE Removing the Blogs navtab: Go to Plugins & Products > Plugin Manager > Product: vBulletin Blog > Navbar: Eval Blog Link Template and Validate Styleid Find and Remove (or comment out): Code:
if (defined('VBBLOG_CACHED_TEMPLATES')) { if (defined('VBBLOG_SCRIPT')) { $vbulletin->options['selectednavtab'] = 'vbblog'; } $template_hook['navtab_middle'] .= vB_Template::create('blog_navbar_link')->render(); $template_hook['navbar_getnew_menu'] .= vB_Template::create('blog_navbar_whatsnew_link')->render(); if ($show['blog_search']) { $template_hook['navbar_search_menu'] .= vB_Template::create('blog_navbar_search')->render(); } } Removing the Forum navtab: Find and remove (starts near the very top): Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> ... a bunch more stuff inbetween to remove ... <vb:else /> <li><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a></li> </vb:if> Other related articles of possible interest: [HOW TO - vB4] Create a New Tab in the navbar [HOW TO - vB4] Create your own vBulletin page |
#62
|
|||
|
|||
Hello,
I want to move the Forum tab at the middle and then a custom tab at the left. I have hooked my custom tab with $template_hook['navtab_left']. I do not find $template_hook['navtab_left'] for the Forum tab. I do not know where to put $template_hook['navtab_middle'] for this default tab. Help! -- Laurent |
#63
|
||||
|
||||
The Forum tab doesn't use a template_hook since it is entered right into the navbar template.
|
#64
|
|||
|
|||
You mean left?
Well, an idea how to put it in the middle? |
#65
|
||||
|
||||
What do you want in the middle? You would change the template_hook in the plugin to use the one you want. If you want to see exactly where they are located, then look in the navbar template.
|
#66
|
|||
|
|||
I just want the forum tab at the middle (it's left by default).
But I do not know how to do it |
#67
|
||||
|
||||
You will have to add any navtab you want to add to the navtab_left template_hook if you want it to the left of the forum navtab.
|
#68
|
|||
|
|||
Well, that's not the case.
I hook on the middle for my custom tab and it works. When I hook on the left (what i want), the custom tab disappear... because of the forum tab which is located to the left by default... I suppose. Sad to see a such basic feature does not exist on vBulletin |
#69
|
||||
|
||||
It works just fine on my test site, so maybe your code is incorrect? Or perhaps you didn't try changing the Execution Order of the plugin?
|
#70
|
|||
|
|||
First of all thanks for your answers Lynne,
I have just changed the following line in the plugin (MediaLibrary): $template_hook['navtab_middle'] .= $templater->render(); to $template_hook['navtab_left'] .= $templater->render(); then after your post I have changed the order from 5 to 1. (but I do not well if it's correct) The Media Library tab still does not appear. :'( |
#71
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|