Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[HOW TO - vB4] Remove the vB Default Navtabs
Lynne's Avatar
Lynne
Join Date: Sep 2004
Posts: 41,180

 

California/Idaho
Show Printable Version Email this Page Subscription
Lynne Lynne is offline 01-25-2010, 10:00 PM

[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'">
Change to:
Code:
        <vb:if condition="!$vboptions['selectednavtab']">
Find and Remove (about 2/3 down):
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&amp;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&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li>
        <vb:else />
            <li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase getnew_tab}</a></li>
        </vb:if>
SAVE

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}
Removing the Home navtab:
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();
    }
}
SAVE

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>
SAVE

Other related articles of possible interest:
[HOW TO - vB4] Create a New Tab in the navbar
[HOW TO - vB4] Create your own vBulletin page
Reply With Quote
  #82  
Old 07-26-2011, 12:54 PM
sortega sortega is offline
 
Join Date: Jul 2011
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

THANK YOU, LYNNE! That fixed it, you're wonderful!
Reply With Quote
  #83  
Old 09-23-2011, 02:54 PM
Buray Savas ANI Buray Savas ANI is offline
 
Join Date: Jul 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This on vbulletin 4.1.6 work or not? i vanto setup but i m not sure. Please send message about this.
Reply With Quote
  #84  
Old 10-28-2011, 12:01 AM
christian gate christian gate is offline
 
Join Date: Aug 2011
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
I need a bit of direction to make sure I am deleting the "What's New" & Forum Tab from the right file.

I went to Style Manager - From The templates I selected Navigation / Breadcrumb then navbar

I followed your instruction but it's not saving the changes and error massage ask me to check line 184

I am using vb 4.1.7 and I need to move the 2 tabs please.

Regards
Reply With Quote
  #85  
Old 11-22-2011, 03:39 PM
fraby fraby is offline
 
Join Date: Oct 2011
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To Remove the BLOG navtab:
Plugins & Products > Plugin Manager > Product: vBulletin Blog > Navbar: Eval Blog Link Template and Validate Styleid

You can just check the box Inactive for it to disappear from the Navtab now.
Reply With Quote
  #86  
Old 11-25-2011, 12:35 PM
FReeSTER FReeSTER is offline
 
Join Date: Jun 2006
Location: Rome
Posts: 730
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

this is different from vb4.1.7 and my styles.
Reply With Quote
  #87  
Old 11-25-2011, 04:49 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by FReeSTER View Post
this is different from vb4.1.7 and my styles.
I just checked all this in my 4.1.8 navbar template and it's pretty much the same. If you have a custom template, you'll have to try to figure it out yourself or ask the developer for help.
Reply With Quote
  #88  
Old 12-29-2011, 03:22 PM
andrew_m andrew_m is offline
 
Join Date: Mar 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Lynne,

I went through your artilce and successfully removed most navbar tabs (thanks !)

except i cannot remove the 'Forum' tab, i dont see the code that you specify needs to be removed from 'Navbar: Eval Blog Link Template and Validate Styleid', perhaps i am looking in the wrong place or because my version is new there is different code to removed. I have version. 4.1.9.

This is the code I have for 'Edit Plugin Navbar: Eval Blog Link Template and Validate Styleid'

----------
$show['canpostitems'] = (
$vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown']
AND
$vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_canpost']
AND
$vbulletin->userinfo['userid']
);

/*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 (STYLEID != $vbulletin->userinfo['blogstyleid'])
{
$vbulletin->userinfo['blocktext'] = '';
}

----------

Any help would be appreciated from anyone, thanks.
Reply With Quote
  #89  
Old 12-29-2011, 04:06 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The Forum tab is in the navbar template, not a plugin. That plugin you are quoting is for the Blog tab. The code has changed a little, but the condition is still there - comment it out.
Reply With Quote
  #90  
Old 01-16-2012, 04:24 AM
New Joe's Avatar
New Joe New Joe is offline
 
Join Date: May 2009
Posts: 1,128
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The remove Blog Tab info and what to take out is different than the code in the start of this Article.

Which part to remove from here:
Quote:
$show['canpostitems'] = (
$vbulletin->userinfo['permissions']['vbblog_general_permissions'] & $vbulletin->bf_ugp_vbblog_general_permissions['blog_canviewown']
AND
$vbulletin->userinfo['permissions']['vbblog_entry_permissions'] & $vbulletin->bf_ugp_vbblog_entry_permissions['blog_canpost']
AND
$vbulletin->userinfo['userid']
);

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 (STYLEID != $vbulletin->userinfo['blogstyleid'])
{
$vbulletin->userinfo['blocktext'] = '';
}
Reply With Quote
  #91  
Old 02-11-2012, 03:42 PM
TombstoneWarrior's Avatar
TombstoneWarrior TombstoneWarrior is offline
 
Join Date: Jan 2012
Posts: 154
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the info
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:42 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06319 seconds
  • Memory Usage 2,330KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (8)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete