Nodes As Tabs

Nodes As Tabs 1.5.1

No permission to download
Added an option for node tab links to open in a new window.

Attachments

Added option to display popup menu links as columns. This allows you to recreate the "JumpMenu" from https://forums.digitalpoint.com/ which is what inspired this feature request.

Screen shot 2013-09-29 at 6.59.48 PM.png

edit - here are detailed instructions to recreate DP's "JumpMenu".

1) Create a node to act as the tab:

Admin CP -> Applications -> Create New Category (or any node type)

[ ] Display in the node list
[*] Display As Tab
Depth Of Child Links = 10 (or high enough to show all of your nodes)
[*] Enable Popup Menu
[*] Popup Links As Columns

2) Set that node as the root node:

Admin CP -> Home -> Nodes As Tabs -> Define Root Node

That's it. Now you have a tab in the navbar that shows your entire node tree grouped by columns. But you may wish to style it to look exactly like DP's menu in which case do the next step.

3) Edit this template:

Admin CP -> Appearance -> Templates -> nat_public_css.css

At the bottom you will find this code. You can remove the red pieces to activate the CSS to make it look like DP's menu:

Rich (BB code):
<xen:comment>
	WITH RESPECT TO COLUMN MENUS, MANY PEOPLE DESIRE TO DUPLICATE
	THE FORUM "JumpMenu" ON https://forums.digitalpoint.com/ .
	BELOW IS SPECIAL CSS TO MAKE YOUR COLUMN MENUS LOOK
	EXACTLY LIKE DIGITALPOINT.
</xen:comment>

<xen:comment>
/* SLIGHTLY SEPARATE PARENT IN EACH COLUMN FROM LINKS UNDER IT */
div.natJSMenuColumns .natMenuLevel0
{
	padding: 5px 5px;
}

/* BOLD AND CHANGE COLOR OF PARENT IN EACH COLUMN */
div.natJSMenuColumns .natMenuLevel0 a
{
	font-weight: bold;
	color: @primaryDarker;
}

/* MAKE LINKS CLOSER TOGETHER TO CONSERVE SPACE */
div.natJSMenuColumns .blockLinksList a
{
	padding: 2px 5px;
}

/* HIDE POPUP HEADER */
div.natJSMenuColumns .menuHeader
{
	display: none;
}
</xen:comment>
1) Added API for other non-default node types to use. In particular, [bd] Widget Framework will be releasing an update that uses this API thereby enabling "Widget Page" nodes to work with this addon. The integration is seamless; if both addons are installed then they will work together automatically.

2) Made it so the unread counter bubbles in this addon obey permissions. The count will now only include unread threads which the user has permission to view.

3) Code change to not use brand new 1.2 functions where they aren't necessary. This will avoid potential errors when using this addon on XenForo 1.2 in conjunction with other older addons that haven't yet been updated to 1.2. Kotomi is an example.
This version is made for XenForo 1.2. You must first upgrade to XenForo 1.2, then upgrade this addon. Your tab settings will be preserved.

1) Added ability to set a root node in the options. This allows you to create a (root) node tab that shows the entire node tree for the popup and secondary links.

2) UI improvements.

3) Code things.
This addon supports tab selection for link-forums. It's a handy feature but I haven't really demonstrated it before.

XenForo 1.2 has removed the Help tab that existed in 1.1 and before. The help pages still exist but they no longer have their own tab. You can recreate that tab as a node using this addon. You would first enable tab selection for link-forums:

Admin CP -> Home -> Nodes As Tabs -> Enable Tab Selection For Link-forums

Then create nodes like this:

Help (link-forum pointing to help/, enable Display As Tab, set Depth Of Child Links to 1, enable Enable Popup Menu, and disable Display in the node list so it doesn't show in the forum list)
-- Smilies (link-forum pointing to help/smilies, child of Help)
-- BB Codes (link-forum pointing to help/bb-codes, child of Help)
-- Trophies (link-forum pointing to help/trophies, child of Help)
-- Cookie Usage (link-forum pointing to help/cookies, child of Help)

The child nodes aren't necessary if you don't want to recreate the secondary links under that tab. And note that if your forum is not using friendly URLs then the link-forum targets need to be changed (e.g. change help/ to index.php?help/).

That's it. You have recreated the Help tab in XenForo 1.2 using link-forums and this addon.

Screen shot 2013-06-25 at 6.18.40 PM.png


Note about 1.2 compatibility:
I haven't yet done thorough testing of this addon with XenForo 1.2, but upon quick testing it appears to work fine and no problems have been reported. I do have an update planned, but in the meantime you can use NodesAsTabs 1.1.4 with XenForo 1.2.
Two new features:

1) Support for multi-level child nodes as secondary links.

2) Support for unread counter bubble which indicates the number of unread threads contained in that tab. This requires XenForo 1.1.4. Also, XenForo 1.1.4 has two bugs that affect this feature:

http://xenforo.com/community/threads/itemcount-in-own-navtabs.48307/
http://xenforo.com/community/threads/active-tab-and-alert-causes-bubble-to-scurry-away.47147/

These will be fixed in XenForo 1.1.5. In the meantime you can manually apply the fixes if you want to use this feature in XenForo 1.1.4. You may also need to revert the navigation template if it is outdated in order to include the latest 1.1.4 changes which are required for this feature.

Screen shot 2013-04-29 at 8.50.15 PM.png

Screen shot 2013-04-29 at 8.50.32 PM.png

Screen shot 2013-04-29 at 8.51.22 PM.png
Screen shot 2013-04-29 at 8.51.55 PM.png


***note that when upgrading there is an expected error on the front-end between the time that you upload the files and import the new XML. This is temporary and expected because a new field was added.
This version adds some new features for more advanced tab management. Current tab configurations are preserved when you upgrade. Everything is the same as before. These new features just add some new possibilities for people wanting to reorganize their navbar.

1) Added option for link-forums to support tab selection through relative URI matching. That means you can use a link-forum to represent any non-node page within your forum and then put it in the navbar using the tab options from this addon.

link-forum.png

It matches the beginning of the location, so a link-forum that links to members/ would pull in all profile pages as well (e.g. members/admin.1/).

2) Added option to manually assign nodes to other tab IDs (i.e. non-node tabs). This has been requested by a few people wanting to add page nodes to tabs for other addons. This feature allows you to do that without editing the files.

Screen shot 2012-07-01 at 4.05.16 AM.png


3) You can use both of these new features together to assign any page to any tab. Enable tab selection for link-forums, create a link-forum to link to the page, and assign that link-forum to a tab ID.

Donations are welcome. Paypal donations can be sent to donate@mscclan.com
1) Added option to set a different name for the tab other than the node title:

Screen shot 2012-04-25 at 1.32.03 AM.png


Note that the addition of this new field means there is an expected but temporary front-end error during the upgrade, between the time that you upload the new files and import the XML in the Admin CP. It's nothing to worry about.

2) Investigated a minor conflict with the Ad Manager addon and determined it to be unfixable pending changes to the default software which I have suggested. The conflict is simply that "Ad Manager" ads which are assigned to specific nodes might not show up if the node is within a node tab (from this addon).
If you are already running 1.1.2a then there is no reason for you to upgrade.

1) Small patch to installer to address this error. Only one person reported this error. It was likely due to a problem with his PHP configuration, but this patch should avoid the possibility of the error happening again.
1) Fixed the inconsequential bug. I found a solution that isn't a template hack.
Top