• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Add own Navigation Tabs

  • Thread starter Thread starter ragtek
  • Start date Start date
It's working nice, but to be optimal, it would require a template hook.

Now there will be a second page in the acp for this:)

BUT i'm not sure if i can finish it tomorrow.
 
It can be done by editing core files. Ragtek is making an add-on and it should be released soon, with some hope.

You don't need to edit the XenForo class, just extend the route class and detect when it's the one you want to fiddle with. It sounds like ragtek is doing that but making an admin page to make it user friendly :)
 
What if I'd want to create a new tab that basically contains links to a whole bunch of add-on tabs (Instead of showing the individual tabs, I'd prefer merging them all under a single "tools" tab, to save space on my navigation bar).

At this moment, I have done it manually in the navigation template. However, that gives me two issues:

1) When the tab is selected, it shows on the forums home page.
2) The tabs from the add-ons were created with linkstemplates. In other words, when clicking the tab itself (say, lnblogs), a template is loaded showing additional links below the navigation bar. By using the manual process, I loose these links.

Would I be able to write my own tab, and somehow manage to ensure I do not loose functionality from the combined navtabs?

Thanks.
 
What if I'd want to create a new tab that basically contains links to a whole bunch of add-on tabs (Instead of showing the individual tabs, I'd prefer merging them all under a single "tools" tab, to save space on my navigation bar).

At this moment, I have done it manually in the navigation template. However, that gives me two issues:

1) When the tab is selected, it shows on the forums home page.
2) The tabs from the add-ons were created with linkstemplates. In other words, when clicking the tab itself (say, lnblogs), a template is loaded showing additional links below the navigation bar. By using the manual process, I loose these links.

Would I be able to write my own tab, and somehow manage to ensure I do not loose functionality from the combined navtabs?

Thanks.
IMHO that's tricky BUT POSSIBLE.

You would need to create an event listener at the navigation_tabs event and give it a VERY HIGH execution order to be sure that this code RUNS AS THE LAST!
This code should unset all the positions (or the tabs) and store it in an other "global variable".
As next you would need to create a second plugin, which gets the extratabs, builds a own tab and includes them into this.

BUT
you woun't be able to set the router for this (so you'll have no selected tab on 3rd party pages, if you don't hack around with the router, that's something i'm doing in my page tabs add-on )
and there's a second problem: you won't be able to get the second menu template (navbar123.webp ) from the 3rd party tabs
 
IMHO that's tricky BUT POSSIBLE.

You would need to create an event listener at the navigation_tabs event and give it a VERY HIGH execution order to be sure that this code RUNS AS THE LAST!
This code should unset all the positions (or the tabs) and store it in an other "global variable".
As next you would need to create a second plugin, which gets the extratabs, builds a own tab and includes them into this.

BUT
you woun't be able to set the router for this (so you'll have no selected tab on 3rd party pages, if you don't hack around with the router, that's something i'm doing in my page tabs add-on )
and there's a second problem: you won't be able to get the second menu template (View attachment 15182 ) from the 3rd party tabs

Thanks for taking the time to reply, ragtek. I appreciate it :) I've for now chosen to just disable a few of the tabs. I played around with something like you suggested for a bit, but failed to get things to properly work. Shame, but oh well.
 
Erm, not to be a troll but I'm new to all this and I have no idea what a classfile or a code event listener is and how to create them. Can you please tell me in a noob-friendly way?
 
After searching XF for an answer I landed here, I have looked through this thread and unless I have overlooked something I am unable to find an answer.

I have already implemented a new NavTab for pages and now when trying to implement another separate tab for another set of pages I am having a bit off difficulty.

The new tab I am trying to add just doesn't show no matter what I do, Well thats not really correct as I can get the new tab to show but then the old tab disappears (or vice versa). Basically my problem is showing both tabs at the same time.

If anyone can shed a though on what I am doing wrong it would be much appreciated.

__Edit__
I got it sorted now
 
I want to know if it is at all possible to change the selected tab through a listener added to a page. My brain is imploded due to not being at all familiar with this stuff I think.

e: Think I've got what I need working, using a combination of http://xenforo.com/community/threads/library-set-your-own-route-controller-as-homepage.10156/ and http://xenforo.com/community/threads/assign-pages-to-different-tabs.7006/

Still utterly confused by most of this stuff, and I really need to install an IDE.
 
Top Bottom