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

Lynne 03-29-2010 03:24 AM

Quote:

Originally Posted by badawidollah (Post 2012029)
not found in my vb402

That's still exactly what the plugin is called in my 4.0.2 suite.

choitz 03-31-2010 02:47 PM

Hi Lynn,
That all worked perfectly, thank you very much!
:)

MacHack 04-01-2010 04:28 PM

Quote:

Originally Posted by badawidollah (Post 2012029)
not found in my vb402

Quote:

Originally Posted by Lynne (Post 2012033)
That's still exactly what the plugin is called in my 4.0.2 suite.

I don't see any product called "vBulletin CMS" either. I am not using Suite, just the Forum version if that makes any difference.

Lynne 04-02-2010 01:54 PM

Quote:

Originally Posted by MacHack (Post 2014144)
I don't see any product called "vBulletin CMS" either. I am not using Suite, just the Forum version if that makes any difference.

I'm sorry, but if you aren't using the Suite, you won't have a Home tab and therefore you don't need to remove it. So I don't understand why you guys are wondering about how to remove a tab that doesn't exist for you?

The Home and Blog tabs are only going to show if you have the Suite.

cmmorris1 04-03-2010 12:13 AM

How do you remove the forums link from the CMS nav bar?

ltlfoote 04-11-2010 08:45 PM

Another Thank You - worked like a charm.

Sgroove 05-03-2010 08:19 PM

Guys I would like to know how can I use only the CMS without Blog and Forum.
Is there a way I can deactivate the Forum?
Thanks...

Lynne 05-03-2010 10:59 PM

Quote:

Originally Posted by Sgroove (Post 2031309)
Guys I would like to know how can I use only the CMS without Blog and Forum.
Is there a way I can deactivate the Forum?
Thanks...

Um, I have no idea. Remove the tab? Remove the pages? Create no forums? Experiment with it on your test site.

Head Roller 05-27-2010 07:39 PM

How would I remove the "Projects" tab from the Navbar? I want that only available through the User CP and on in the main navigation.

Lynne 05-27-2010 10:39 PM

Quote:

Originally Posted by Head Roller (Post 2044259)
How would I remove the "Projects" tab from the Navbar? I want that only available through the User CP and on in the main navigation.

I believe that was already asked and answered in the forum specifically for questions regarding Open Source product.

Head Roller 05-27-2010 10:55 PM

OH.. I assure you I did do a search before posting the question.... just did another and nothing came up.. I will add some tags when I find it.

Lynne 05-27-2010 11:04 PM

Quote:

Originally Posted by Head Roller (Post 2044338)
OH.. I assure you I did do a search before posting the question.... just did another and nothing came up.. I will add some tags when I find it.

It's going to be hard to tag since there is no tagging in 3.6. :)

how to disable the link on the navbar?

Fuhrmann 06-01-2010 10:58 AM

Nice article, thanks.

merk_aus 06-13-2010 03:08 AM

Thanks for taking the time in doing this however it is just over my expertese i can't get rid of the whats new stuff! oh well thanks for taking the time.

theque 06-19-2010 08:31 PM

How can i remove this in 4.0.4 What's New tab?

i followed the first part of your instructions but i can't find this part of code

(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
...
            </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

Marvin Hlavac 06-30-2010 09:49 AM

This may be beyond the scope of this topic, but I'm searching for a way to completely remove the new "navtap" bar that contains the "Forum" and What's New" tabs and also the Search box.

I wish to completely eliminate the entire bar including its content. What would be a simple way to achieve it? Any ideas? Any links?

COL NIL SATIS 07-03-2010 09:55 PM

Fantastic ...the whats new tab wasnt needed and this has helped so so much ....thanks a lot Lynne !!!!! cheers

pilotxx 07-04-2010 12:49 PM

Quote:

Originally Posted by Marvin Hlavac (Post 2062166)
This may be beyond the scope of this topic, but I'm searching for a way to completely remove the new "navtap" bar that contains the "Forum" and What's New" tabs and also the Search box.

I wish to completely eliminate the entire bar including its content. What would be a simple way to achieve it? Any ideas? Any links?

you will need to delete all section of what's new code. it works for me.

Scan Cape Cod 07-09-2010 05:09 PM

Quote:

Originally Posted by cmmorris1 (Post 2014906)
How do you remove the forums link from the CMS nav bar?

I'd like to remove my Forum tab and instead place a link to it in a drop down Forums tab. But...without a hand hold I don't know how to do so.

James Cole 07-22-2010 12:51 PM

Hi, Lynne:

Great info! I hope you can help me take the programming changes to the navbar template one step further, by eliminating the entire second row of the navbar altogether.

That is, I want to turn this:

https://vborg.vbsupport.ru/

into this:

https://vborg.vbsupport.ru/

We already have an extensive website that the forum needs to fit into, so the second row just adds confusion to the site given the site's existing headers, search features, and so on.

Many thanks,
James

Lynne 07-22-2010 01:50 PM

Quote:

Originally Posted by James Cole (Post 2072892)
Hi, Lynne:

Great info! I hope you can help me take the programming changes to the navbar template one step further, by eliminating the entire second row of the navbar altogether.

I would post this question in the main forums. You'll need to figure out what to do about the search box also which isn't showing in your mockup.

CFodder 08-05-2010 10:49 PM

Tried this in 4.03, didn't like the replacement vb:if statement, some error about it being malformed :o.

I just did the second part with commenting out the large block of code, that did the trick, so now it's outta sight, outta mind ;).

Thanks for the tips Lynne :)

GamerPerfection 08-07-2010 03:34 PM

Trying this in vB 4.0.5 and I get this message at the end when trying to save.

adding child to non-existent node!

And it doesn't save. I did everything to the key but got that message.

Lynne 08-07-2010 08:52 PM

Quote:

Originally Posted by clarkey25 (Post 2080545)
Trying this in vB 4.0.5 and I get this message at the end when trying to save.

adding child to non-existent node!

And it doesn't save. I did everything to the key but got that message.

If you got that message, then that means you removed the beginning <if> and not the ending </if> or vice versa.

GamerPerfection 08-08-2010 06:58 AM

Lynne, I get this message:

Quote:

The following error occurred when attempting to evaluate this template:
Could not find phrase 'else_not_child_of_if'.
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.
As i said I followed your instructions to the key. I am making no mistakes here.

KevinL 08-08-2010 11:39 AM

Search for that at .com I think it is a bug. I came across it also. Just can't remember what I did to fix it. I think I had to stop saving css as files.

Lynne 08-10-2010 08:32 PM

Quote:

Originally Posted by clarkey25 (Post 2080750)
Lynne, I get this message:



As i said I followed your instructions to the key. I am making no mistakes here.

I just tested this again on my totally default vB4.0.5 navbar template and it was just fine for me.

FYI, on my test site, I have Store CSS Stylesheets as Files set to No.

GamerPerfection 08-10-2010 08:42 PM

Ok i see my error, when i saw this: "a bunch more stuff" I was thinking you meant to skip that stuff and move to the next bit.

Lynne 08-10-2010 09:05 PM

Quote:

Originally Posted by clarkey25 (Post 2081878)
Ok i see my error, when i saw this: "a bunch more stuff" I was thinking you meant to skip that stuff and move to the next bit.

Sorry about that. Glad you figured it out and got it working now.

AF_staff 10-03-2010 11:08 AM

Thank You Lynne! :)


All times are GMT. The time now is 09:34 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.01440 seconds
  • Memory Usage 1,837KB
  • 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
  • (7)bbcode_code_printable
  • (18)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
  • (40)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