PDA

View Full Version : Miscellaneous Hacks - Simple Additional Navbars


yoyoyoyo
10-19-2007, 10:00 PM
Simple Additional Navbars

This allows you to add another navigation menu (navbar) under your exisiting navbar. You can add as many as you want.

For simplicity sake, this does not have the option to add dropdown menus. If you wish to do that there are plenty of tutorials on vbulletin.org that show you how to do that - this is meant as a way to simply add another basic navbar to your forum.

TEMPLATE EDIT:

Go to your Admin Control Panel, and select the "Styles & Templates" navigation option, and click on "Style Manager"
In the dropdown menu select "Edit Templates"
click on the "<<>>" button to expand all of the templates
Select the "navbar" template and click on "Customize" or "Edit"
In your navbar template find:
<!-- breadcrumb, login, pm info -->add above:
<!-- additional nav button row below navbar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
</tr>
</table>
</div>
<!-- / additional nav button row below navbar -->Obviously you will need to substitute "http://url.com" with the URL you wish to add, and "Link Title Goes Here" with the name of the link you wish to appear in your navbar.

You can also obviously add as many links as will fit on the navbar. Just add:
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>for each link you would like to add.

If you want to add multiple additional navbars below the navbar, simply paste the code in again for each navbar you wish to add, and edit the links accordingly.

NOTE: If you want to add a new navbar ABOVE your existing navbar, then in the navbar template search for:
<!-- nav buttons bar -->
<div align="center">and add above:
<!-- additional nav button row above navbar -->
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
</tr>
</table>
</div>
<!-- / additional nav button row above navbar -->OPTIONAL:

If you want to show a link only to members use this:
<if condition="$show['member']">
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
</if>If you want to show a link only to members, and a different link to guests use this:
<if condition="$show['member']">
<td class="vbmenu_control"><a href="http://url.com">Member Link Title Goes Here</a></td>
<else />
<td class="vbmenu_control"><a href="http://url.com">Guest Link Title Goes Here</a></td>
</if>To make the link open in a new window use this URL instead:
<td class="vbmenu_control"><a href="http://url.com" target="_blank">Link Title Goes Here</a></td>To make the link(s) only visible to certain usergroups use this:
<if condition="is_member_of($bbuserinfo, X, Y, Z)">
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
</if> Substitute X, Y, Z with the ID numbers of the groups that you want to allow to see the link. If you only want one usergroup to be able to see the link then use: $bbuserinfo, X and substitute X with the ID number of the group that you want to allow to see the link.

SPECIAL NOTE REGARDING DROPDOWN MENUS:

If you do decide to add dropdown menus to your additional navbar, keep in mind that some web browsers lack the ability to use the vBMenu system. To avoid confilcts with these browsers surround all vBMenu controls that use dropdown menus in a conditional that checks the value of $show['popups']:

<if condition="$show['popups']">

<!-- content here is for browsers that
are able to use the vBMenu system -->

<else />

<!-- content here is shown to browsers
that are unable to use dropdown vBMenu -->

</if>IF YOU FIND THIS USEFUL PLEASE CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=160642)

yoyoyoyo
10-20-2007, 01:26 PM
I know that there are going to be inevitable requests for screenshots - simply use your imagination - picture another navbar either below or above the existing navbar. :)

Luky
10-20-2007, 02:13 PM
Screenies :D

SuperTaz
10-21-2007, 02:17 AM
Screenshots? lmao :)

J/K. I like it.

Luky
10-21-2007, 06:12 AM
A demo atleast? >_>

ninjamaster
10-21-2007, 08:04 AM
thanks for this :)

yoyoyoyo
10-21-2007, 11:46 AM
A demo atleast? >_>imagine 2 navbars - there's your demo :)

yoyoyoyo
10-21-2007, 06:30 PM
Note: if you want to hide the additional navbar from guests then use this:


<!-- additional nav button row for members only -->
<if condition="$show['member']">
<div align="center">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
<tr align="center">
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
<td class="vbmenu_control"><a href="http://url.com">Link Title Goes Here</a></td>
</tr>
</table>
</div>
</if>
<!-- / additional nav button row for members only -->

Snake
10-25-2007, 03:47 PM
Quite useful. Thank you!

Bibbo
07-20-2009, 04:05 PM
Thanks for this. I now have this and it is working great :)

Sworm
03-19-2011, 06:10 PM
It is not perfectly identical to the down default bar, there's a 1 border more....