The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[HOW TO - vB4] Create a New Tab in the navbar
Here's a pretty simple method for creating a new tab in the navbar, along with a submenu to go along with it. All you need is a unique condition for when your tab will be shown. What you will be making is a plugin to create the Nav Link along with a submenu which Link 1, Link 2, Link 3, and Drop Down which then drops down and has SubLink 1, SubLink 2, and SubLink 3. This is shown below. NOTE: This is for 4.0.x and 4.1.x. In 4.2.x, you should be using the Navigation Manager. This article is NOT to be used just to add another link to a submenu. It is for creating the Nav Link tab along with all the submenus. Again, if all you want is to add submenus to an existing tab, then this article is NOT for you!!! This article is also for use by users who understand the basics of conditions and can write them. The navbar is not really an easy thing to play with if you don't know what you are doing - I think even Wayne said it had issues - so don't try this if you don't understand how to write a condition. OK, with that out of the way.... Here's the basic template for making your new tab: Create a plugin (Plugins & Products) > Add New Plugin: hook location - process_templates_complete * Title - New Tab for Navbar Execution Order - 5 (* I used to have this listed as global_state_check but then noticed vb themselves use the process_templates_complete hook location, so I changed it.) PHP Code:
PHP Code:
PHP Code:
PHP Code:
ragtek also posted an article to do the same thing only using a template with the plugin - [HOW TO - vB4] Create a New Tab in the navbar (with template) Originally posted on vb.org 2009-10-27. Other related articles of possible interest: [HOW TO - vB4] Remove the vB Default Navtabs [HOW TO - vB4] Create your own vBulletin page |
#532
|
||||
|
||||
Quote:
|
#533
|
|||
|
|||
what I meant by design was say I want to have a dynamic link title. Right now I use straight navigation links in an xml file. I can define options through plugins to plug into urls for the navigation.
What I am needing is a dynamic title. Say for instance take the PM indicator no messages 1 message 2 messages. I am looking to do a title like that on a submenu item. It is no big deal. Based on what I know I am going to have to ditch the straight way of doing links and do more like this thread plugin way that way I have total control over the variables and can define a variable title on a sublink title. I do have one question though on your way of doing things. How to you set show permissions doing a navbar your way. |
#534
|
||||
|
||||
Quote:
As for $show permissions, just do a search on this thread because that has been covered a few times. |
#535
|
|||
|
|||
Can I create a Quick Link to go to a specified custom usergroup? v 4.1.3
|
#536
|
||||
|
||||
How do you create a link to a usergroup? I don't understand exactly what you want at all. If you are talking about a link showing for only a certain usergroup, then that has been covered many times in this thread.
|
#537
|
|||
|
|||
See posts below.
|
#538
|
||||
|
||||
What version of vB are you running?
|
#539
|
|||
|
|||
Ah sorry, 4.1.10
|
#540
|
|||
|
|||
In order to make more than one tab, I'm assuming I have to make separate plugins. If so, how do I go about ordering them if they're all placed at the end? Is it just automatically ordered alphabetically according to the slot they're placed in (i.e. _start, _middle, _end)?
Also, how do I define the subnav I want showing when I navigate to a separate page? For example, I have created the 'Members' tab and one of the subnav items is 'Competitive Rosters - Dota 2' -- if I click that page, the subnav links change to show the Forum subnav (e.g. New Posts, Calendar, Community, Private Messages). See www.parallaxgaming.com. Running 4.1.10 -- not looking to update to newer version. |
#541
|
||||
|
||||
You can add all the tabs to the same plugin and put them in the order you want.
As for making them highlight when you click on them, that is done in the plugin (the $tabselected part - unless you have modified the CSS on your site, then it may not work). |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|