vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Miscellaneous Hacks - Multiple Navbars (https://vborg.vbsupport.ru/showthread.php?t=127525)

optrex 09-24-2006 10:00 PM

Multiple Navbars
 
There is always a demand for increased navigation from your vB Board. This modification has been tested on 3.6.x, 3.7.x and 3.8.x

Hardcoding a menu is the best way to add the increased functionaility, without adding server load and queries. This template modificiation explains how to add additional simple navbars to your website. By utilising exisitng vB code from within the Navbar template, the menu will appear on all pages, including in add-ons such as vBa and Photoplog and Photopost.


A working expample can be found at Midlands Weather Forum

The basis of the navigation bar (refered to as the 'Main Code') is as follows:

Code:

<!-- nav2 buttons bar by Optrex-->
 
<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">
 
 
<!--compile your links within this space, using the section types below -->
 
 
</tr>
</table>
</div>
 
<!-- / nav2 buttons bar by Optrex-->

To create a link visible to all usergroups add this code to replace the green section of the main code (above):
Code:

<td class="vbmenu_control"><a href="http://www.yoururlhere.com" >Title of your link</a></td>
To create a link visible only to members add this code to replace the green section of the main code (above):
Code:

<if condition="$show['member']">
<td class="vbmenu_control"><a href="http://www.yoururlhere.com" >Title of your link</a></td>
</if>

Placement is recommended above your existing navbar, due to the "drop down" lists.

Find the following line in your navbar template and place your compiled code above it.
Code:

<!-- nav buttons bar -->
<div align="center">


optrex 09-25-2006 12:39 PM

Links to useful hints and tips within this thread:

Adding an admin only link: https://vborg.vbsupport.ru/showpost....8&postcount=15
Border around navbar: https://vborg.vbsupport.ru/showpost....29&postcount=7
Make link open in new window: https://vborg.vbsupport.ru/showpost....9&postcount=22
Colour links: https://vborg.vbsupport.ru/showpost....7&postcount=23

Kaleem 09-25-2006 01:44 PM

Great come in handy :)

beduino 09-25-2006 02:46 PM

hi,
i will test and install - really useful!:D
tks
beduino

Reece^B 09-25-2006 03:17 PM

Great Hack Optrex.
Heres a screen shot to show my version. :)

bashy 09-25-2006 08:20 PM

Hi m8, i have put mine above the navbar and its missing the line above the top of the botton cell? www.bashys-place.com/forums top bar you'll see

Any ideas as to the code to add it please?

optrex 09-25-2006 08:27 PM

Hi Bashy, There are 2 ways round that the first is to remove the following coloured text

Code:

<!-- nav2 buttons bar by Optrex-->
<div align="center">
        <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px" >

or you can change the same coloured text to read 1px instead of 0px

bashy 09-25-2006 08:48 PM

Cheers m8, I added the 1 instead of removing it :)
All sorted now, thanks again!!

Hornstar 09-27-2006 08:36 AM

thanks for the tute. This is really helpful, I guess I could also add the navbar at the footer if I wanted right?

Could I also duplicate the current navbar so it shows in the footer? if so where should I add it?

Thanks

optrex 09-27-2006 12:27 PM

Yes the idea is you can create as many menu nars as you want. Because it's coded directly into the template there are no additional server loads or queries.

If you were putting it in the footer, I would choose to place it above
Code:

<!-- /content area table -->
Again be careful of the placement of drop downs if you are going to move/copy your original.


All times are GMT. The time now is 11:41 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01072 seconds
  • Memory Usage 1,736KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (6)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete