![]() |
|
Article Options |
#16
|
||||||||||||
|
||||||||||||
OK, but I ran this modified version of the benchmark:
and I got these results:
vs. these for the original version:
That's 6.5 times slower vs 134 times slower, and seems to indicate that eval() isn't the main offender. The following members like this post: AusPhotography
|
#17
|
||||
|
||||
It's basically the overhead required for variable registration and object creation that makes rending templates in a loop pretty slow.
No members have liked this post.
|
#18
|
|||
|
|||
Yeah, I played around more and found that my times dropped from 1.5 to 0.7 just by not calling register_globals().
No members have liked this post.
|
#19
|
||||
|
||||
Originally Posted by Andreas
But if it's not a static link? I'm supposed to tell user's to do it themselves now because vBulletin thinks they want more control over their navbar? Respectfully, most user's do not want total control, they want things done for them.![]()
I've come up with this code, it's not efficient but it works, I will work on efficiency- nhawk I know you mentioned making a database change but I prefer to avoid db edits if possible. This example adds a link to Quick Links No phrase needed. On navigation_tab_complete hook:
Mind you that needs to be run for each new link which itself will likely be some kind of loop.
__________________
-Joe Former vb.org Moderator. Retired. @BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic Note - I no longer making new VB mods, sorry. The following members like this post: Hippy
|
#20
|
||||
|
||||
That is a problem
![]() I do not know the exact ideas behind Navigation Manager , but I think it simply wasn't designed with dynamic links in mind as vBulletin itself (except vBulletin CMS) does not do that. As I see it, there are currently three alternatives (of which none is realldy ideal):
IMHO the best solution would be if the Navigation Manager would offer "Dynamic Content" items which would just act as placeholders in ACP and are only being filled with content on the frontend when needed. This would be easy to implement and maintain for Add-ons and would still give the Administrator the power to control placement, etc. http://tracker.vbulletin.com/browse/VBIV-15123 No members have liked this post.
|
#21
|
||||
|
||||
Originally Posted by BirdOPrey5
I thought of doing it that way, an actually had it done that way. But then there's no control by the admin as to where it goes (as pointed out by Andreas) and I changed to the DB write.![]()
The advantage of doing it in the DB is the admin can move it around to any menu once it's created. After working with it a bit, I found management really isn't difficult. It's only a couple of DB writes at application type creation (in my mod) and then I'm done with it. No need to parse out a special template or anything else in vB 4.2. And the nice thing is that when the product is uninstalled, the navigation and phrase info gets deleted like it should. No members have liked this post.
Last edited by nhawk; 20 May 2012 at 17:29. |
#22
|
||||
|
||||
http://tracker.vbulletin.com/browse/VBIV-14959 To avoid this you would have to do some trickery in your installation code. If anyone feels that this issue is important, please vote for it ![]() No members have liked this post.
|
#23
|
||||
|
||||
Originally Posted by Andreas
Voted... But I do think it's working logically now, consistent with plugins and templates. Seems like nav elements should have a special setting though.
![]()
__________________
-Joe Former vb.org Moderator. Retired. @BirdOPrey5 | All Things BOP5 | Joe's Ultimate Off Topic Note - I no longer making new VB mods, sorry. No members have liked this post.
|
#24
|
||||
|
||||
Consistent with Plug-ins, yes - but not consistent with how it worked in previous vBulletin versions:
In previous versions Add-ons usually added their links into the Navbar by rendering their own templates on a certain template Hook. If the Administrator modified those templates (eg. if he added another link), an upgrade of the Add-on would not overwrite this modification - the link would still be there after an upgrade. Most items (Settings, Cron-Jobs, FAQ, Admin-Help, etc.) do have a volatile flag to handle "custom items" on upgrades, and this is what is missing here. No members have liked this post.
|
#25
|
||||||||
|
||||||||
Originally Posted by BirdOPrey5
does 'name' key exist in tabdata[children] array, because when i print_r the tabdata array i did not find a word called "name" anywhere.![]()
Well i liked vb 4.2.0 navigation manager and specially for my new mod. Yes i still have to create one plugin which i was doing in earlier version also but i won't have to create new template for it to use vb:each function. i am creating a new mod which has one tab and under which there are 5 menu by default. (which i will create it through navigation manager) there are 3 menu who's links are not fixed, it changes for each usergroup, so i will be creating array of links for those menus which i was for doing in earlier version also. i don't know how others are going to place their dynamic links inside menu, but i will be doing this way Plugin Hook: set_navigation_tab_main
Benefits of this method: 1) admin can add new menu inside "mytabname" easily through navigation manager 2) admin can add new links inside any menu. (even those menu which have dynamic links) 3) admin can change displayorder, title of any menu. 4) admin can change title of any links through navigation. (for dynamic links through phrase manager) 5) it hardly effects overall performance. (.1 extra second) The following members like this post: Hippy
|
#26
|
|||
|
|||
Originally Posted by Andreas
Voted.![]()
But a workaround for that is to create another product that only contains navigation items. Then the navigation items don't get overwritten if the main product is updated. No members have liked this post.
|
#27
|
||||
|
||||
Yep, that would work but doesn't seem that user friendly
![]() Another workaround would be to do some installation code trickery to add already existing items to the XML data. No members have liked this post.
|
#28
|
|||
|
|||
Originally Posted by Andreas
I agree it's not that user friendly, but it seemed to be the most fool-proof way of doing it.![]()
The funny thing is (if I'm reading that bug report right) if an admin adds 10 or 20 navigation tabs/menu selections to a stock vB installation using the vBulletin product as the parent, and then updates vB, all of those changes will be lost with the upgrade. That's a bug to me! The admin will have to re-insert the changes he made each time he upgrades vB. So that's not an improvement request. No members have liked this post.
|
#29
|
||||
|
||||
This is Paul M's blog on how to use the Navigation Manager
https://www.vbulletin.com/forum/entr...amp-Navigation Kym
__________________
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 *** The following members like this post: Hippy
|
#30
|
||||
|
||||
They will not, the upgrade process does not remove any tabs/menus/links belonging to the core 'vbulletin' product.
__________________
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. 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 01:20.