View Full Version : [HOW TO - vB4] Remove the vB Default Navtabs
Lynne
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):
<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&contenttype=vBForum_P ost">{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&contenttype=vBForum_P ost">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&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 (https://vborg.vbsupport.ru/showthread.php?t=226914)
[HOW TO - vB4] Create your own vBulletin page (https://vborg.vbsupport.ru/showthread.php?t=228112)
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 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
02-09-2010, 03:31 AM
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
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
02-23-2010, 02:49 AM
Thank you~
badawidollah
03-29-2010, 03:13 AM
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
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
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
04-02-2010, 01:54 PM
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
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
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
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? (https://vborg.vbsupport.ru/showthread.php?t=241460)
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):
<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&contenttype=vBForum_P ost">{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&contenttype=vBForum_P ost">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&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
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
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
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
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:
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
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
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! :)
Tariq Waheed
10-15-2010, 01:52 AM
How CAN I ADD A Twitter button to my Site on my nav bar?
Lynne
10-15-2010, 04:19 AM
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
10-21-2010, 05:35 PM
Done ! Thanks
OurCouponHome
10-21-2010, 09:57 PM
Thanks!!
paulnicholson
10-25-2010, 03:56 PM
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&contenttype=vBForum_P ost" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_S ocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_E vent">{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&markreadhash={vb:ra w 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&contenttype=vBForum _Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&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&markreadhash={vb:ra w 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&contenttype=vBForum_P ost" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post" accesskey="2">{vb:rawphrase getnew_tab}</a></li>
</vb:if>
theque
12-02-2010, 09:02 PM
Thank you! removed whats new in my forum
kfyonur
12-23-2010, 01:10 PM
Thank you.
mclarens
12-24-2010, 07:30 PM
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
12-25-2010, 12:58 PM
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 https://vborg.vbsupport.ru/showthread.php?t=238187
kfyonur
01-01-2011, 09:51 PM
my cms is not active how can i remove the home for vb4.1
Lynne
01-01-2011, 10:59 PM
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
01-23-2011, 12:01 AM
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
01-23-2011, 12:44 AM
I just tried the instructions on my 4.1.1 board and didn't get any errors.
asuccar
01-23-2011, 07:27 PM
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
01-23-2011, 09:10 PM
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
01-25-2011, 01:17 AM
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&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<vb:else />
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&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&markreadhash={vb:ra w 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&focus=1','buddylis t','statusbar=no,menubar=no,toolbar=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&contenttype=vBForum_P ost">{vb:rawphrase new_posts_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_S ocialGroupMessage">{vb:rawphrase new_group_messages_nav}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getnew&contenttype=vBForum_E vent">{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&markreadhash={vb:ra w 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&contenttype=vBForum _Post" accesskey="2">{vb:rawphrase getnew_tab}</a>
<ul class="floatcontainer">
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase todays_posts}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _SocialGroupMessage">{vb:rawphrase daily_group_message}</a></li>
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&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&markreadhash={vb:ra w 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
01-25-2011, 03:29 AM
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&contenttype=vBForum_P ost">{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&contenttype=vBForum_P ost">{vb:rawphrase getnew_tab}</a></li>
<vb:else />
<li><a class="navtab" href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum _Post">{vb:rawphrase getnew_tab}</a></li>
</vb:if>
The "a bunch more stuff" means all the code inbetween those areas.
asuccar
01-25-2011, 08:12 PM
Mea culpa:)
It worked perfectly...cheers!
andrew_m
03-02-2011, 10:41 PM
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-03-2011, 05:14 PM
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
03-16-2011, 07:02 PM
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
03-16-2011, 07:39 PM
The Forum tab doesn't use a template_hook since it is entered right into the navbar template.
Laurent42
03-16-2011, 07:42 PM
You mean left?
Well, an idea how to put it in the middle? :)
Lynne
03-16-2011, 07:52 PM
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
03-16-2011, 08:05 PM
I just want the forum tab at the middle (it's left by default).
But I do not know how to do it :)
Lynne
03-16-2011, 09:27 PM
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
03-16-2011, 09:58 PM
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
03-17-2011, 12:15 AM
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
03-17-2011, 08:04 AM
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
03-17-2011, 07:42 PM
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
03-17-2011, 09:28 PM
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
03-19-2011, 10:26 AM
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
03-19-2011, 11:50 AM
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
03-19-2011, 04:20 PM
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
03-19-2011, 04:35 PM
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
04-02-2011, 05:07 AM
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
04-02-2011, 03:40 PM
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
05-12-2011, 10:43 PM
Thank you for this article! Very helpful and less involved than the first article I read on the subject.
sortega
07-25-2011, 06:33 PM
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
07-25-2011, 10:40 PM
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
07-26-2011, 12:54 PM
THANK YOU, LYNNE! That fixed it, you're wonderful! :)
Buray Savas ANI
09-23-2011, 02:54 PM
This on vbulletin 4.1.6 work or not? i vanto setup but i m not sure. Please send message about this.
christian gate
10-28-2011, 12:01 AM
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
11-22-2011, 03:39 PM
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
11-25-2011, 12:35 PM
this is different from vb4.1.7 and my styles. :(:confused::o
Lynne
11-25-2011, 04:49 PM
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
12-29-2011, 03:22 PM
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
12-29-2011, 04:06 PM
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
01-16-2012, 04:24 AM
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
02-11-2012, 03:42 PM
thanks for the info
djscoop
02-19-2012, 06:25 PM
Tip on removing Members Tab?
MacroPhotoPro
04-03-2012, 02:30 AM
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 (https://vborg.vbsupport.ru/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-03-2012, 11:36 PM
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
11-11-2013, 11:59 PM
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
11-12-2013, 12:12 AM
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.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.