Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #46  
Old 23 May 2012, 21:49
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by odln018 View Post
I added forum.php to a Special Access tab, but it still highlights the forum tab.
You will need to turn on the append tabid option for that tab.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #47  
Old 23 May 2012, 21:57
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by Paul M View Post
You will need to turn on the append tabid option for that tab.
Or add to Tab Script(s) setting. That was all I have to do to get the tab to highlight.
Reply With Quote
  #48  
Old 23 May 2012, 23:45
vbresults vbresults is offline
 
Join Date: Apr 2009
I wonder if I won't need http://www.vbulletin.org/forum/showthread.php?t=271740 anymore :O
Reply With Quote
  #49  
Old 23 May 2012, 23:53
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Nope, with Andreas' add-on you can now do drop-down links with tabs.
Reply With Quote
  #50  
Old 24 May 2012, 01:49
AusPhotography's Avatar
AusPhotography AusPhotography is offline
 
Join Date: Nov 2007
Real name: Rick-owner, Kym-admin
Originally Posted by Boofo View Post
What hooks do we use then if we want to add our own sublinb menu? I have one that uses the vb:each to get the post days for searching and I can't use the navigation manager to add that sub-menu.
Please see:
http://www.vbulletin.org/forum/showthread.php?t=283146
and
https://www.vbulletin.com/forum/show...t-Tab-in-4-2-0

The way I'm ding it is via a <navigation> section of my product files and only setting $show variables to control their display.
__________________
www.AusPhotography.net.au a.k.a. AP is a photography forum where members share their photography, photo editing skills and techniques. We run regular photographic competitions; Rick (site owner) and Kym (site tech) using this account
*** Home of the AP fully comprehensive vb4 photographic competition management solution ***
Reply With Quote
  #51  
Old 24 May 2012, 12:44
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by snoopytas View Post
Please see:
http://www.vbulletin.org/forum/showthread.php?t=283146
and
https://www.vbulletin.com/forum/show...t-Tab-in-4-2-0

The way I'm doing it is via a <navigation> section of my product files and only setting $show variables to control their display.
The Navigation Manager won't accept variables, though, and that is the issue I am having. I have a Search Posts sub-link menu that uses a setting to get the days.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

I then use vb:each in the template to have it build the menu with the days links:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

You can't do that in the Navigation Manager so I need to be able to add that sub-link where the New Posts link (below the navtabs) is now. Without the template hooks, I'm screwed.
Reply With Quote
  #52  
Old 24 May 2012, 15:01
nhawk nhawk is offline
 
Join Date: Jan 2011
Originally Posted by Boofo View Post
The Navigation Manager won't accept variables, though, and that is the issue I am having. I have a Search Posts sub-link menu that uses a setting to get the days.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

I then use vb:each in the template to have it build the menu with the days links:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

You can't do that in the Navigation Manager so I need to be able to add that sub-link where the New Posts link (below the navtabs) is now. Without the template hooks, I'm screwed.
Like this?



1) Add a menu to the forum tab.
2) Add links to the menu.

In the example shown I didn't disable the original New Posts link.. you might want to do that too.

You can do this manually, in the install file for your mod, in a php file, in a plugin using the database, or I'm pretty sure dynamically in a plugin.

I'm using the database method for items that don't change frequently. The best place I've found for something that comes from a settings page is to use the admin_options_processing hook and add/modify the navigation items in the database.

Last edited by nhawk; 24 May 2012 at 15:49.
Reply With Quote
  #53  
Old 24 May 2012, 17:36
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Yes, it is looks that but I use vb:each to get each link from the settings. I don't add them one by one. This is what I use in the template (wrapped in a vb:each) to get it to make the menu:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #54  
Old 24 May 2012, 18:34
nhawk nhawk is offline
 
Join Date: Jan 2011
Originally Posted by Boofo View Post
Yes, it is looks that but I use vb:each to get each link from the settings. I don't add them one by one. This is what I use in the template (wrapped in a vb:each) to get it to make the menu:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
Since the settings are where the number of days are contained, get the template out of your head. It's not needed anymore.

Put the links in the navigation table and the phrases for those links in the phrase table via the admin_options_processing hook once and you're done.

The only time they would need to be updated is if the settings change and then you just update them via the same hook.
Reply With Quote
  #55  
Old 24 May 2012, 18:45
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
Originally Posted by Boofo View Post
The Navigation Manager won't accept variables, though, and that is the issue I am having. I have a Search Posts sub-link menu that uses a setting to get the days.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

I then use vb:each in the template to have it build the menu with the days links:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

etc...

You can't do that in the Navigation Manager so I need to be able to add that sub-link where the New Posts link (below the navtabs) is now. Without the template hooks, I'm screwed.
Try This Method

Hook: navigation_tab_complete


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #56  
Old 24 May 2012, 19:00
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Yes, that worked., although it throws it as the end of the links instead of at the beginning where it needs to be. Plus I has more items in the menu too, but this is close.
Reply With Quote
  #57  
Old 24 May 2012, 19:05
nhawk nhawk is offline
 
Join Date: Jan 2011
I'm really curious why people are so resistant to putting their navigation items in the database. It's easy to do and it only needs to be done once (or any time there's a change in the settings). And then the menu is handled by vB without the use of a plugin.
Reply With Quote
  #58  
Old 24 May 2012, 19:07
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
Originally Posted by Boofo View Post
Yes, that worked., although it throws it as the end of the links instead of at the beginning where it needs to be. Plus I has more items in the menu too, but this is close.
use array_slice, array_merge to adjust position
Reply With Quote
  #59  
Old 24 May 2012, 19:09
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Originally Posted by nhawk View Post
I'm really curious why people are so resistant to putting their navigation items in the database. It's easy to do and it only needs to be done once (or any time there's a change in the settings). And then the menu is handled by vB without the use of a plugin.
Because why make unnecessary queries when you don't have to?
Reply With Quote
  #60  
Old 24 May 2012, 19:11
nhawk nhawk is offline
 
Join Date: Jan 2011
Originally Posted by Boofo View Post
Because why make unnecessary queries when you don't have to?
The only query you're making is when you add to the database when you save settings. The rest is already done by vB.
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Administrative and Maintenance Tools Navigation Manager Enhancements Andreas vBulletin 4.x Add-ons 337 03 Jan 2018 15:58



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 14:51.

Layout Options | Width: Wide Color: