• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • 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.

NavManager

Astrum

Active member
#21
A release isn't too far off actually. I've finished the bug fixes (the ones I know of anyway), implemented the ability to export/import navigation nodes via XML, and have improved the permission system so it pulls from the XenForo user/usergroup permissions settings.

I need to finish the permissions stuff, decide if I want to do the "force subordinate" thing I mentioned earlier, test, and write install code. Hopefully sometime this weekend or next week it'll be done.
 
#22
I'm pretty excited for this. I use a customized style as well, hopefully this'll work without me having to do too many edits to any files, I usually screw that up pretty badly.
 

Forsaken

Well-known member
#23
I'm pretty excited for this. I use a customized style as well, hopefully this'll work without me having to do too many edits to any files, I usually screw that up pretty badly.
I only had to do a few minor edits (removing visitor tab code and adding $tabId into class declaration) and my style works fine with it.
 

onthefly

Active member
#25
Flexile and many of the more customized styles make changes to the navbar and require you to modify the NavManager template.
Yes, make total sense, but what doesnt is this, in the editor, the Insert/Edit Link and the Unlink buttons dont work when the mod is enabled?
 

Forsaken

Well-known member
#26
Yes, make total sense, but what doesnt is this, in the editor, the Insert/Edit Link and the Unlink buttons dont work when the mod is enabled?
They work perfectly fine for me on my test install, and there are only 3 mods installed (LN blog, NavManager, and a custom one).
 

Digital Doctor

Well-known member
#28
It will suffice, although there are things it can't do such as true add-on support where extra public tabs are distributed in the add-on XML. I'll be making a list of suggestions about this to the XenForo team sometime soon.
Make sure you let everyone here know you've made a formal request.
 

Forsaken

Well-known member
#34
Expecting a mod to work with every style that changes the navigation is a bit much. It comes down to the administrator to do the necessary changes for it to work.

Your best bet is to ask Erik to see what will make it work, and do the changes he suggests.
 
#35
Expecting a mod to work with every style that changes the navigation is a bit much. It comes down to the administrator to do the necessary changes for it to work.

Your best bet is to ask Erik to see what will make it work, and do the changes he suggests.
Expecting a mod to work with every style is not a bit too much at all.
I can't think of a single other mod that has performed as poorly as this mod, in my years of installing, editing, and maintaining mods.
Yes, sometimes mods need manual template edits, BUT in this case, that's not even provided without screwing up the system.
It's not on the 'theme designer' to support a mod that isn't handled efficiently. The mod designer is responsible for designing their mod with minimal impact on a theme.
 

Forsaken

Well-known member
#36
Expecting a mod to work with every style is not a bit too much at all.
I can't think of a single other mod that has performed as poorly as this mod, in my years of installing, editing, and maintaining mods.
Yes, sometimes mods need manual template edits, BUT in this case, that's not even provided without screwing up the system.
It's not on the 'theme designer' to support a mod that isn't handled efficiently. The mod designer is responsible for designing their mod with minimal impact on a theme.
Flexile has done major changes to the navigation to make it look the way it is, while this mod requires replacement of the default style template to work.

The reason why I say the designer should help with the support of making it work with there style is because they're the most familiar with what changes they would have to make to get it to work as they did them already with the default style (Which is what this is based off of).

If you can do this modification better (or more efficiently) thats great, but this is the method the OP decided to use after several different methods were tried.
 
#37
Let's look at the facts here, forget the design:
Every other mod in the system works fine with the navbar for every other theme.
Over the past 24 hours, I've had to massively overhaul and import a vB4 system into XF, because of vB's horrific manner of handling attachments in vB4
Have I had any problems with any mods? Only one (this one)
Have I used other mods? Absolutely
Do those mods "alter" the tabs? Absolutely. They add tabs just fine

So , when it comes down to it, the only mod that doesn't work, and is broken, is this one. Even following the author's instructions , failed, causing the site to not even load when their mod was installed.
Is it the theme designer's fault? No. Every other mod works fine, inserts things just dandy.
Is it the mod designer's fault? Absolutely. When every other mod works fine, it's not the theme, or the style, it's the mod itself.
 

Forsaken

Well-known member
#38
Let's look at the facts here, forget the design:
Every other mod in the system works fine with the navbar for every other theme.
Over the past 24 hours, I've had to massively overhaul and import a vB4 system into XF, because of vB's horrific manner of handling attachments in vB4
Have I had any problems with any mods? Only one (this one)
Have I used other mods? Absolutely
Do those mods "alter" the tabs? Absolutely. They add tabs just fine

So , when it comes down to it, the only mod that doesn't work, and is broken, is this one. Even following the author's instructions , failed, causing the site to not even load when their mod was installed.
Is it the theme designer's fault? No. Every other mod works fine, inserts things just dandy.
Is it the mod designer's fault? Absolutely. When every other mod works fine, it's not the theme, or the style, it's the mod itself.
Other modifications add new tabs, they do not replace the existing navigation system to make management of tabs and tablinks more manageable.

I never said it was the designers fault, I just said support for getting this modification to work with styles would be easier by asking the designer, as they're the most familiar with what they've done.

If you do not like the mod, your only other option would be adding tabs via code listeners, modifying the template manually, or hoping someone else fills the need for this same addon.
 

Astrum

Active member
#39
Alright, I'm a bit frazzled because of real life dominating my time but let me respond to some things.

First off, it's not up to Erik to provide support for this plug-in for his style or any other style author, that's a silly notion. I'd be glad to help out anyone make this plug-in work with their style (and there are limitations which I'll get into shortly).

Now, before I go any further let me say that first of all I'm not a web developer. This is the first bit of code I've really written for any web application. Second, and most importantly, I do this in my free time and provide this gratis. So before you jump to conclusions as to why this doesn't work with every style you could just ask me. Third, feel free not to use this plug-in and make your own.

As to the reason why this doesn't work with every style, let's dig into that. There are two templates which control how the navigation bar is displayed, well one really, but the other is important in this case. They are the header and navigation templates.

Now, looking at this we can see a few things. First of all the only xen:hooks within the navigation template are those for the sublinks in Forums, Members, and Help*. There are no xen:hooks anywhere else in this file. This creates a bit of a conundrum since I wanted the navigation bar to be a lot more general (such as the AdminCP navigation bar). I could have made it so you could only insert tabs in the extraTabs.home, extraTabs.middle, and extraTabs.end areas while leaving the Home, Forums, Members, and Help tabs alone while also adding the ability to add subnavigation items under Forums, Members, and Help but with restrictions. Of course this introduces a myriad of edge cases, so I didn't go this route.

So the only other option was to replace the header template to include my custom navigation template which removed these default tabs and replicated them within the navigation tree allowing them to be moved, renamed, reorganized, removed, etc... With this comes the inherent limitation that styles who modify this template will have weird results. Now I suppose I could have modified the template in situ with some incredibly complex regular expressions and hoped, absolutely hoped, that the styles template wasn't so different from the default that this would fail outright leaving no recourse for correction. Obviously I decided against doing this because it's more trouble than it's worth and has some rather dire consequences comparatively.

So my ultimate solution was to, as I've stated, create two new templates. navmanager_header and navmanager_navigation. These are inserted into the master style so that all subsequent styles can modify them to suit their needs. The navmanager_header template is identical to the header template except it includes the navmanager_navigation template rather than the navigation template and doesn't specify the header hook (which would lead to infinite recursion, something I forgot to mention in my initial instructions). I could probably streamline this a bit, but it's a fairly minor point. The navmanager_navigation template is identical to the navigation template except the Home, Forums, Members, and Help tabs (and subtabs) have been removed for the reasons stated above. I'll post the navmanager_header and navmanager_navigation templates in my next post to show how to get this to work with Flexile.

Another gotcha, one which hasn't been mentioned actually, is multi-style support where one style has a vastly different subnavigation structure than the other style. This I'll look into fixing.

In short this plug-in was designed to make creating navigation nodes easy for a site administrator without requiring PHP code, hooks, and possible templates. However, it is fundamentally at odds with the XenForo software. This was meant to be a stopgap piece until XenForo included a way to edit navigation nodes in its core like it already does with AdminCP navigation nodes. There are problems and I am aware of them; I don't know how to fix some of these without modifying XenForo itself which is not something I'm going to do. I'd like to reiterate that I do this in my free time for gratis, so feel free not to use it or develop your own solution if you think you can do better. I'll gladly use yours if it's better than mine.

*This is from XenForo 1.0.0. I haven't had time to update to XenForo 1.0.1 so if there are more hooks that allow me to remove the default tabs then great, I can make things much simpler and make style integration much more seamless. If not, then we're right back here again.
 

Astrum

Active member
#40
I've tried this with Flexile 1.0.0 using XenForo 1.0.0 and it worked fine. I do not have XenForo 1.0.1 (or Flexile 1.0.1) installed so I haven't tested this, however after doing a diff there's almost no difference and it should work fine.

Instructions:
Go to AdminCp->Appearance->Styles
Click on the Templates link for the Flexile theme
In the filter items search bar enter "header"
Click on navmanager_header and replace the entirety of its contents with the following:
Code:
<div id="header">
    <xen:if is="{xen:property showRightContentArea}"><xen:include template="right_content_area" /></xen:if>
    <xen:include template="logo_block" />
    <xen:include template="navmanager_navigation" />
    <xen:if is="{$canSearch}"><xen:include template="search_bar" /></xen:if>
</div>
Go back to the template list
In the filter items search bar enter "navigation"
Click on navmanager_navigation and replace the entirety of its contents with the following:
Code:
<xen:edithint template="navigation.css" />
<div class="secondaryBar"></div>
<div id="navigation" class="pageWidth">
    <div class="pageContent">
        <nav>

<div class="navTabs">
    <ul class="publicTabs">

        <!-- extra tabs: home -->
        <xen:if is="{$extraTabs.home}">
        <xen:foreach loop="$extraTabs.home" key="$extraTabId" value="$extraTab">
            <xen:if is="{$extraTab.linksTemplate}">
                <li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">

                <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                <a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>

                <div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
                    <div class="primaryContent menuHeader">
                        <h3>{$extraTab.title}</h3>
                        <div class="muted">{xen:phrase quick_links}</div>
                    </div>
                    {xen:raw $extraTab.linksTemplate}
                </div>
            </li>
            <xen:else />
                <li class="navTab {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
                    <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                    <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                </li>
            </xen:if>
        </xen:foreach>
        </xen:if>

        <!-- extra tabs -->
        <xen:if is="{$extraTabs.middle}">
        <xen:foreach loop="$extraTabs.middle" key="$extraTabId" value="$extraTab">
            <xen:if is="{$extraTab.linksTemplate}">
                <li class="navTab $extraTabId {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">

                <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                <a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>

                <div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
                    <div class="primaryContent menuHeader">
                        <h3>{$extraTab.title}</h3>
                        <div class="muted">{xen:phrase quick_links}</div>
                    </div>
                    {xen:raw $extraTab.linksTemplate}
                </div>
            </li>
            <xen:else />
                <li class="navTab {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
                    <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                    <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                </li>
            </xen:if>
        </xen:foreach>
        </xen:if>

        <!-- extra tabs: end -->
        <xen:if is="{$extraTabs.end}">
        <xen:foreach loop="$extraTabs.end" key="$extraTabId" value="$extraTab">
            <xen:if is="{$extraTab.linksTemplate}">
                <li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupControl PopupClosed'}">

                <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                <a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>

                <div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'}">
                    <div class="primaryContent menuHeader">
                        <h3>{$extraTab.title}</h3>
                        <div class="muted">{xen:phrase quick_links}</div>
                    </div>
                    {xen:raw $extraTab.linksTemplate}
                </div>
            </li>
            <xen:else />
                <li class="navTab {xen:if $extraTab.selected, 'selected', 'PopupClosed'}">
                    <a href="{$extraTab.href}" class="navLink">{$extraTab.title}</a>
                    <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                </li>
            </xen:if>
        </xen:foreach>
        </xen:if>
 
        <!-- no selection -->
        <xen:if is="!{$selectedTab}">
            <li class="navTab selected"><div class="tabLinks"></div></li>
        </xen:if>

    </ul>
    <!-- navigation_visitor_tab include here -->
    <xen:if is="{$tabs.account.selected}">
    <li class="navTab selected PopupClosed">
        <div class="tabLinks">
            <div class="primaryContent menuHeader">
                <h3>{$tabs.account.title}</h3>
                <div class="muted">{xen:phrase quick_links}</div>
            </div>
            <ul class="secondaryContent blockLinksList">
            <xen:hook name="navigation_tabs_account">
                <li><a href="{xen:link account/personal-details}">{xen:phrase personal_details}</a></li>
                <li><a href="{xen:link conversations}">{xen:phrase personal_conversations}</a></li>
                <li><a href="{xen:link account/news-feed}">{xen:phrase your_news_feed}</a></li>
                <li><a href="{xen:link account/likes}">{xen:phrase likes_received}</a></li>
                <!--<li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li>-->
            </xen:hook>
            </ul>
        </div>
    </li>
    </xen:if>
</div>

<span class="helper"></span>

        </nav>
    </div>
</div>
If you are using the Flexile Dark style then do this in the Flexile parent style and the Flexile Dark (and any color variations) should inherit from this properly. Let me know if there are any issues.