PDA

View Full Version : [HOW TO - vB4] Remove the vB Default Navtabs


Lynne
26 Jan 2010, 19:08
[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):
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'">Change to:
<vb:if condition="!$vboptions['selectednavtab']">Find and Remove (about 2/3 down):
<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:
{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):

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):

<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 (http://www.vbulletin.org/forum/showthread.php?t=226914)
[HOW TO - vB4] Create your own vBulletin page (http://www.vbulletin.org/forum/showthread.php?t=228112)

3DUInc
27 Jan 2010, 17:53
Outstanding Lynne!!! Thanks a lot :)

moonray
07 Feb 2010, 18:27
Thanks!

ukwoman
08 Feb 2010, 22:28
Thanks Lynne. Can you tell me how to add Groups and Albums on the main nav bar?
:confused:

--------------- Added 1265671859 at 1265671859 ---------------

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
09 Feb 2010, 05:31
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
16 Feb 2010, 10:16
it works but this is an error in template:

https://www.vbulletin.org/forum/

how to remove this?

Spikeman
16 Feb 2010, 11:40
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
16 Feb 2010, 20:05
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.

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
23 Feb 2010, 04:49
Thank you~

badawidollah
29 Mar 2010, 05:13
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
29 Mar 2010, 05:24
not found in my vb402
That's still exactly what the plugin is called in my 4.0.2 suite.

choitz
31 Mar 2010, 16:47
Hi Lynn,
That all worked perfectly, thank you very much!
:)

MacHack
01 Apr 2010, 18:28
not found in my vb402

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
02 Apr 2010, 15:54
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
03 Apr 2010, 02:13
How do you remove the forums link from the CMS nav bar?

ltlfoote
11 Apr 2010, 22:45
Another Thank You - worked like a charm.

Sgroove
03 May 2010, 22:19
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
04 May 2010, 00:59
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
27 May 2010, 21:39
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
28 May 2010, 00:39
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
28 May 2010, 00:55
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
28 May 2010, 01:04
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? (http://www.vbulletin.org/forum/showthread.php?t=241460)

Fuhrmann
01 Jun 2010, 12:58
Nice article, thanks.

merk_aus
13 Jun 2010, 05:08
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
19 Jun 2010, 22:31
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):
<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
30 Jun 2010, 11:49
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
03 Jul 2010, 23:55
Fantastic ...the whats new tab wasnt needed and this has helped so so much ....thanks a lot Lynne !!!!! cheers

pilotxx
04 Jul 2010, 14:49
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
09 Jul 2010, 19:09
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
22 Jul 2010, 14:51
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://www.vbulletin.org/forum/

into this:

https://www.vbulletin.org/forum/

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
22 Jul 2010, 15:50
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
06 Aug 2010, 00:49
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
07 Aug 2010, 17:34
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
07 Aug 2010, 22:52
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 Aug 2010, 08:58
Lynne, I get this message:

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 Aug 2010, 13:39
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
10 Aug 2010, 22:32
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
10 Aug 2010, 22:42
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
10 Aug 2010, 23:05
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
03 Oct 2010, 13:08
Thank You Lynne! :)

Tariq Waheed
15 Oct 2010, 03:52
How CAN I ADD A Twitter button to my Site on my nav bar?

Lynne
15 Oct 2010, 06:19
How CAN I ADD A Twitter button to my Site on my nav bar?
I have no idea and this really isn't the thread to post that question in.

XiTCLUB
21 Oct 2010, 19:35
Done ! Thanks

OurCouponHome
21 Oct 2010, 23:57
Thanks!!

paulnicholson
25 Oct 2010, 17:56
How can I remove 'Forum' tab?

The code for removing 'What's New?'tab seems irrelevant in 4.0.8. Do you have the new code to remove?

--------------- Added 1288026413 at 1288026413 ---------------

I think this is the code for vb 4.0.8:

<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" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_Event">{vb:rawphrase new_events_nav}</a></li>
{vb:raw template_hook.navbar_getnew_menu}
<li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb: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=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Event">{vb:rawphrase daily_events}</a></li>
{vb:raw template_hook.navbar_getdaily_menu}
<li><a href="forumdisplay.php?{vb:raw session.sessionurl}do=markread&amp;markreadhash={vb:raw bbuserinfo.securitytoken}">{vb:rawphrase mark_forums_read}</a></li>
</ul>
</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" accesskey="2">{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" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
</vb:if>

theque
02 Dec 2010, 23:02
Thank you! removed whats new in my forum

kfyonur
23 Dec 2010, 15:10
Thank you.

mclarens
24 Dec 2010, 21:30
ok have abit of trouble getting this to work properly.

I get to manage to remove the whats new tab. but then the line under disapear compleetly.
And i want the home button to stay + the line under the navbar

Anyone who can post theyr text to make this correct or point me to the right direction where i failed?

your24hourstore
25 Dec 2010, 14:58
I want to get rid of the navtab to forum, i don't want to disable forum, just remove the navbar forum tab, i did it by breaking the script but it leaves a blank tab , I then redirected that blank tab to CMS . it does what i need but is their a cleaner way to do it?,

I still want to use forums to post the stuff that will show up in promoted articles and Cms widgets, but no user access to forums, only admin can post, I dont care if they find the forum through the web or even if they goto forum.php, they can have read access but cant post anyway

--------------- Added 1293289429 at 1293289429 ---------------

ok have abit of trouble getting this to work properly.

I get to manage to remove the whats new tab. but then the line under disapear compleetly.
And i want the home button to stay + the line under the navbar

Anyone who can post theyr text to make this correct or point me to the right direction where i failed?
go in and replace your template with a default version then use this mod http://www.vbulletin.org/forum/showthread.php?t=238187

kfyonur
01 Jan 2011, 23:51
my cms is not active how can i remove the home for vb4.1

Lynne
02 Jan 2011, 00:59
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.

asuccar
23 Jan 2011, 02:01
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:

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?

Lynne
23 Jan 2011, 02:44
I just tried the instructions on my 4.1.1 board and didn't get any errors.

asuccar
23 Jan 2011, 21:27
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?

Lynne
23 Jan 2011, 23:10
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:
{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?

asuccar
25 Jan 2011, 03:17
I completely revert the navbar template, and after you instructions this is the code i end up with:

<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=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_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={vb: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','buddylist','statusbar=no,menubar=no,to olbar=no,scrollbars=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=vBForum_Post">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&amp;contenttype=vBForum_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={vb: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=vBForum_Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&amp;contenttype=vBForum_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={vb: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>

Lynne
25 Jan 2011, 05:29
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:
<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.

asuccar
25 Jan 2011, 22:12
Mea culpa:)

It worked perfectly...cheers!

andrew_m
03 Mar 2011, 00:41
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

Lynne
03 Mar 2011, 19:14
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.

Laurent42
16 Mar 2011, 21:02
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! :D

--
Laurent

Lynne
16 Mar 2011, 21:39
The Forum tab doesn't use a template_hook since it is entered right into the navbar template.

Laurent42
16 Mar 2011, 21:42
You mean left?
Well, an idea how to put it in the middle? :)

Lynne
16 Mar 2011, 21:52
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.

Laurent42
16 Mar 2011, 22:05
I just want the forum tab at the middle (it's left by default).
But I do not know how to do it :)

Lynne
16 Mar 2011, 23:27
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.

Laurent42
16 Mar 2011, 23:58
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 :(

Lynne
17 Mar 2011, 02:15
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?

Laurent42
17 Mar 2011, 10:04
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. :'(

Lynne
17 Mar 2011, 21:42
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. :'(
So the MediaLibrary tab shows up if you have it set to navtab_middle but not if you have it set to navtab_left? Have you looked in your navbar template to verify you have that template_hook there?

Laurent42
17 Mar 2011, 23:28
So the MediaLibrary tab shows up if you have it set to navtab_middle but not if you have it set to navtab_left?

Exactly!

Have you looked in your navbar template to verify you have that template_hook there?

There is no navtab_left hook called in the navbar template? It should? In the default template there is one??

I do not have modified my default template and by doing a search, I do not find navtab_left hook in the default navbar!

--------------- Added 1300401520 at 1300401520 ---------------

Ok, I have fixed the problem.

I just needed to hook navtab_start. =)
But I do not understand the difference of navtab_left/navtab_start.

So good to know => the first element is navtab_start and not navtab_left...

A big thanks to Lynne for his/her time!

Laurent42
19 Mar 2011, 12:26
So now my tabs in the correct order!

My custom tab is the first one.
The forum tab is the second one.

The new problem I have is...
That's the second tab that is selected by default.

What should I hook in order to have my first tab selected by default when I go on the site?

Laurent42
19 Mar 2011, 13:50
Maybe this can help, here is the plugin code:

$perms = media_permissions();

$vbulletin->options['selectednavtab'] = 'media';

$categories = $vbulletin->db->query_read("
SELECT * FROM ".TABLE_PREFIX."media_category
WHERE catOrder != '0'
ORDER BY catOrder
");

$href['playlists'] = construct_href_playlists();
$href['pmine'] = construct_href_playlists_mine();
$href['pcreate'] = construct_href_playlists_create();
$href['favorites'] = construct_href_favorites();
$href['subscriptions'] = construct_href_subscriptions();
$href['submit'] = construct_href_submit();
$href['random'] = construct_href_random();
$href['cats'] = construct_href_admin("cats");
$href['tags'] = construct_href_admin("tags");
$href['host'] = construct_href_admin("host");

while ($category = $vbulletin->db->fetch_array($categories))
{
$category['href'] = construct_href_category($category);

$category['align'] = "";
for ($i = 0; $i < $category['catDepth']; $i++) { $category['align'] .= '-- '; }

$templater = vB_Template::create('8WR_media_NAVTAB_cat');
$templater->register('category', $category);
$categorybits .= $templater->render();
}
}

$templater = vB_Template::create('8WR_media_NAVTAB');
$templater->register('perms', $perms);
$templater->register('href', $href);
$templater->register('categorybits', $categorybits);
$template_hook['navtab_start'] .= $templater->render();

Lynne
19 Mar 2011, 18:20
You know this is an article about removing default navtabs, right? I just realized that you are talking about adding a navtab which has nothing to do with this article.

But anyway, if you need someone to try to debug your plugin, you should post your own thread. I do notice you have an extra } just sitting in there without a beginning.

Laurent42
19 Mar 2011, 18:35
Ok, I'm going to start a new thread.

For the '}' it's ok, the beginning of the code has not been pasted.

ps: It's not my plugin, but a well known (Media Library).

screenmates
02 Apr 2011, 07:07
Hi Lynne,

vB 4.1.2

We tried several times to remove the code precisely as you suggested from the navbar template but the What's New button remains intact. Also tried clearing CMS cache but no luck. Has something else changed in 4.1.2 and do we need to do anything special?

Please help...

Thanks!

Lynne
02 Apr 2011, 17:40
Make sure you are editing the correct style. There is no way you could remove all that code and still have the tab. If you are not using a default style, then make sure it isn't in there twice. And, make sure a modification is not adding the tab.

CardMafia
13 May 2011, 00:43
Thank you for this article! Very helpful and less involved than the first article I read on the subject.

sortega
25 Jul 2011, 20:33
I made the changes above as best I could and got the following error message when complete (it did remove my "Home" and "Blog" buttons which is what I wanted)

"Parse error: syntax error, unexpected '<' in /home2/hersheyi/public_html/forum/includes/class_bootstrap.php(537) : eval()'d code on line 9"

but how do I correct that?

I did notice that for your removing the Blog button code your code did not match mine (see both exampled below) so I commented out the section I thought applied.

Yours:
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();
}
}

Mine:
<!-- 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'] = '';
}

HELP!

Lynne
26 Jul 2011, 00:40
That is not how you comment out php. You use /* at the beginning and */ at the end. If you use those for that section that you showed, then it will work. <!-- and --> are used for commenting out html.

sortega
26 Jul 2011, 14:54
THANK YOU, LYNNE! That fixed it, you're wonderful! :)

Buray Savas ANI
23 Sep 2011, 16:54
This on vbulletin 4.1.6 work or not? i vanto setup but i m not sure. Please send message about this.

christian gate
28 Oct 2011, 02:01
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

fraby
22 Nov 2011, 16:39
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.

FReeSTER
25 Nov 2011, 13:35
this is different from vb4.1.7 and my styles. :(:confused::o

Lynne
25 Nov 2011, 17:49
this is different from vb4.1.7 and my styles. :(:confused::o
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.

andrew_m
29 Dec 2011, 16:22
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.

Lynne
29 Dec 2011, 17:06
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.

New Joe
16 Jan 2012, 05:24
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:
$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'] = '';
}

TombstoneWarrior
11 Feb 2012, 16:42
thanks for the info

djscoop
19 Feb 2012, 19:25
Tip on removing Members Tab?

MacroPhotoPro
03 Apr 2012, 04:30
I successfully removed the tabs I wanted to, following your instruction here, so thank you very much for writing it.

I also successfully added new tabs, and navbar links/menus following your instruction on another article (http://www.vbulletin.org/forum/showthread.php?t=226914), so thanks once again.

However, while I have successfully removed tabs I didn't want, and created custom tabs/navbar links, what I can't seem to do is alter the default Tabs (Home/Forum/Blogs) nor can I find a way to customize their navbar links.

So while you're two articles (this one here and the one I linked to) have helped me tremendously, would you mind letting me know how I can alter (not remove) the navbar links in the Blog (Home/Forum) Tabs?

Thank you very much,

Jack

TradingApples
04 Apr 2012, 01:36
Hi, would it be a good idea to comment out these sections of code to preserve the option to use these tabs in the future?

Thanks

luggz
12 Nov 2013, 00:59
I can not get the forums tab to go all the way away i still see it in my pm page and some other pages what did i miss? please help point it out...


****I found it thanks any ways sorry****

tbworld
12 Nov 2013, 01:12
vBulletin modified the Navigation system starting with v4.2.0, and again in v4.2.1. Remember that @Lynne's solution worked in 2010, it might not work on the later versions.

You can now remove the navtabs from the navigation manager directly.
admincp -> settings -> Navigation Manager.