I see... This mod says it allows for drop down menus from Navtabs.
That is not a default feature in the new Navigation Manager. |
Quote:
|
Quote:
But, for now creating a tab using the old navtab_end hook and template still works for those type of tabs. |
1 Attachment(s)
Quote:
I added forum.php to a Special Access tab, but it still highlights the forum tab. |
Quote:
In Navigation Manager after you add the Tab "Paid Mods" you go to the drop down menu for "Paid Mods" and choose "Add Link" from the menu. Each one of those options (Free Mods, Styles, etc...) is a Link I added via "Add Link." |
Quote:
|
Quote:
|
I wonder if I won't need https://vborg.vbsupport.ru/showthread.php?t=271740 anymore :O
|
Nope, with Andreas' add-on you can now do drop-down links with tabs.
|
Quote:
https://vborg.vbsupport.ru/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. |
Quote:
Code:
7,14,30,120,180 I then use vb:each in the template to have it build the menu with the days links: Code:
Posts for Last 7 Days 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. |
Quote:
http://snogssite.com/tempdown/likethis.jpg 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. :D 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. |
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:
Code:
<li><a href="search.php?{vb:raw session.sessionurl}do=getdaily&contenttype=vBForum_Post&days={vb:raw postdays}">{vb:rawphrase boofo_posts_from_last_x_days, {vb:raw postdays}}</a></li> |
Quote:
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. |
Quote:
Hook: navigation_tab_complete PHP Code:
|
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.
|
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.
|
Quote:
|
Quote:
|
Quote:
|
I misunderstood what you meant then. My bad.
I had an options setting for the days in the mod. |
Quote:
That's a different animal then. ;) |
Not really, you just change
PHP Code:
BTW, I would use ; PHP Code:
|
I understand the array can be from anywhere. But, I'm trying to avoid the use of a plugin in most cases. Creating the links in the DB eliminates the plugin and allows vB to handle the menu system.
But I can see where using a plugin to create the menu would be needed at times. Heck, I'm the one that first questioned the dynamic creation of menus in this thread. :D |
Quote:
--------------- Added [DATE]1337888754[/DATE] at [TIME]1337888754[/TIME] --------------- I'm getting W3C Validation errors like crazy now: HTML Code:
syntax of attribute value does not conform to declared value How do you get this to display in more than the forum tab when doing it via a plugun? --------------- Added [DATE]1337896906[/DATE] at [TIME]1337896906[/TIME] --------------- Quote:
|
If you need to modify the Tab name on the fly...
Eg: Our photo competition system shows the number of competitions open for you to enter. @hook: parse_templates (just convenient for me) Code:
$vbphrase['vb_navigation_tab_YOURTABNAME_text'] = "New text"; --------------- Added [DATE]1337991781[/DATE] at [TIME]1337991781[/TIME] --------------- OP updated with correct hook name set_navigation_tab_fallaback --------------- Added [DATE]1337992087[/DATE] at [TIME]1337992087[/TIME] --------------- Using $root example here... https://vborg.vbsupport.ru/showpost....&postcount=409 --------------- Added [DATE]1337993314[/DATE] at [TIME]1337993314[/TIME] --------------- Also: More doco needed ... https://www.vbulletin.com/forum/show...96#post2297796 |
Pls help me:
https://vborg.vbsupport.ru/showthread.php?t=283451 |
No one is going to just write code for you (well, unless maybe you pay them).
|
Quote:
--------------- Added [DATE]1338041603[/DATE] at [TIME]1338041603[/TIME] --------------- Quote:
|
Quote:
We have a Competitions tab which shows Competitions (C,V) where C = competitions open to enter and V = competitions open for voting. C and V set set per user based on their competition system status. |
Okay!
|
Quote:
Code:
<vb:if condition="$vbulletin->userinfo['permissions']['classifieds'] & $vbulletin->bf_ugp['classifieds']['moderate']"> Thank you Chris |
Maybe something like this?
Code:
if (condition="$vbulletin->userinfo['permissions']['classifieds'] & $vbulletin->bf_ugp['classifieds']['moderate']") $show['classifieds'] = true; |
Quote:
Thanks again Chris |
Sure you can. As another example, here is one I use in the load_show_variables hook:
Code:
if ($vbulletin->products['adv_product_management4'] == 1) If APM is installed it will use that link. If not, it default to the vb product manager. I also use the show variables in the navigation_tab_complete, but you have to globalize it in that hook, as well as $vbphrase if you use that there, too. |
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. |
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. |
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 PHP Code:
|
You need to add this at the very top:
Code:
global $show; And try the navigation_tab_complete hook instead. |
Quote:
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 : PHP Code:
|
All times are GMT. The time now is 11:16 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|