vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=242)
-   -   [HOW TO - vB4] Remove the vB Default Navtabs (https://vborg.vbsupport.ru/showthread.php?t=234220)

Lynne 01-25-2010 10:00 PM

[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'">
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

3DUInc 01-27-2010 03:53 PM

Outstanding Lynne!!! Thanks a lot :)

moonray 02-07-2010 04:27 PM

Thanks!

ukwoman 02-08-2010 08:28 PM

Thanks Lynne. Can you tell me how to add Groups and Albums on the main nav bar?
:confused:

--------------- Added [DATE]1265671859[/DATE] at [TIME]1265671859[/TIME] ---------------

Help - it is not clear to me - which template I should be looking in to get rid of the What's new button.

As to my previous question - I got information from another article. Thanks.

Lynne 02-09-2010 03:31 AM

Quote:

Originally Posted by ukwoman (Post 1977757)
Help - it is not clear to me - which template I should be looking in to get rid of the What's new button.

Sorry, I didn't realize I had not put that in there! It is the navbar template you need to edit.

Gigio755 02-16-2010 08:16 AM

it works but this is an error in template:

https://vborg.vbsupport.ru/

how to remove this?

Spikeman 02-16-2010 09:40 AM

Is it possible to only show certain Navtabs to certain usergroups? for example I have Downloads Tab but only want UG 8 to be able to see the tab, by default right now my navbar is getting cluttered but not all groups need to be seeing all options.

Thanks in advance.

Lynne 02-16-2010 06:05 PM

Quote:

Originally Posted by Gigio755 (Post 1983601)
it works but this is an error in template:

http://img683.imageshack.us/img683/5125/arrowerror.jpg

how to remove this?

That is not present int he default style. So, you've changed some stylevar somewhere. You should use firebug to figure out what. It's not really the scope of this article though.

Quote:

Originally Posted by Spikeman (Post 1983641)
Is it possible to only show certain Navtabs to certain usergroups? for example I have Downloads Tab but only want UG 8 to be able to see the tab, by default right now my navbar is getting cluttered but not all groups need to be seeing all options.

Thanks in advance.

Sure you can put conditions around the tabs. There are articles here on how to write conditions for only certain usergroups and then you can apply that condition to your tab.

boatswife 02-23-2010 02:49 AM

Thank you~

badawidollah 03-29-2010 03:13 AM

Quote:

Removing the Home navtab:
Go to Plugins & Products > Plugin Manager > Product: vBulletin CMS > Navbar: Insert CMS Navbar Entry
Plugin is Active: NO
SAVE
not found in my vb402


All times are GMT. The time now is 03:53 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.01223 seconds
  • Memory Usage 1,747KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete