Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
  #76  
Old 29 May 2012, 05:33
Lionel Lionel is offline
 
Join Date: Dec 2001
Real name: Lionel
I found it to be much easier to use old system but at navtab_start and navtab_end.
then at navigation_tab_complete I empty $tabid for THIS_SCRIPT. This way I can keep all my dynamic navigations.
Reply With Quote
  #77  
Old 29 May 2012, 12:25
nhawk nhawk is offline
 
Join Date: Jan 2011
A word about using the built in Navigation Manager...

If you use it as built in vB 4.2.0, add navtabs, menus or links and then delete them, the phrases used by those items are left behind in the phrase table.

Evidently it was designed to leave unused data in the database...

http://tracker.vbulletin.com/browse/VBIV-15177

Unfortunately, for some reason I don't have the option to petition to reopen that bug.
Reply With Quote
  #78  
Old 29 May 2012, 16:20
Altari Altari is offline
 
Join Date: Sep 2011
Hello,

I try to add 3 links in the Quick Links menu, but that doesn't work : Sometimes nothing is shown, sometime only the last link is shown... i don't really why, maybe someone could help me ?

Here is the code i'm using (tried to do it from Paul's blog) in build_navigation_array hook


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

Reply With Quote
  #79  
Old 29 May 2012, 16:56
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
You need to add this at the very top:


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


And try the navigation_tab_complete hook instead.
Reply With Quote
  #80  
Old 29 May 2012, 18:16
Altari Altari is offline
 
Join Date: Sep 2011
Originally Posted by Boofo View Post
You need to add this at the very top:


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


And try the navigation_tab_complete hook instead.
Hello,

Thank you for your help,
But this doesn't work better : I added the global show and change template hook, but nothing happen. I use VBOptimise(?), but i flushed the cache, cleared system cache etc... Nothing works like that

Anyway, i'm just trying to add this to start, and it doesn't work :

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

Reply With Quote
  #81  
Old 29 May 2012, 18:44
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
Very good discussion and imo the first post and info that follows by everyone else makes this worthy of being a Article! I moved this thread here to the articles forum, there is a 7 day redirect link in programming discussions and normally I don't do redirects but just in case some look there first in the next few days .
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!
Reply With Quote
  #82  
Old 29 May 2012, 18:48
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
Try commenting out the $result line at the bottom. I don't know if that will work in that hook.
Reply With Quote
  #83  
Old 29 May 2012, 19:36
Altari Altari is offline
 
Join Date: Sep 2011
Originally Posted by Boofo View Post
Try commenting out the $result line at the bottom. I don't know if that will work in that hook.
I don't really know what did u expect but of course this code with $result = commented, do nothing :

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

(tested in build_navigation_array and navigation_tab_complete, with and without the comment)
Reply With Quote
  #84  
Old 29 May 2012, 19:48
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
Originally Posted by Altari View Post
Hello,

Thank you for your help,
But this doesn't work better : I added the global show and change template hook, but nothing happen. I use VBOptimise(?), but i flushed the cache, cleared system cache etc... Nothing works like that

Anyway, i'm just trying to add this to start, and it doesn't work :

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

Hook: build_navigation_array
Code:


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

You can replace vbulletin with your product id but make sure that product is enabled otherwise link will not be shown.
Reply With Quote
  #85  
Old 29 May 2012, 20:36
nhawk nhawk is offline
 
Join Date: Jan 2011
A while back I commented about using the database method for adding things to the navigation menu and nobody has shown how to do that.

So, here's my method broken out and heavily commented so it's easy to understand....


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

Reply With Quote
  #86  
Old 29 May 2012, 20:47
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Real name: Rob
What hook do they run it in?
Reply With Quote
  #87  
Old 29 May 2012, 20:54
Altari Altari is offline
 
Join Date: Sep 2011
Originally Posted by Badshah93 View Post
Try This Code
...
Hello,

Thank you for your help.
You code works, but only for one link. When i want to add more than 1 link, only the last is displayed.
Tested with this code :

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

Reply With Quote
  #88  
Old 29 May 2012, 20:57
nhawk nhawk is offline
 
Join Date: Jan 2011
Originally Posted by Boofo View Post
What hook do they run it in?
It can be run anywhere, in PHP code, or any other hook they want.

I use it in both PHP code for dynamic menus added by an admin from inside a mod and in the admin_options_processing_build hook for adding menus defined by the settings group for a mod.

If you use it in the admin_options_processing_build hook, add a !$settings['dummyvar'] condition at the beginning of the code and set $settings['dummyvar'] to 1 at the end of the code so it only runs once when the settings are updated.

Of course the variables would have to be gotten from the $settings['xyz'] values from the mod settings and/or some hard coded into the plugin.

EDIT: The advantage to using the database for menu items is there aren't any plugins required once the menu is created. vB itself will generate them for you at the proper time. That should be a BIG HINT for the discussion above and below this post that's revolving around a plugin to create a menu that on the surface appears to be a fixed menu that can accept variables (ie: {userinfo.userid} ). Create it once in settings or some other method and forget about it until it needs to change. Which I don't see that happening very often.


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



I do not suggest the database method for navigation items where the displayed text for the navigation item changes frequently (the name of the item ie: Forum or What's New) or where the link is not a fixed link with variables.

Last edited by nhawk; 29 May 2012 at 21:40.
Reply With Quote
  #89  
Old 29 May 2012, 21:05
Badshah93's Avatar
Badshah93 Badshah93 is offline
 
Join Date: Jun 2010
Real name: Aayush Agrawal
Originally Posted by Altari View Post
Hello,

Thank you for your help.
You code works, but only for one link. When i want to add more than 1 link, only the last is displayed.
Try this code


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

compare it with your code, you will know why it was not working earlier.
Reply With Quote
  #90  
Old 29 May 2012, 21:42
Altari Altari is offline
 
Join Date: Sep 2011
Originally Posted by Badshah93 View Post
...
Awww that works perfectly, thank you !
For guys who read : Add an id...
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 16: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 23:04.

Layout Options | Width: Wide Color: