Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 4 Articles

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
  #52  
Old 01-01-2011, 10:59 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 kfyonur View Post
my cms is not active how can i remove the home for vb4.1
If you have disabled your CMS, then the Home tab is not from the cms but from a modification. You will have to figure out which one and then remove it.
Reply With Quote
  #53  
Old 01-23-2011, 12:01 AM
asuccar asuccar is offline
 
Join Date: Dec 2009
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hey dude,

I followed the instructions to remove 'what's new' to the nth detail but when i try to save it i get an error:

Quote:
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected '.' in /home/afourso1/public_html/includes/adminfunctions_template.php(5170) : eval()'d code on line 169

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
What is this?
Reply With Quote
  #54  
Old 01-23-2011, 12:44 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just tried the instructions on my 4.1.1 board and didn't get any errors.
Reply With Quote
  #55  
Old 01-23-2011, 07:27 PM
asuccar asuccar is offline
 
Join Date: Dec 2009
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm on 4.1.1 but I still get the error nonetheless...what can i do? I'm following ur instructions to the letter!

What could it possibly be?
Reply With Quote
  #56  
Old 01-23-2011, 09:10 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 asuccar View Post
I'm on 4.1.1 but I still get the error nonetheless...what can i do? I'm following ur instructions to the letter!

What could it possibly be?
Is this a totally default template you are editing? You should end up with something like this in there:
HTML Code:
        {vb:raw template_hook.navtab_middle}

        {vb:raw template_hook.navtab_end}
Is that what the template looks like right around where the What's New code was taken out?
Reply With Quote
  #57  
Old 01-25-2011, 01:17 AM
asuccar asuccar is offline
 
Join Date: Dec 2009
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I completely revert the navbar template, and after you instructions this is the code i end up with:

Quote:
<div id="navbar" class="navbar">

<ul id="navtabs" class="navtabs floatcontainer<vb:if condition="$show['member'] AND $notifications_total"> notify</vb:if>">
{vb:raw template_hook.navtab_start}
<vb:if condition="!$vboptions['selectednavtab']">
<li class="selected"><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a>
<ul class="floatcontainer">
{vb:raw template_hook.navbar_start}
<vb:if condition="$show['searchbuttons']">
<vb:if condition="$show['member']">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
</vb:if>
</vb:if>
{vb:raw template_hook.navbar_after_getnew}
<vb:if condition="$show['pmmainlink']">
<li><a href="private.php{vb:raw session.sessionurl_q}" rel="nofollow">{vb:rawphrase private_messages}</a></li>
</vb:if>
{vb:raw template_hook.navbar_after_pm}
<li><a rel="help" href="faq.php{vb:raw session.sessionurl_q}" accesskey="5">{vb:rawphrase faq}</a></li>
{vb:raw template_hook.navbar_after_faq}
<li><a href="calendar.php{vb:raw session.sessionurl_q}">{vb:rawphrase calendar}</a></li>
{vb:raw template_hook.navbar_after_calendar}

<vb:if condition="$show['communitylink']">
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="6">{vb:rawphrase community}</a>
<ul class="popupbody popuphover">
{vb:raw template_hook.navbar_community_menu_start}
<vb:if condition="$show['quick_links_groups']">
<li><a href="{vb:link grouphome}">{vb:rawphrase social_groups}</a></li>
</vb:if>
<vb:if condition="$show['quick_links_albums']">
<li><a href="album.php{vb:raw session.sessionurl_q}">{vb:rawphrase pictures_and_albums}</a></li>
</vb:if>
<vb:if condition="$bbuserinfo['userid']">
<li><a href="profile.php?{vb:raw session.sessionurl}do=buddylist"><vb:if condition="$show['friends_and_contacts']">{vb:rawphrase contacts_and_friends}<vb:else />{vb:rawphrase contacts}</vb:if></a></li>
</vb:if>
<vb:if condition="$show['memberslist']">
<li><a href="memberlist.php{vb:raw session.sessionurl_q}">{vb:rawphrase members_list}</a></li>
</vb:if>
{vb:raw template_hook.navbar_community_menu_end}
</ul>
</li>
</vb:if>
{vb:raw template_hook.navbar_after_community}
<li class="popupmenu">
<a href="javascript://" class="popupctrl">{vb:rawphrase forum_actions}</a>
<ul class="popupbody popuphover">
<li>
<a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a>
</li>
<vb:if condition="$show['member']">
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editoptions">{vb:rawphrase edit_options}</a>
</li>
<li>
<a href="profile.php?{vb:raw session.sessionurl}do=editprofile">{vb:rawphrase edit_your_details}</a>
</li>
</vb:if>
</ul>
</li>
<li class="popupmenu">
<a href="javascript://" class="popupctrl" accesskey="3">{vb:rawphrase quick_links}</a>
<ul class="popupbody popuphover">
<vb:if condition="$show['member']">
<li><a href="{vb:link subscription}" rel="nofollow">{vb:rawphrase subscribed_threads}</a></li>
<li><a href="javascript://" onclick="window.open(getBaseUrl() + 'misc.php?{vb:raw session.sessionurl}do=buddylist&amp;focus=1','budd ylist','statusbar=no,menubar=no,toolbar=no,scrollb ars=yes,resizable=yes,width=250,height=300'); return false;">{vb:rawphrase open_contacts}</a></li>
</vb:if>
<vb:if condition="$vboptions['forumleaders']">
<li><a href="showgroups.php{vb:raw session.sessionurl_q}" rel="nofollow">
<vb:if condition="$vb_suite_installed">
{vb:rawphrase view_site_leaders}
<vb:else />
{vb:rawphrase view_forum_leaders}
</vb:if>
</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos1}
{vb:raw template_hook.navbar_quick_links_menu_pos2}
{vb:raw template_hook.navbar_quick_links_menu_pos3}
<vb:if condition="$show['wollink']">
<li><a href="online.php{vb:raw session.sessionurl_q}">{vb:rawphrase whos_online}</a></li>
</vb:if>
{vb:raw template_hook.navbar_quick_links_menu_pos4}
</ul>
</li>
{vb:raw template_hook.navbar_end}
</ul>

</li>
<vb:else />
<li><a class="navtab" href="{vb:link forumhome}">{vb:rawphrase forum}</a></li>
</vb:if>
{vb:raw template_hook.navtab_middle}
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Post">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBFor um_Event">{vb:rawphrase new_events_nav}</a></li>
{vb:raw template_hook.navbar_getnew_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</li>
<vb:else />
<li class="selected"><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBF orum_Event">{vb:rawphrase daily_events}</a></li>
{vb:raw template_hook.navbar_getdaily_menu}
<li><a href="{vb:raw $vboptions.vbforum_url}{vb:if "$vboptions['vbforum_url']", '/', ''}forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={v b:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>

{vb:raw template_hook.navtab_end}
</ul>

<vb:if condition="$vboptions['enablesearches']">
<div id="globalsearch" class="globalsearch">
<form action="search.php?{vb:raw session.sessionurl}do=process" method="post" id="navbar_search" class="navbar_search">
<vb:comment><input type="hidden" name="s" value="{vb:raw session.sessionurl}" /></vb:comment>
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" name="do" value="process" />
<span class="textboxcontainer"><span><input type="text" value="" name="query" class="textbox" tabindex="99"/></span></span>
<span class="buttoncontainer"><span><input type="image" class="searchbutton" src="{vb:stylevar imgdir_button}/search.<vb:if condition="(is_browser('ie') AND !is_browser('ie', 7) AND !is_browser('ie', 8))">gif<vb:else />png</vb:if>" name="submit" onclick="document.getElementById('navbar_search'). submit;" tabindex="100"/></span></span>
</form>
<ul class="navbar_advanced_search">
<li><a href="search.php{vb:raw session.sessionurl_q}" accesskey="4">{vb:rawphrase advanced_search}</a></li>
</ul>
</div>
</vb:if>
</div>
</div><!-- closing div for above_body -->

<div class="body_wrapper">
<div id="breadcrumb" class="breadcrumb">
<ul class="floatcontainer">
<li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>

{vb:raw navbits.breadcrumb}
{vb:raw navbits.lastelement}
</ul>
<hr />
</div>

{vb:raw ad_location.ad_navbar_below}
{vb:raw ad_location.global_below_navbar}

<vb:if condition="$show['notices'] AND THIS_SCRIPT != 'register'">
<form action="profile.php?do=dismissnotice" method="post" id="notices" class="notices">
<input type="hidden" name="do" value="dismissnotice" />
<input type="hidden" name="s" value="{vb:raw session.sessionurl}" />
<input type="hidden" name="securitytoken" value="{vb:raw bbuserinfo.securitytoken}" />
<input type="hidden" id="dismiss_notice_hidden" name="dismiss_noticeid" value="" />
<input type="hidden" name="url" value="{vb:raw return_link}" />
<ol>
{vb:raw notices}
</ol>
</form>
</vb:if>
Reply With Quote
  #58  
Old 01-25-2011, 03:29 AM
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 asuccar View Post
I completely revert the navbar template, and after you instructions this is the code i end up with:
You need to delete everying between these areas:
HTML 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
...
            </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>
The "a bunch more stuff" means all the code inbetween those areas.
Reply With Quote
  #59  
Old 01-25-2011, 08:12 PM
asuccar asuccar is offline
 
Join Date: Dec 2009
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mea culpa

It worked perfectly...cheers!
Reply With Quote
  #60  
Old 03-02-2011, 10:41 PM
andrew_m andrew_m is offline
 
Join Date: Mar 2011
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I read the article suggested above but it did not describe how to remove the forum tab, I would actually like to remove the Forum tab (i have already remove the other tabs) and the background it is on. Any help would be appreciated.

i have vB 4.1.2

thanks
Reply With Quote
  #61  
Old 03-03-2011, 05:14 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 andrew_m View Post
I read the article suggested above but it did not describe how to remove the forum tab, I would actually like to remove the Forum tab (i have already remove the other tabs) and the background it is on. Any help would be appreciated.

i have vB 4.1.2

thanks
I believe that has been covered in the forums before - try a search.
Reply With Quote
Reply

Thread Tools

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 12:53 AM.


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.04744 seconds
  • Memory Usage 2,358KB
  • 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_html
  • (6)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
  • (4)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