The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB4.2 Navigation Manager - how to discussion
I have vB 4.2.0 BETA 1 running in my test system. Products that use templates/hooks to integrate with the navbar will need the following changes to work with the Navigation Manager. Please post code snips and hints in this thread, we are all on a learning curve. 1. Remove old style navigation hooks/templates etc. 2. Create a new <navigation> section in the product XML file (You can create the navigation in the navigation manager, linked to a product then export the product file as a skeleton) 3. Set any conditionals in a hook or in your main code Eg. $show['apmgtug'] = true; is set for one of the menu items in my example My example relies on $show['member'] = true; as well. Leave the <show> tag empty for 'public' tabs/links 4. If you have multiple scripts, leave <scripts> blank and set $root at the new hooks set_navigation_tab_fallaback or set_navigation_tab_vbview Code:
if (<some condition>) $root= '<name of tab>'; I would probably have a new vB4.2 code base because of the differences, you could have the same code base with some sort of version check. In the end the new navigation integration is better and easier. Here are sample <navigation> from one of my own plugins... Code:
<navigation> <tab name="aptab_competition" date="1337135420" username="APcompetition" version="3.0.0"> <active>1</active> <show>member</show> <scripts>apcompetition</scripts> <displayorder>30</displayorder> <url><![CDATA[apcompetition.php{session.sessionurl_q}]]></url> </tab> <link name="aplink_enter" date="1337135420" username="APcompetition" version="3.0.0"> <active>1</active> <show>member</show> <parent>aptab_competition</parent> <displayorder>20</displayorder> <url><![CDATA[apcompetition.php{session.sessionurl_q}]]></url> </link> <link name="aplink_search" date="1337135420" username="APcompetition" version="3.0.0"> <active>1</active> <show>member</show> <parent>aptab_competition</parent> <displayorder>40</displayorder> <url><![CDATA[apcompetition.php?{vb:raw session.sessionurl}do=search&apmycomps=1]]></url> </link> <link name="aplink_performance" date="1337135420" username="APcompetition" version="3.0.0"> <active>1</active> <show>member</show> <parent>aptab_competition</parent> <displayorder>60</displayorder> <url><![CDATA[apcompetition.php?{vb:raw session.sessionurl}do=performance]]></url> </link> <link name="aplink_fame" date="1337135420" username="APcompetition" version="3.0.0"> <active>1</active> <show>apmgtug</show> <parent>aptab_competition</parent> <displayorder>80</displayorder> <url><![CDATA[apcompetition.php?{vb:raw session.sessionurl}do=finalvotereport]]></url> </link> </navigation> Code:
<phrasetype name="GLOBAL" fieldname="global"> <phrase name="vb_navigation_tab_aptab_competition_text" date="1336964077" username="APcompetition" version="3.0.0"><![CDATA[Competitions]]></phrase> <phrase name="vb_navigation_link_aplink_enter_text" date="1336964077" username="APcompetition" version="3.0.0"><![CDATA[Enter a Competition]]></phrase> <phrase name="vb_navigation_link_aplink_search_text" date="1336964077" username="APcompetition" version="3.0.0"><![CDATA[Search Competitions]]></phrase> <phrase name="vb_navigation_link_aplink_performance_text" date="1336964077" username="APcompetition" version="3.0.0"><![CDATA[My Performance]]></phrase> <phrase name="vb_navigation_link_aplink_fame_text" date="1336964077" username="APcompetition" version="3.0.0"><![CDATA[Hall of Fame]]></phrase> </phrasetype> Pull down menu's can also be coded. Have a look at the vB source for examples. Specifically "./install/vbulletin-navigation.xml" |
#62
|
||||
|
||||
I misunderstood what you meant then. My bad.
I had an options setting for the days in the mod. |
#63
|
|||
|
|||
Quote:
That's a different animal then. |
#64
|
||||
|
||||
Not really, you just change
PHP Code:
BTW, I would use ; PHP Code:
|
2 благодарности(ей) от: | ||
AusPhotography, Boofo |
#65
|
|||
|
|||
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. |
#66
|
||||
|
||||
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 <li id=""><a href="search.php?do=process&searchdate=90">Post For ? The value of an attribute contained something that is not allowed by the specified syntax for that type of attribute. For instance, the ?selected? attribute must be either minimized as ?selected? or spelled out in full as ?selected="selected"?; the variant ?selected=""? is not allowed. 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] --------------- I tried it with $roots, but it seems that isn't the right way. |
#67
|
||||
|
||||
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 |
#68
|
|||
|
|||
Pls help me:
https://vborg.vbsupport.ru/showthread.php?t=283451 |
#69
|
||||
|
||||
No one is going to just write code for you (well, unless maybe you pay them).
|
2 благодарности(ей) от: | ||
borbole, Christos Teriakis |
#70
|
||||
|
||||
Quote:
--------------- Added [DATE]1338041603[/DATE] at [TIME]1338041603[/TIME] --------------- Exsactly! As a lot of us are still leaning the new system, too. |
#71
|
||||
|
||||
Because it's dynamic!
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. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|