Nodes As Tabs

Nodes As Tabs 1.5.1

No permission to download
Jake,
I updated to the latest version and applied the templates changes to navigation template and I still have the count bubble scurry away at the far right. I'm using Flexile.
NOTE: I enable the unread count for only one Forum link Nodetab and if the other tabs are active (Home, Forum, wiki, etc), the bubble shows correctly on the intended Nodetab. But as soon as I click on that nodetab, the bubble count will move to the far right.

Here is the navigation template http://pastebin.com/eqn1fPDH

View attachment 45439

View attachment 45440

I may be wrong here but i think Mike applied the fix for that issue and it will be appearing in the next update. I could be wrong though but I'm sure i read something that had to be fixed regarding that issue.
 
I may be wrong here but i think Mike applied the fix for that issue and it will be appearing in the next update. I could be wrong though but I'm sure i read something that had to be fixed regarding that issue.
Yes Shelley.
According to Jake, the fixes are not in 1.1.4 but will be in 1.1.5 so we will have to apply them manually right now.
Today is Tues so who knows, maybe we get 1.1.5 :)
 
Yes Shelley.
According to Jake, the fixes are not in 1.1.4 but will be in 1.1.5 so we will have to apply them manually right now.
Today is Tues so who knows, maybe we get 1.1.5 :)

haha Yeah I was predicting an update comes today. Fingers crossed. :)
 
Jake,
I updated to the latest version and applied the templates changes to navigation template and I still have the count bubble scurry away at the far right. I'm using Flexile.
NOTE: I enable the unread count for only one Forum link Nodetab and if the other tabs are active (Home, Forum, wiki, etc), the bubble shows correctly on the intended Nodetab. But as soon as I click on that nodetab, the bubble count will move to the far right.

Here is the navigation template http://pastebin.com/eqn1fPDH

View attachment 45439

View attachment 45440

http://xenforo.com/community/resources/nodes-as-tabs.9/update?update=3916
> http://xenforo.com/community/threads/active-tab-and-alert-causes-bubble-to-scurry-away.47147/

See the posts from Mike and I. You need some CSS and another navigation edit.
 
Another week :(

:) That's okay. Ever since DP created the thread for Item count support I've been eagerly awaiting for it to be included and then add-on support. 1-2-3 weeks for me isn't much of a wait. More waiting is required. *said in a gandalf type voice* :D
 
I think I'll wait for 1.1.5 I don't want to make any template edits. However I upgraded Node as Tabs so excellent work Jake ready for 1.1.5.

What I did on my dev forum is apply the fixes directly to the master templates which will be overwritten during the upgrade to 1.1.5. That way the manual fix is automatically replaced by the proper fix later. This works as long as those templates aren't also customized in your regular style (which would override the master).

I edited navigation and navigation.css in the master style. Here are the complete templates if you want to copy/paste into your master style (requires debug mode):

navigation

Code:
<xen:edithint template="navigation.css" />

<div id="navigation" class="pageWidth">
	<div class="pageContent">
		<nav>

<div class="navTabs">
	<ul class="publicTabs">
	
		<!-- home -->
		<xen:if is="{$showHomeLink}">
			<li class="navTab home PopupClosed"><a href="{$homeLink}" class="navLink">{xen:phrase home}</a></li>
		</xen:if>
		
		
		<!-- 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}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
				<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} {$extraTabId}TabLinks">
					<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 {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupClosed'}">
					<a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
					<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
				</li>
			</xen:if>
		</xen:foreach>
		</xen:if>
		
		
		<!-- forums -->
		<xen:if is="{$tabs.forums}">
			<li class="navTab forums {xen:if $tabs.forums.selected, 'selected', 'Popup PopupControl PopupClosed'}">
			
				<a href="{$tabs.forums.href}" class="navLink">{$tabs.forums.title}</a>
				<a href="{$tabs.forums.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$tabs.forums.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} forumsTabLinks">
					<div class="primaryContent menuHeader">
						<h3>{$tabs.forums.title}</h3>
						<div class="muted">{xen:phrase quick_links}</div>
					</div>
					<ul class="secondaryContent blockLinksList">
					<xen:hook name="navigation_tabs_forums">
						<xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'forums/-/mark-read', $forum, 'date={$serverTime}'}" class="OverlayTrigger">{xen:phrase mark_forums_read}</a></li></xen:if>
						<xen:if is="{$canSearch}"><li><a href="{xen:link search, '', 'type=post'}">{xen:phrase search_forums}</a></li></xen:if>
						<xen:if is="{$visitor.user_id}"><li><a href="{xen:link 'watched/threads'}">{xen:phrase watched_threads}</a></li></xen:if>
						<li><a href="{xen:link 'find-new/threads'}" rel="nofollow">{xen:phrase whats_new}</a></li>
					</xen:hook>
					</ul>
				</div>
			</li>
		</xen:if>
		
		
		<!-- extra tabs: middle -->
		<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}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
				<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} {$extraTabId}TabLinks">
					<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 {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupClosed'}">
					<a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
					<xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
				</li>
			</xen:if>
		</xen:foreach>
		</xen:if>
		
		
		<!-- members -->
		<xen:if is="{$tabs.members}">
			<li class="navTab members {xen:if $tabs.members.selected, 'selected', 'Popup PopupControl PopupClosed'}">
			
				<a href="{$tabs.members.href}" class="navLink">{$tabs.members.title}</a>
				<a href="{$tabs.members.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$tabs.members.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} membersTabLinks">
					<div class="primaryContent menuHeader">
						<h3>{$tabs.members.title}</h3>
						<div class="muted">{xen:phrase quick_links}</div>
					</div>
					<ul class="secondaryContent blockLinksList">
					<xen:hook name="navigation_tabs_members">
						<li><a href="{xen:link members}">{xen:phrase registered_members}</a></li>
						<li><a href="{xen:link online}">{xen:phrase current_visitors}</a></li>
						<xen:if is="{$xenOptions.enableNewsFeed}"><li><a href="{xen:link recent-activity}">{xen:phrase recent_activity}</a></li></xen:if>
					</xen:hook>
					</ul>
				</div>
			</li>
		</xen:if>		
		
		<!-- help -->
		<xen:if is="{$tabs.help}">
			<li class="navTab help {xen:if $tabs.help.selected, 'selected', 'Popup PopupControl PopupClosed'}">
			
				<a href="{$tabs.help.href}" class="navLink" rel="help">{$tabs.help.title}</a>
				<a href="{$tabs.help.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$tabs.help.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} helpTabLinks">
					<div class="primaryContent menuHeader">
						<h3>{$tabs.help.title}</h3>
						<div class="muted">{xen:phrase quick_links}</div>
					</div>
					<ul class="secondaryContent blockLinksList">
					<xen:hook name="navigation_tabs_help">
						<li><a href="{xen:link help/smilies}">{xen:phrase smilies}</a></li>
						<li><a href="{xen:link help/bb-codes}">{xen:phrase bb_codes}</a></li>
						<li><a href="{xen:link help/trophies}">{xen:phrase trophies}</a></li>
						<li><a href="{xen:link help/cookies}">{xen:phrase cookie_usage}</a></li>
					</xen:hook>
					</ul>
				</div>
			</li>
		</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}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></a>
				<a href="{$extraTab.href}" class="SplitCtrl" rel="Menu"></a>
				
				<div class="{xen:if {$extraTab.selected}, 'tabLinks', 'Menu JsOnly tabMenu'} {$extraTabId}TabLinks">
					<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 {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupClosed'}">
					<a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter}</span><span class="arrow"></span></strong></xen:if></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>
	
	<xen:if is="{$visitor.user_id}"><xen:include template="navigation_visitor_tab" /></xen:if>
</div>

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

navigation.css

Just add this to the very top:

Code:
.navTabs .selected .navLink { position: relative; }
 
What I did on my dev forum is apply the fixes directly to the master templates which will be overwritten during the upgrade to 1.1.5. That way the manual fix is automatically replaced by the proper fix later. This works as long as those templates aren't also customized in your regular style (which would override the master).

I edited navigation and navigation.css in the master style. Here are the complete templates if you want to copy/paste into your master style (requires debug mode):

navigation

Code:
<snip>

navigation.css

Just add this to the very top:

Code:
.navTabs .selected .navLink { position: relative; }

And this is why Node as Tabs is imo <insert Shelley phrase here> that xf houses. Thanks again Jake :)

nodeastabs.webp


Hmmm I wonder if the following would work. *goes and tries*
 
I like it. That is just a navigation edit I assume. Such an edit would affect all "extraTabs" (tabs from addons) that use the counter bubble though. So it's not a generic solution but it works if you have no other such addons.

Yeah, just added some text in the navigation template. I ended up just editing the one style navigation with the updated code since (I just couldn't wait) :D And since I made no edits in the template, I figured it's easy enough to revert when the 1.1.5 update comes.

I ended up adding the CSS you provided in EXTRA but been playing with it further (add-on is brilliant) and I used the ID to specifically position the arrow and increased the text site. Having fun with it atm :p

Edit: Yeah that was a bit of a concern it appearing in all tabs but I don't think I'll be wanting anymore item counts on anything. I thought I did for the RM but not so sure now since I adapted my sidebar custom block latest resources to pull the latest threads from the RM so all in all working out well.

take-2-nat.webp
 
Hope you don't mind Jake but just in case anyone else wants to do the same.

If you've applied the template change Jake added in the latest update your able to add your custom text. Mine is "New Posts" you may want yours differently simply find the following and add yours where I added "New Posts".

Code:
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupClosed'}">
                    <a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter} New Posts</span><span class="arrow"></span></strong></xen:if></a>
                    <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                </li>
            </xen:if>
        </xen:foreach>
        </xen:if>

To adjust the arrow because chances are you may want it entered, and it won't be, but you'll have to adjust it to your ID where my tab is .nodetab10 yours will differ. Plus you'll have to adjust the position of the arrow where mine is 32px yours will also differ, adjust that accordingly and this part goes in EXTRA.CSS

Code:
.navTabs .nodetab10 .itemCount .arrow {right: 32px;}
 
Hi Jake! You have several similar controller classes where you extend _postDispatch. Since 1.1.3 XF has event controller_post_dispatch which could reduce repeating code.

Thanks. I was unaware of that. I will take a look and incorporate that into the next update.
 
Hope you don't mind Jake but just in case anyone else wants to do the same.

If you've applied the template change Jake added in the latest update your able to add your custom text. Mine is "New Posts" you may want yours differently simply find the following and add yours where I added "New Posts".

Code:
<li class="navTab {$extraTabId} {xen:if $extraTab.selected, 'selected', 'Popup PopupClosed'}">
                    <a href="{$extraTab.href}" class="navLink">{$extraTab.title}<xen:if is="{$extraTab.counter}"><strong class="itemCount"><span class="Total">{$extraTab.counter} New Posts</span><span class="arrow"></span></strong></xen:if></a>
                    <xen:if is="{$extraTab.selected}"><div class="tabLinks"></div></xen:if>
                </li>
            </xen:if>
        </xen:foreach>
        </xen:if>

To adjust the arrow because chances are you may want it entered, and it won't be, but you'll have to adjust it to your ID where my tab is .nodetab10 yours will differ. Plus you'll have to adjust the position of the arrow where mine is 32px yours will also differ, adjust that accordingly and this part goes in EXTRA.CSS

Code:
.navTabs .nodetab10 .itemCount .arrow {right: 32px;}
Shelley
I like to add an Alert that stays permanently that says New on a specific tab that links to a XF page. Do you think this instruction is applicable?
 
I need some more demo links of forums that are using this addon. Many of the current demo links have gone stale. Please post a link to your node tab if you want to be listed.
 
Top Bottom