Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Additional navbar with dropdowns Details »»
Additional navbar with dropdowns
Version: 1.02, by attroll attroll is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.7.5 Rating:
Released: 12-25-2007 Last Update: 06-29-2008 Installs: 306
Uses Plugins Template Edits
 
No support by the author.

After upgrading and supporting my 3.0.0 and 3.5.3 version of this hack, I have decided it was time to step into the plugin world to make this easier for people to use.

Despite what category this is in it works with vBulletin 3.0 up to the most recent version of 3.8.

What this does is create another navbar with drop down menus by typing $navbar2 in any of your templates. It is just like the navbar that comes with VB.

I put a lot of description tags in the navbar2 template that gets installed to help explain what everything does. Once you understand what is going on here you can removed these. With very little modifications you can add to, remove or move items around in this additional navbar.

Upgrade
To upgrade you will want to reimport this XML file and edit your options accordingly.



1.02
  • Tweak it a bit to get the border on the top of the navbar. There was not boarder on the top of the navbar in the previous version. It was not really noticeable unless you have the navbar directly below the header area.
1.01
  • removed the plugin with the Hook "parse_templates" because it was not need.
  • Added plugin with the Hook ?global_start?, this will work with, PhotoPlog, vBAdvanced, Arcade. This will alleviate having to manually add code in the php files as was required in the past.
1.00
  • Initial release.
To install the this
1. Download the zipped file.

2. Unzip the file.

3. Import the product-navbar2.xml into your Plugins & Products? Manage Plugins.

4. Next you will have to decide where you want the navbar2 to be displayed. I have included a few options below.

5A. Under current (original) Navigation bar:
Find:
Code:
<!-- / breadcrumb, login, pm info -->
Below that place:
Code:
$navbar2
5B. On top of forums tables:
Find:
Code:
<!-- / PAGENAV POPUP -->
</if>
Below that place:

Code:
$navbar2
5C. Top of current navbar:
Find:
Code:
<br />
<!-- breadcrumb, login, pm info -->
Above that add:

Code:
$navbar2
5D. Under your header:
Find:
Code:
<br />
<!-- breadcrumb, login, pm info -->
Below that add:

Code:
$navbar2
5E. Under VB navbar:
Find:
Code:
<!-- / nav buttons bar -->
Below that add:
Code:
$navbar2
Note:
This should now work with vBAdvance CMPS, Arcade, PhotoPlog with no other modifications. Many thanks to Mike-D for his help with this.

Show Your Support

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

Comments
  #142  
Old 09-04-2008, 02:22 AM
shotkey shotkey is offline
 
Join Date: Jul 2008
Posts: 40
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

attroll,
It seems you have a lot of navbar experience, so maybe you can save me some time as I haven't found anything on the best way to do this - I would like to move some of the existing menu items from navbar to navbar2.

These items are from some of the installed mods from this forum and when you install them they are automatically inserted in the navbar - and these mods don't have any option in the ACP to redirect where the link appears.

So the question is what needs to be edited to make this change (i.e.,change .xml files? revise templates?, etc?) Just looking for the easiest way to accomplish this.
Reply With Quote
  #143  
Old 09-04-2008, 02:36 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Daisyboo View Post
Ahh yep but I'm not sure of the code I need to add, so I was looking in nav bar 1 where it is currently so I can copy it and add it to nav bar 2 (then delete it from nav bar 1)
But I can't see anything that looks like its referring to vBExperience so wondered if anyone knew what I was looking for
Let me know what you trying to move and maybe I can walk you through it.

Quote:
Originally Posted by shotkey View Post
attroll,
It seems you have a lot of navbar experience, so maybe you can save me some time as I haven't found anything on the best way to do this - I would like to move some of the existing menu items from navbar to navbar2.

These items are from some of the installed mods from this forum and when you install them they are automatically inserted in the navbar - and these mods don't have any option in the ACP to redirect where the link appears.

So the question is what needs to be edited to make this change (i.e.,change .xml files? revise templates?, etc?) Just looking for the easiest way to accomplish this.
I would have to look at your navbar and see what it is you want to move before I can explain it to you.
Reply With Quote
  #144  
Old 09-04-2008, 09:40 AM
Daisyboo Daisyboo is offline
 
Join Date: Jul 2008
Location: Somerset UK
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Attroll.

In my original navbar I have a link for vBExperience, but I'd like to delete it from there and add it to navbar 2.

Here's my code for my original navbar
Code:
<!-- nav buttons bar -->
<div class="tborder" style="padding:$stylevar[cellspacing]px; border-top-width:0px">
	<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
	<tr align="center">
		<if condition="$show['member']">
			<td class="vbmenu_control"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_cp]</a></td>
		</if>
		<if condition="$show['registerbutton']">
			<td class="vbmenu_control"><a href="register.php$session[sessionurl_q]" rel="nofollow">$vbphrase[register]</a></td>
		</if>
		$template_hook[navbar_buttons_left]
		<td class="vbmenu_control"><a href="faq.php$session[sessionurl_q]" accesskey="5">$vbphrase[faq]</a></td>
		<if condition="$vboptions['enablememberlist']">
			<td class="vbmenu_control"><a href="memberlist.php$session[sessionurl_q]">$vbphrase[members_list]</a></td>
		</if>
		<td class="vbmenu_control"><a href="calendar.php$session[sessionurl_q]">$vbphrase[calendar]</a></td>
                  		<if condition="$show['popups']">
			<if condition="$show['searchbuttons']">
				<if condition="$show['member']">
				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
				<else />
				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
				</if>
				<td id="navbar_search" class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4" rel="nofollow">$vbphrase[search]</a> <if condition="$show['quicksearch']"><script type="text/javascript"> vbmenu_register("navbar_search"); </script></if></td>
			</if>
			<if condition="$show['member']">
				<td id="usercptools" class="vbmenu_control"><a href="$show[nojs_link]#usercptools" accesskey="3">$vbphrase[quick_links]</a> <script type="text/javascript"> vbmenu_register("usercptools"); </script></td>
			</if>
		<else />
			<if condition="$show['searchbuttons']">
				<td class="vbmenu_control"><a href="search.php$session[sessionurl_q]" accesskey="4">$vbphrase[search]</a></td>
				<if condition="$show['member']">
				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]</a></td>
				<else />
				<td class="vbmenu_control"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]</a></td>
				</if>
			</if>
			<td class="vbmenu_control"><a href="forumdisplay.php?$session[sessionurl]do=markread" rel="nofollow">$vbphrase[mark_forums_read]</a></td>
			<if condition="$show['member']">
				<td class="vbmenu_control"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_contacts]</a></td>
			</if>
		</if>
		$template_hook[navbar_buttons_right]
		<if condition="$show['member']">
			<td class="vbmenu_control"><a href="login.php?$session[sessionurl]do=logout&amp;logouthash=$bbuserinfo[logouthash]" onclick="return log_out('$vbphrase[sure_you_want_to_log_out]')">$vbphrase[log_out]</a></td>
		</if>
		</tr>
	</table>
</div>
<!-- / nav buttons bar -->
I can't figure what the code is that I need to move the vBExperience link.

Many thanks!
Reply With Quote
  #145  
Old 09-05-2008, 06:05 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod!

Question, I am trying to add a 2nd navbar2 (for a total of 3, original navbar, and 2 navbar2's) how can I accomplish this?

I'm migrating both my forums to this and have started with my wife's site (he he) first.

The reason for the 2nd navbar2 is that I like to place it at the bottom in the footer -- You can see an example on my forum that I've not updated to your mod yet due to wanting to get this working in the footer --> http://www.allthingsmoto.com/ (Having it in the footer is actually very very nice).

I've tried adding $navbar2 to the footer, but it doesn't show for some reason. Would you be willing to tell me how or what I might need to change to make this work in the footer?
Reply With Quote
  #146  
Old 09-05-2008, 06:47 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jw00dy View Post
Great Mod!

Question, I am trying to add a 2nd navbar2 (for a total of 3, original navbar, and 2 navbar2's) how can I accomplish this?

I'm migrating both my forums to this and have started with my wife's site (he he) first.

The reason for the 2nd navbar2 is that I like to place it at the bottom in the footer -- You can see an example on my forum that I've not updated to your mod yet due to wanting to get this working in the footer --> http://www.allthingsmoto.com/ (Having it in the footer is actually very very nice).

I've tried adding $navbar2 to the footer, but it doesn't show for some reason. Would you be willing to tell me how or what I might need to change to make this work in the footer?
The only way I have found to make this work in the top and in the footer is to do the following:

Go you your Plugin Manager and remove the check mark from the following plugins:
navbar3 plugin part #1
navbar3 plugin part #2

Now you will have to create a plugin

Go to the Plugin Manager and click on Add New Plugin

Product: vBulletin
Hook Location: global_start
Title: navbar2 top and bottom
Plugin PHP Code:
PHP Code:
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 
Plugin Active: YES

Now put the following command in you footer:
Find:
PHP Code:
 <td class="tfoot" align="$stylevar[right]width="100%">
  <
div class="smallfont">
   <
strong>
    <if 
condition="$show['contactus']"><a href="$vboptions[contactuslink]rel="nofollow" accesskey="9">$vbphrase[contact_us]</a> -</if> 
Above that add:
$navbar2


PS: You will still have to put the $navbar2 in the navbar template where you want it.
Reply With Quote
  #147  
Old 09-05-2008, 06:49 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Daisyboo

I did not have time to look at you code tonight. I will try to look at it towmorrow.
Reply With Quote
  #148  
Old 09-05-2008, 07:26 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by attroll View Post
The only way I have found to make this work in the top and in the footer is to do the following:

Go you your Plugin Manager and remove the check mark from the following plugins:
navbar2 plugin part #1
navbar2 plugin part #2 (this was called navbar2 plugin part #2a in my plugin's)

Now you will have to create a plugin

Go to the Plugin Manager and click on Add New Plugin

Product: navbar2
Hook Location: global_start
Title: navbar2 plugin part #2 top and bottom
Plugin PHP Code:
PHP Code:
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 
Plugin Active: YES

Now put the following command in you footer:
Find:
PHP Code:
<!-- /content area table --> 
Below that add:
$navbar2


PS: You will still have to put the $navbar2 in the navbar template where you want it.
Oh, crap, I'm really sorry, I should have posted this as soon as I discovered a work around. Sorry for making you go through the hassle of making that code.

This works (what's below), but I'm not sure it's the best way to do it.

Edit Plugin navbar2 plugin part #2a (Could be called navbar2 plugin part #2), which looks like this:
PHP Code:
$insert '$navbar2'$vbulletin->templatecache['navbar'] =  str_replace($insert,$insert.fetch_template('navbar2'),$vbulletin->templatecache['navbar']); 
Copy what is there, and paste it a 2nd time below it, then change each entry of navbar to footer
PHP Code:
$insert '$navbar2'$vbulletin->templatecache['navbar'] =  str_replace($insert,$insert.fetch_template('navbar2'),$vbulletin->templatecache['navbar']);

$insert '$navbar2'$vbulletin->templatecache['footer'] =  str_replace($insert,$insert.fetch_template('navbar2'),$vbulletin->templatecache['footer']); 
Again, this worked, but I'm not sure it's the best way of doing it.

Also, I'm not getting this to show on my vBBlog either... but I'm also not getting ads to show there either, so I'm thinking the problem with the blog is bigger than this mod...

I am however going to try your method instead, and see if it works as well.
Reply With Quote
  #149  
Old 09-05-2008, 07:47 AM
jw00dy's Avatar
jw00dy jw00dy is offline
 
Join Date: Dec 2004
Location: Utah
Posts: 250
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks again. I edited your entry that I quoted just in case anyone else wants to do it. I'm a little OCD, so I had to do it.

Your method (of course) worked perfectly and is a little cleaner me thinks. However, I am no coder (more of a hack than anything), so take that with a grain of salt.

Still didn't work for vBBlog, but again, I'm not blaming this mod, as I believe vBBlog is the problem.

Thanks again for your Awesome support, as you really are a nice person with the best support I've encountered to date.

BTW, anyone that wants to see this in action you can click on either link in my sig.
Reply With Quote
  #150  
Old 09-05-2008, 09:01 AM
Daisyboo Daisyboo is offline
 
Join Date: Jul 2008
Location: Somerset UK
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by attroll View Post
Daisyboo

I did not have time to look at you code tonight. I will try to look at it towmorrow.
Thanks Attoll whenever you have the time, its much appreciated!
Reply With Quote
  #151  
Old 09-10-2008, 08:29 AM
Daisyboo Daisyboo is offline
 
Join Date: Jul 2008
Location: Somerset UK
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Attroll - just wondering if you had had a look yet
Reply With Quote
Reply

Thread Tools

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 03:19 PM.


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.05084 seconds
  • Memory Usage 2,357KB
  • Queries Executed 25 (?)
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
  • (11)bbcode_code
  • (6)bbcode_php
  • (5)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
  • (1)pagenav_pagelinkrel
  • (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