Implemented Advanced Navigation Tabs and Sub-Tabs

This suggestion has been implemented. Votes are no longer accepted.
It would be great, if we would have a REAL:p navbar manager.

Instead of the navigation_tabs event listener + template hooks, i would suggest a own class, which handles the tabs + submenues.....

On an default install you would have something like:
Code:
TabId, Name, Position, ParentId , addon_id, callback_class
1      Forums  1            0          xenforo    
2    Members 10            0          xenforo     XenForo_Navbar::checkMembersTabPerm
3    Help        20            0          xenforo
4    Mark Forums Read  1  1
5    Search Forums      10  1
..
10 Registered Members  10  2                     
..
19  Addon Foo      10  0          ragtek_foo  Ragtek_Foo_Navi::checkPerm

With a system like this, we could have a "real navigation manager interface" where we could sort (drag and drop;) ) the Menu Entries

And Add-ons could add there own entries just like it works already with the admin navigation :)

ATM it's really horrible to do this stuff (John Doe is also not really able to move the tabs how he wants... and if you want to hide a tab, you need to edit extra.css and hide it via css (what's IMO A HORRIBLE WAY) or unset it from the navtabs array with an own add-on..)
 
Even though this thread is nearly 3 1/2 years old, I am going to add my +1 to it.

We need a better way to deal with the navigation menus.

Right now I would like to re-arrange my navigation menu but can't because one of the items I want to move is inside of one of the "extra tab" areas, so I have no way of moving it.

A simple, Wordpress style menu handler would be nice...or anything other than what's available now for that matter.

I'd even pay for a third-party plugin like ProMenu (IPB).

But the system in use now is antiquated.
 
Bryan extratabs areas as you call them are where all plugins insert tabs. You have the first area which i forget them middle and end. The order is controlled by the execution order of the calls to extratabs.

As Xenforo currently is even with a Nav Manager you still have the problem. The nav managers execution order still determines how far down first middle and end the tabs placed by it appear. In nodes as tabs he ran a very high execution order so that if you put a tab on middle it's garunteed to be the last tab in middle or end last tab on end. Within the nav manager plugin you can sort your tabs but not against the position of other plugins.

What you can do for now is adjust the execution order of that plugins call. Very simple edit can even change to one of the three positions. I believe in debug u can change the execurion order without editing files but unless the plugin supports moving itself that's a direct edit to the listener making the call.

I am in the middle of making my own nav manager and that's what I have observed. Until it's a core function your kinda stuck to the above I believe.
 
The way my navigation is currently set up now is: Home | Reviews | Forums | Gallery | Events | Chat | Members

The way I would like to set it up is: Home | Reviews | Gallery | Forums | Events | Chat | Members

However, because the Gallery, Events and Chat are addons, the only place I can put Reviews is where it is now or after Chat on the current menu (and I can't even move Forums) due to the fact that Xenforo uses an if/then statement to pull the addon menus.
 
The way my navigation is currently set up now is: Home | Reviews | Forums | Gallery | Events | Chat | Members

The way I would like to set it up is: Home | Reviews | Gallery | Forums | Events | Chat | Members

However, because the Gallery, Events and Chat are addons, the only place I can put Reviews is where it is now or after Chat on the current menu (and I can't even move Forums) due to the fact that Xenforo uses an if/then statement to pull the addon menus.

It's doable, a mixtween between putting it into dev mode changing the listener order on the nav tabs, and possibly moving around the navigation template a little. It's a pain in ways :(
 
The way my navigation is currently set up now is: Home | Reviews | Forums | Gallery | Events | Chat | Members

The way I would like to set it up is: Home | Reviews | Gallery | Forums | Events | Chat | Members

However, because the Gallery, Events and Chat are addons, the only place I can put Reviews is where it is now or after Chat on the current menu (and I can't even move Forums) due to the fact that Xenforo uses an if/then statement to pull the addon menus.

Members being on the end is easy and if you don't mind spending a couple of minutes getting your hands dirty the entire order you want can be done.. Members appears after all tabs inserted into the middle position.

All plugins insert tabs like this:
Code:
            $extraTabs['exampletab'] = array(
                'title' => new XenForo_Phrase(''),
                'href' => '',
                'position' => 'middle',
            );
Editing the position in the listener will determine which of the primary positions it will appear.

The xml file that installs the plugin has an execution order for this very call.
Code:
<listener event_id="navigation_tabs" execute_order="10" callback_class="My_Example_Listener" callback_method="navigationTabs" active="1" hint="" description=""/>
The execution order determines when this is called to insert the tab and there for which tab it appears in front or behind of its particular section (home middle end).

Most of your plugins probably use end, if you change their listener to middle they will appear before members. If the plugin author gives you the option between the three positions you would also be able to roughly move it to a different position.

It is possible for any plugin to dynamically change their position to home middle or end. They just can't sort themselves in the scope of those 3. Thats the execution order which is edited in debug mode.

Moving Forums is a different story its more of a template edit. For your scenario move Members to the end section, Forum to the position members was in. Events and Chat's listeners need to be set to end and have Gallery set to Middle which will appear in front of forums if moved to the current position of members.

Xenforo uses an if then to populate the html for output based on what was already inserted into variables via code. Xenforo doesn't use an if then to determine order. The order was already determined by the time it comes to template statements. You can physically move forums in the template and it should appear where you put it. Which I recommend as the current position of members that way all middle tabs will appear ahead of it.
 
Members being on the end is easy and if you don't mind spending a couple of minutes getting your hands dirty the entire order you want can be done.. Members appears after all tabs inserted into the middle position.

All plugins insert tabs like this:
Code:
            $extraTabs['exampletab'] = array(
                'title' => new XenForo_Phrase(''),
                'href' => '',
                'position' => 'middle',
            );
Editing the position in the listener will determine which of the primary positions it will appear.

The xml file that installs the plugin has an execution order for this very call.
Code:
<listener event_id="navigation_tabs" execute_order="10" callback_class="My_Example_Listener" callback_method="navigationTabs" active="1" hint="" description=""/>
The execution order determines when this is called to insert the tab and there for which tab it appears in front or behind of its particular section (home middle end).

Most of your plugins probably use end, if you change their listener to middle they will appear before members. If the plugin author gives you the option between the three positions you would also be able to roughly move it to a different position.

It is possible for any plugin to dynamically change their position to home middle or end. They just can't sort themselves in the scope of those 3. Thats the execution order which is edited in debug mode.

Moving Forums is a different story its more of a template edit. For your scenario move Members to the end section, Forum to the position members was in. Events and Chat's listeners need to be set to end and have Gallery set to Middle which will appear in front of forums if moved to the current position of members.

Xenforo uses an if then to populate the html for output based on what was already inserted into variables via code. Xenforo doesn't use an if then to determine order. The order was already determined by the time it comes to template statements. You can physically move forums in the template and it should appear where you put it. Which I recommend as the current position of members that way all middle tabs will appear ahead of it.

Or you could edit the navigation template and move members to the end :)
 
Top Bottom