![]() |
|
Article Options |
#76
|
|||
|
|||
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. No members have liked this post.
|
#77
|
|||
|
|||
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. No members have liked this post.
|
#78
|
||||
|
||||
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
No members have liked this post.
|
#79
|
||||
|
||||
You need to add this at the very top:
And try the navigation_tab_complete hook instead. No members have liked this post.
|
#80
|
||||||||
|
||||||||
Originally Posted by Boofo
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 :
No members have liked this post.
|
#81
|
||||
|
||||
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! No members have liked this post.
|
#82
|
||||
|
||||
Try commenting out the $result line at the bottom. I don't know if that will work in that hook.
No members have liked this post.
|
#83
|
||||
|
||||
Originally Posted by Boofo
I don't really know what did u expect but of course this code with $result = commented, do nothing :![]()
(tested in build_navigation_array and navigation_tab_complete, with and without the comment) No members have liked this post.
|
#84
|
||||||||
|
||||||||
Originally Posted by Altari
Try This Code![]()
Hook: build_navigation_array Code:
You can replace vbulletin with your product id but make sure that product is enabled otherwise link will not be shown. No members have liked this post.
|
#85
|
||||
|
||||
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....
The following members like this post: TheLastSuperman
|
#86
|
||||
|
||||
What hook do they run it in?
No members have liked this post.
|
#87
|
||||
|
||||
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 :
No members have liked this post.
|
#88
|
||||
|
||||
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.
![]() 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. No members have liked this post.
Last edited by nhawk; 29 May 2012 at 21:40. |
#89
|
||||
|
||||
Originally Posted by Altari
Try this code![]()
compare it with your code, you will know why it was not working earlier. The following members like this post: Altari
|
#90
|
|||
|
|||
Awww that works perfectly, thank you !
For guys who read : Add an id... No members have liked this post.
|
![]() |
![]() |
||||
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 |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 03:58.