Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Additional Navbar Details »»
Additional Navbar
Version: 1.00, by attroll attroll is offline
Developer Last Online: Mar 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 05-15-2004 Last Update: 06-05-2004 Installs: 126
Uses Plugins Template Edits
 
No support by the author.

Dispite what category this is in it works with vBulletin 3.5. Just read the directions.

What this does is create another navbar with drop down menu?s by typing $navbar2 in any of your templates. It is just like the one that comes with vBulletin 3.

After seeing a lot of replies about users wanting another navbar besides the basic one that comes with vBulletin. I waited for someone else to write one. But no one stepped forward and wrote one. I wanted this for my site and got tired of waiting for someone else to write it. So I played around and created this one for myself. I though I would share it with everyone.

Note: If you do not want to add a separate navbar template you can also substitute the steps in 5A through 5D and insert the navbar2.txt after you have edited it the way you want and into the same places as I mentioned for the $navbar2 in your default navbar and you will not have to do any of these other steps.

I put a lot of description tags in the HTML file 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 navbar.

1. To install this hack you will have to create a template in you ADMINCP and call it ?navbar2? and insert the contents of the attached file "navbar2.txt" into this template file. Right now it is set up for my site. So you will have to modify it to what you want in this navbar for your site.

2. Put the following command in your phpinclude_start template:
PHP Code:
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 
2A. This is for users that have vB 3.5 and up. Step 2 will not work because the phpinclude_start template no longer exist in versions 3.5 and higher. So for 3.5 users ignore step 2 and use 2A.

Plugin System
Add new Plugin

Hook Location: global_start
Title: navbar2
Plugin PHP Code:
PHP Code:
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 
3. Now put the following command in you header or what ever template where your want the new navbar to be displayed (samples of where to put them are in the attached photos and directions are in 5A, B, C, D.):
PHP Code:
$navbar2 
4. Since the template is uncached you will have an extra query on each page. To fix, open global.php
Find:
PHP Code:
// misc useful 
Add below:
PHP Code:
'navbar2'
5A. Under current Navigation / Breadcrumb Templaters - navbar:
Find:
Code:
<!-- / nav buttons bar -->
Below that place:
Code:
$navbar2
5B. On top of forums tables:
Find:
Code:
<!-- / PAGENAV POPUP -->
</if>
Below that place:
Code:
$navbar2
5C. Under your header:
Find:
Code:
<br />
<!-- breadcrumb, login, pm info -->
Above that add:
Code:
$navbar2
5D. Top of current navbar:
Find:
Code:
<!-- breadcrumb, login, pm info -->
Under that add:
Code:
$navbar2
vBadvance CMPS using vB 3.5 or higher. To get this working with the homepage you will have to do the following.

Go into your ADMINCP-->vBa CPMS-->Default Setting-->Portal Output Global Variables and add navbar2 in the block there and save it.

Arcaded hack. You will need to go into your darcaded hack and edit a line. Here are the directions:
Go to you arcade/functions/functions.php
open it with a text editor:
Find:
Code:
global $header, $vbphrase, $vboptions, $stylevar, $headinclude, $bbuserinfo, $session, $show, $pmbox;
global $forumjump, $timezone, $logincode, $_USEROPTIONS, $scriptpath, $admincpdir, $modcpdir, $quickchooserbits;
Replace with:
Code:
global $header, $vbphrase, $vboptions, $stylevar, $headinclude, $bbuserinfo, $session, $show, $pmbox;
global $forumjump, $timezone, $logincode, $_USEROPTIONS, $scriptpath, $admincpdir, $modcpdir, $quickchooserbits, $navbar2;

Show Your Support

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

Comments
  #162  
Old 09-15-2005, 03:09 AM
Edrick Edrick is offline
 
Join Date: Aug 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried to intall this, I created the navbar2 template, modified the global.php file, and the templates, but it's not working. Exactly how should i include the:

eval('$navbar2 = "' . fetch_template('navbar2') . '";');

into the phpinclude_start template?
Reply With Quote
  #163  
Old 09-15-2005, 04:11 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 Edrick
I tried to intall this, I created the navbar2 template, modified the global.php file, and the templates, but it's not working. Exactly how should i include the:

eval('$navbar2 = "' . fetch_template('navbar2') . '";');

into the phpinclude_start template?
Did you put the "$navbar2" code in you navbar?

Here is the stock phpinclude_start file the way it comes:
Code:
// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();

Here is a sample of how to add the code for the navbar2:
Code:
// Example of how to include a seperate file:
// ob_start();
// require("yourheader.html");
// $header = ob_get_contents();
// ob_end_clean();
eval('$navbar2 = "' . fetch_template('navbar2') . '";');
Reply With Quote
  #164  
Old 09-15-2005, 04:57 AM
Edrick Edrick is offline
 
Join Date: Aug 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, here is my phpinclude_start file:

Quote:
/*
// Example of how to include a seperate file:

ob_start();
include('yourheader.html');
$your_code = ob_get_contents();
ob_end_clean();
// Now place a reference to $your_code where you want the resulting HTML to be displayed.
// This will most likely be the header or footer template.
*/
eval('$navbar2 = "' . fetch_template('navbar2') . '";');
And this is my navbar template:

Quote:
<script type="text/javascript">
<!--
function log_out()
{
ht = document.getElementsByTagName("html");
ht[0].style.filter = "progidXImageTransform.Microsoft.BasicImage(gray scale=1)";
if (confirm('$vbphrase[sure_you_want_to_log_out]'))
{
return true;
}
else
{
ht[0].style.filter = "";
return false;
}
}
//-->
</script>

<br />
<!-- breadcrumb, login, pm info -->
$navbar2
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
I want the navbar2 to show below my current navbar.

EDIT: I'm using vBulletin 3.0.8
Reply With Quote
  #165  
Old 09-15-2005, 05:57 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know what these codes do in your phpinclude_start file:

Code:
ob_start();
include('yourheader.html');
$your_code = ob_get_contents();
ob_end_clean();
Did you put these commands in there? I have never meesed with these commands. So I don't know if they would interfere with it or not. I would not think so.

I did notices that I put the directions wrong for placing the navbar2 under the current navbar wrong. I have fixed it though. They should read this:

Find:
Code:
<!-- / nav buttons bar -->
Below that add:
Code:
$navbar2
One more question. You did create a template called "navbar2" right?
Reply With Quote
  #166  
Old 09-15-2005, 06:08 AM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just realized that anything bewtween /* and */ the comands will not execute. So the problem should nmot be in your phpinclude_start file:

You should have created a template called "navbar2" in your templates. Did that get done. That is the only other thing I can think of at this time.

What version of vB are you running?
Reply With Quote
  #167  
Old 09-15-2005, 03:11 PM
Edrick Edrick is offline
 
Join Date: Aug 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did create the navbar2 template. The phpincude_start template code is out of the commentary lines, and I've $navbar2 under the <!-- / nav buttons bar -->

Yet it's still not working. I still haven't changed the links in the navbar2 template

I'm using V. 3.0.8
Reply With Quote
  #168  
Old 09-15-2005, 03:33 PM
mustang_lex mustang_lex is offline
 
Join Date: May 2005
Posts: 153
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Whats your website addy Edrick. Mine worked with no problem (except the arcade but thats not related to the hack) and I run 3.0.7 Seems you followed all the setup and its the easiest hack I had. You can see mine working at my site.
Reply With Quote
  #169  
Old 09-15-2005, 03:36 PM
Edrick Edrick is offline
 
Join Date: Aug 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I should also look ofr that a few pages back, I have an arcade as well.

The link is. http://forums.valiantgamers.com
Reply With Quote
  #170  
Old 09-15-2005, 04:04 PM
attroll's Avatar
attroll attroll is offline
 
Join Date: Jan 2003
Location: Litchfield, Me
Posts: 664
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We got Edrick's web site working.

One thing to keep in mind when editing templates in your styles is that sometimes editing the Master(Default) style it will not edit the child styles all the time. For example if you edited the navbar template in a child style it will not update later in that particular child style when you go and edit the Master(Default) style.

Once a template has been edited in a child style you can not expect to edit it in the Defult style and have it update in the child style you edited.

I hope that makes sense.
Reply With Quote
  #171  
Old 09-15-2005, 04:05 PM
Edrick Edrick is offline
 
Join Date: Aug 2005
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, it's working now. Thanks for you hel Attroll!

And it's working in the Arcade, so I've got to say it's great!
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 03:54 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.06076 seconds
  • Memory Usage 2,334KB
  • 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
  • (15)bbcode_code
  • (5)bbcode_php
  • (3)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