Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Multiple Navbars Details »»
Multiple Navbars
Version: 1.00, by optrex optrex is offline
Developer Last Online: Mar 2011 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 09-24-2006 Last Update: Never Installs: 59
Template Edits
 
No support by the author.

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">

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 12-18-2006, 03:23 PM
Sarcoth Sarcoth is offline
 
Join Date: Mar 2006
Location: Huntsville
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I noticed you can put <if condition="$show['member']"> if you want the link to be only viewable by registered users and <if condition="$GLOBALS[show][admincplink]"> for admins. I was wondering how I could go about making a link only viewable to certain membergroup, i.e. membergroup id 23 for instance.

My guess would be finding the code where the $show['member'] is original defined and add something similiar to that but for membergroup 23 only. Or is there a way to just set up a reference in the navbar template?

Thank you!
Reply With Quote
  #53  
Old 12-18-2006, 08:55 PM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sarcoth,

try this and let me know how you get on

Code:
<if condition="$bbuserinfo['usergroupid'] == '23'">
</if>
Reply With Quote
  #54  
Old 12-19-2006, 05:23 PM
Sarcoth Sarcoth is offline
 
Join Date: Mar 2006
Location: Huntsville
Posts: 521
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by optrex View Post
Sarcoth,

try this and let me know how you get on

Code:
<if condition="$bbuserinfo['usergroupid'] == '23'">
</if>
Thanks for the reply optrex. I found something yesterday that actually worked.

PHP Code:
<if condition="is_member_of($bbuserinfo, 23)"></if> 
Found a few things that go along with it as well in this link; good stuff.
Reply With Quote
  #55  
Old 01-14-2007, 01:25 PM
almqdad almqdad is offline
 
Join Date: Jul 2003
Posts: 116
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi every body

WHAT IF I WANT TO SHOW THE LINK TO MORE THAN ONE GROUP

LET SAY GROUP 5,6,7

WHAT WILL BE THE CODE

YOUR HELP WILL BE HIGHLY APPRECAITED
Reply With Quote
  #56  
Old 01-14-2007, 02:01 PM
thincom2000 thincom2000 is offline
 
Join Date: May 2006
Location: Bronx, NY
Posts: 1,205
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by almqdad
WHAT IF I WANT TO SHOW THE LINK TO MORE THAN ONE GROUP

LET SAY GROUP 5,6,7
You can use OR

For example:

PHP Code:
<if condition="($bbuserinfo['usergroupid'] == '5') OR ($bbuserinfo['usergroupid'] == '6') OR ($bbuserinfo['usergroupid'] == '7')">
</if> 
I think that's the simplest code you can do without making a file edit first.
Reply With Quote
  #57  
Old 01-21-2007, 12:20 AM
Zowners Zowners is offline
 
Join Date: Dec 2005
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awsome Mod
I Love It!
Reply With Quote
  #58  
Old 01-21-2007, 11:08 PM
afmarko99's Avatar
afmarko99 afmarko99 is offline
 
Join Date: Jan 2007
Location: Louisiana
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

optrex,

Thanks for the great post. I do have one question though. I have Blak-Ice skin installed and don't see:

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

in the navbar template. I am trying to install my additional navbar directly underneath the buttons. Currently it is attached to the welcome module. I put all my coding in the top of the navbar template but that doesn't work. See here:
www.thepublicenemy.net

What template do I need to modify for this to work?
Reply With Quote
  #59  
Old 01-22-2007, 05:35 AM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Depending on the skin, you may have to modify your header
Reply With Quote
  #60  
Old 08-08-2007, 03:33 PM
nureeves nureeves is offline
 
Join Date: Dec 2006
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hii

would you please help me ..
I am newbie at coding and editing template.
Well first thing .. which template should I edit and which new script should i add?
Reply With Quote
  #61  
Old 08-08-2007, 03:38 PM
optrex optrex is offline
 
Join Date: Sep 2005
Posts: 344
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

edit your navbar template.

You dont need to add scripts as such, just add the code portions above to get what you need.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:11 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
  • Page Generation 0.04982 seconds
  • Memory Usage 2,317KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete