The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Manual Add Navbar Links [Plus Image Menu] Details »» | |||||||||||||||||||||||||||||
Manual Add Navbar Links [Plus Image Menu]
Developer Last Online: Oct 2013
This solution allow you to add links in navbar by editing navbar template yourself :
Some Hacks and Modification that you have installed on your forum, adds a link in the middle of navbar, so you can easily have one : This is suitable for forumes with image navbar like mine : http://soltanworld.com If you have use this Solution do not forget to mark az installed ---------------------------------------------------------------- - How to add links To add Links in navbar you should first know some information about navbar and navtabs some phrase like : {vb:raw template_hook.navtab_start} {vb:raw template_hook.navtab_middle}{vb:raw template_hook.navtab_end} Q:What does this phrases mean? A: First Phrase {vb:raw template_hook.navtab_start}, is the start of navtabs. Befor This Phrase means that you link would appear always the first one and the ones you put after this phrase due to how you put the links in order would be sortet in navtabs . Any Links you put in order after {vb:raw template_hook.navtab_start} untill this phrase would be shown as you did : {vb:raw template_hook.navtab_middle} , And after this phrase like the start any links after this would be sorted as middle of navtabs, so you can have separator between items you want to add betweens. And if you want to add a link at the end of navtabs you should find this phrase {vb:raw template_hook.navtab_end} and add you link before this phrase. e.g : Code:
{vb:raw template_hook.navtab_start} <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href="link">title</a> <vb:else /> <li><a class="navtab" href="link">title</a></li> </vb:if> {vb:raw template_hook.navtab_middle}<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href="link">title</a> <vb:else /> <li><a class="navtab" href="link">title</a></li> </vb:if> {vb:raw template_hook.navtab_end} Each Navtab link can contains submenu which calles navbar and popup menu for navbar (under navtabs) items you should use this : Notice : to add this in navtabs sub menu, you should add this before <vb:else> Please follow the example Code:
<li><a class="navtab" href="YourLink">Link Title</a> <ul class="floatcontainer"> {vb:raw template_hook.navbar_start} <li><a href="link">title</a></li> {vb:raw template_hook.navbar_end} </ul> </li> and for navbar child menu you can use this as popup menu : Code:
<li><a class="navtab" href="YourLink">Link Title</a> <li class="popupmenu"> <a href="javascript://" class="popupctrl">navbar link title</a> <ul class="popupbody popuphover"> <li><a href="link">sub menu title 1</a></li> <li><a href="link">sub menu title 2</a></li> <li><a href="link">sub menu title 3</a></li> </ul> </li> </li> e.g : Navtab + Navbar + Popup menu Code:
{vb:raw template_hook.navtab_start} <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href="link">title</a></li> <vb:else /> <li><a class="navtab" href="link">title</a></li> </vb:if> {vb:raw template_hook.navtab_middle} <vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li><a class="navtab" href="link">title</a> <ul class="floatcontainer"> {vb:raw template_hook.navbar_start} <li><a href="link">sample navbar item</a></li> <li class="popupmenu"> <a href="javascript://" class="popupctrl">contain popup menu item</a> <ul class="popupbody popuphover"> <li><a href="link">title</a></li> <li><a href="link">title</a></li> <li><a href="link">title</a></li> <li><a href="link">title</a></li> </ul> </li> {vb:raw template_hook.navbar_end} </ul> </li> <vb:else /> </li> <li><a class="navtab" href="link">title</a></li> </vb:if> {vb:raw template_hook.navtab_end} First of all you need to edit your css file and Stylevar (navbar) to set your desired setting and then You should replace text with this tag in navbar template: <img src="link"> like : Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href=" Link Code:
"><img src="link"></a> <vb:else /> <li><a class="navtab" href="link">title</a></li> </vb:if> If you have use this Solution do not forget to mark az installed Screenshots
Supporters / CoAuthors Show Your Support
|
Благодарность от: | ||
barakuda |
Comments |
#2
|
||||
|
||||
First Post is Reserved
|
#3
|
|||
|
|||
thanksssssssssss
|
#4
|
||||
|
||||
This should be in Template Modifications...
|
#5
|
||||
|
||||
Thanks for the nice mod. I wish there was a way all the edits could run automatically.
I think we have moderators who meant to tell us that ... |
#6
|
||||
|
||||
Quote:
Sry i've not got mastered enough to make it as a Hack. But i will try my best. |
#7
|
|||
|
|||
Hi SoltanWorld, thanks for this great mod. I'm trying to do almost exactly what you're doing, so this is a great start. A question I have for you is, how do you customize the navbar below the navtab? For example, in your website:
http://www.soltanworld.com/forum/forum.php has "Today's Posts", "FAQ", "Calendar", etc. under the navtab images. http://www.soltanworld.com/forum/xperience.php has nothing under the navtab images. http://www.soltanworld.com/forum/local_links.php has "Categories", "Show" & "Search" under the navtab images. How do I do this? I was looking at another similar thread but so far haven't been able to figure out a solution. Any help would be greatly appreciated. Thanks! |
#8
|
||||
|
||||
Thanks dear,I think this would works :
Code:
<li><a class="navtab" href="YourLink">Link Title</a> <ul class="floatcontainer"> {vb:raw template_hook.navbar_start} <li><a href="link">title</a></li> {vb:raw template_hook.navbar_end} </ul> </li> {vb:raw template_hook.navbar_after_faq} {vb:raw template_hook.navbar_after_pm} and i think for popup menu it would work too Code:
<li><a class="navtab" href="YourLink">Link Title</a> <li class="popupmenu"> <a href="javascript://" class="popupctrl">navbar link title</a> <ul class="popupbody popuphover"> <li><a href="link">sub menu title 1</a></li> <li><a href="link">sub menu title 2</a></li> <li><a href="link">sub menu title 3</a></li> </ul> </li> </li> |
#9
|
||||
|
||||
This is nice, but how do I get the navbar to display "selected" when I'm actually on that page.
For example, I added a navbar link "Gallery" that links to my photopost. When I click on the link it takes me to /photopost but the Forum link in the navbar is the one still selected. |
#10
|
||||
|
||||
you can use this code
Code:
<vb:if condition="!$vboptions['selectednavtab'] AND THIS_SCRIPT != 'search'"> <li class="selected"><a class="navtab" href="link">title</a> <vb:else /> <li><a class="navtab" href="link">title</a></li> </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|