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:
|
All times are GMT. The time now is 04:25 AM. |
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:
|