vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Additional Navbar (https://vborg.vbsupport.ru/showthread.php?t=65198)

attroll 05-15-2004 10:00 PM

Additional Navbar
 
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;


pjdaley 05-16-2004 09:16 PM

:mad: good job sir

Zachery 05-16-2004 09:48 PM

is this for vB3 O.o

attroll 05-16-2004 10:10 PM

Yes this is for VB 3.0. I have it working with 3.0 right now. This is the one I was working on this morning that you chatted with me on Zachery. Oh and thanks for the help.

Zachery 05-16-2004 10:10 PM

psst its in the vB2 area ;0

attroll 05-16-2004 10:13 PM

Darn I put it in the wrong area. Can someone put this in the 3.0 area please? I do not have access to move a thread here.

joeychgo 05-16-2004 11:54 PM

How about a screenshot?

attroll 05-17-2004 12:39 AM

Quote:

Originally Posted by joeychgo
How about a screenshot?

I added some scrreen shots.

neocorteqz 05-17-2004 02:53 AM

Nice work sir. :)

attroll 05-17-2004 03:20 AM

I forgot to put in the description in the first post that with alterations you can put <if> statements in there so that only certain user groups can see certian items on the navbar.

Red Blaze 05-17-2004 03:33 AM

Wow, thanks for sharing this, I'll install this soon. :)

Tim Wheatley 05-17-2004 04:53 PM

Couldn't you just edit the existing navbar template??

http://forum.rscnet.org

assassingod 05-17-2004 05:38 PM

Nice idea, however since the template is uncached you will have an extra query on each page. To fix, open global.php
PHP Code:

    // misc useful 

add below
PHP Code:

    'navbar2'


gmarik 05-17-2004 06:39 PM

simple but nice

neocorteqz 05-18-2004 03:06 AM

Quote:

Originally Posted by Tim Wheatley
Couldn't you just edit the existing navbar template??

http://forum.rscnet.org

Yes, but some may want addtional space, as not to clutter the existing navbar. I have a few custom additions to mine, and I have even added some stuff to the Quick Links drop down menu, but If i were to add more, it would start looking kinda cluttered. IMO.

ChurchMedia 05-18-2004 04:13 AM

Brilliant simplicity! I had to disable my java-menu because it was conflicting with the vB menus. Now I can add them back in. Thanks so much!!

attroll 05-19-2004 05:04 AM

Quote:

Originally Posted by assassingod
Nice idea, however since the template is uncached you will have an extra query on each page. To fix, open global.php
PHP Code:

    // misc useful 

add below
PHP Code:

    'navbar2'


Thank you for pointing this out. I have added it to the instructions in the first post.

Holidazed 05-20-2004 09:30 PM

This is awesome! I am using it now at http://www.dkdrpg.com

Thank you

~installs

Vigile 05-20-2004 11:34 PM

Quote:

Originally Posted by assassingod
Nice idea, however since the template is uncached you will have an extra query on each page. To fix, open global.php
PHP Code:

    // misc useful 

add below
PHP Code:

    'navbar2'


Sorry for taking off topic here, but what is the difference (value) between uncached and cached templates? I understand that the query doesnt load on each load, but why doesnt it, I guess thats the question... does it load the tempalte on the local enduser pc?

Rick Sample 05-22-2004 03:02 AM

I really want this hack, but can someone show me how I would find and add the navbar like this site has it: (you see how its directly above the login and is the same size? http://www.rs25.com


I hope one of you could help me out on this :)

attroll 05-22-2004 04:37 AM

Quote:

Originally Posted by muscle-mustangs
I really want this hack, but can someone show me how I would find and add the navbar like this site has it: (you see how its directly above the login and is the same size? http://www.rs25.com


I hope one of you could help me out on this :)

This can be done. But it looks like the site you are talking about incorperated it into their existing $navbar. It was not a seperate template.

I played around with it a little and I got it to work but I have to put it in the existing $navbar. I did not try it with drop downs though. I will have to play with it some more later on and see if I can get drop downs to work like in another table within $navbar. I can not promise I will get right on it though. I am pretty buisy.

attroll 05-22-2004 04:59 AM

Quote:

Originally Posted by muscle-mustangs
I really want this hack, but can someone show me how I would find and add the navbar like this site has it: (you see how its directly above the login and is the same size? http://www.rs25.com


I hope one of you could help me out on this :)

muscle-mustangs

I put this on my test site you can go check it out if you want. I will not leave it there for long. Let me know if this is what you want. I have not messed around with making drop downs yest though.


http://www.athiker.net/forum/

Rick Sample 05-22-2004 09:16 AM

Quote:

Originally Posted by attroll
muscle-mustangs

I put this on my test site you can go check it out if you want. I will not leave it there for long. Let me know if this is what you want. I have not messed around with making drop downs yest though.


http://www.athiker.net/forum/

WOW thanks man, thats exactly what I'm looking for. Yeah, I'm not worried about drop down menus. Could you let me know where and how to put it their like you have it? And could you also give me the coding to where you have the links forum, forum, forum, forum? Just because I don't need any dropdowns, so It would be easier for me to just use yours than to rewright the other one!

Thanks man, just let me know how to do that exaclty like you have it their!!!!! :)

neocorteqz 05-22-2004 09:33 AM

Quote:

Originally Posted by muscle-mustangs
WOW thanks man, thats exactly what I'm looking for. Yeah, I'm not worried about drop down menus. Could you let me know where and how to put it their like you have it? And could you also give me the coding to where you have the links forum, forum, forum, forum? Just because I don't need any dropdowns, so It would be easier for me to just use yours than to rewright the other one!

Thanks man, just let me know how to do that exaclty like you have it their!!!!! :)


looks to be directly after <!-- breadcrumb, login, pm info -->, but i guess we'll have to wait and see, cause I did it, and it doesn't look anything like that. But then again, my HTML is kinda bad. :D

attroll 05-22-2004 04:14 PM

Quote:

Originally Posted by muscle-mustangs
I really want this hack, but can someone show me how I would find and add the navbar like this site has it: (you see how its directly above the login and is the same size? http://www.rs25.com


I hope one of you could help me out on this :)

Here goes. I got this all set to work like you wanted.

Go to your ADMINCP/Style Manager.

Then in the style you want to use it in click on EDIT TEMPLATES.

Go down the list until you see Navagation /Breadcrumb Templates and double click it.

Double click Navbar.

Find:
PHP Code:

<!-- breadcrumbloginpm info --> 

Put this under that:
PHP Code:

<!-- Navbar on top of $navbar -->
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
    <
tr align="center">
<!-- 
Links to put int new navbar -->
        <
td class="vbmenu_control"><a href="/index.php?$session[sessionurl]">Link 1</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 2</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 3</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 4</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 5</a></td>
<!-- / 
Links to put int new navbar -->

</
tr>
</
table>
<!-- / 
Navbar on top of $navbar --> 

Of course you will have to change the the Link names and put the correct link in the lines.

If you have any problems with this let me know.

Rick Sample 05-22-2004 09:36 PM

Quote:

Originally Posted by attroll
Here goes. I got this all set to work like you wanted.

Go to your ADMINCP/Style Manager.

Then in the style you want to use it in click on EDIT TEMPLATES.

Go down the list until you see Navagation /Breadcrumb Templates and double click it.

Double click Navbar.

Find:
PHP Code:

<!-- breadcrumbloginpm info --> 

Put this under that:
PHP Code:

<!-- Navbar on top of $navbar -->
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center" style="border-top-width:0px">
    <
tr align="center">
<!-- 
Links to put int new navbar -->
        <
td class="vbmenu_control"><a href="/index.php?$session[sessionurl]">Link 1</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 2</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 3</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 4</a></td>
        <
td class="vbmenu_control"><a href="/forum/index.php?$session[sessionurl]">Link 5</a></td>
<!-- / 
Links to put int new navbar -->

</
tr>
</
table>
<!-- / 
Navbar on top of $navbar --> 

Of course you will have to change the the Link names and put the correct link in the lines.

If you have any problems with this let me know.


Cool, I got it up, but one slight problem. I have 2 bright red nav bars now. wihich is kinda hard on the eyes. Is their anyway to keep my main red one, but turn the one I just put up into like a saturated grey? I tried to put the Color="#" code in their, but didn't have any effect.

attroll 05-23-2004 12:39 AM

Quote:

Originally Posted by muscle-mustangs
Cool, I got it up, but one slight problem. I have 2 bright red nav bars now. wihich is kinda hard on the eyes. Is their anyway to keep my main red one, but turn the one I just put up into like a saturated grey? I tried to put the Color="#" code in their, but didn't have any effect.

Yes you can do this.

Where ever you see:
PHP Code:

class="vbmenu_control" 

Replace it with:
PHP Code:

bgcolor="#FFFFFF" 

But put the color you want in where you see FFFFFF.

Hope that helps you.

Rick Sample 05-23-2004 12:58 AM

Quote:

Originally Posted by attroll
Yes you can do this.

Where ever you see:
PHP Code:

class="vbmenu_control" 

Replace it with:
PHP Code:

bgcolor="#FFFFFF" 

But put the color you want in where you see FFFFFF.

Hope that helps you.


hmm...doesn't work. It changes the first links color then resizes it double the width, any suggestions???

Rick Sample 05-23-2004 01:15 AM

EDIT here is what its exaclty doing: I changed them to it and it goes to the color I wan't, but the text isn't white and its wider. Is their anyway to fix this???


thanks, see attached file :)

attroll 05-23-2004 04:37 AM

Quote:

Originally Posted by muscle-mustangs
EDIT here is what its exaclty doing: I changed them to it and it goes to the color I wan't, but the text isn't white and its wider. Is their anyway to fix this???


thanks, see attached file :)

This can be done I am sure. But it will take more hacking then I thought. The reason being is that when you remove the class="vbmenu_control" out of the line it removes all the other settings that are stored in "vbmenu_control" which are set in your ADMINCP. This includes your background color, font size, font color, and your links like normal, visted and hovor over link. So if we change it like we did then we lose all those stored settings. We can fix the font by putting <strong> in from of the test and </strong> after the text. But that does not bring the color back to white that only thickens the text. It also makes the text underlined because you removed the "vbmenu_control" code.

I think this can be done but it would be a royal pain in the butt.

Another option you might want to consider is going back to the origanl that I first gave you and replce replacing the vbmenu_control with vbmenu_option and see if the colors will work with that. You can alos try vbmenu_register.

There are all set in your Style Manager

Rick Sample 05-23-2004 09:23 AM

cool, I changed it to <td class="thead">

I think it looks a lot better than 2 red bards now, what do you think?

attroll 05-23-2004 01:18 PM

Quote:

Originally Posted by muscle-mustangs
cool, I changed it to <td class="thead">

I think it looks a lot better than 2 red bards now, what do you think?

Yes it looks good. I am glad you got it all worked out.

chrisvonc 05-23-2004 01:32 PM

Hi, I just installed the 2nd option you worked up for the additional navbar to be directly above the welcome panel. Very nice, thank you!

I am seeing one issue... the table border became twice at thick and is not bordered along the top edge. Any clues? This is a vB 3.0.1 forum. here is a shot of what I mean.

Thanks!

attroll 05-23-2004 03:41 PM

Quote:

Originally Posted by chrisvonc
Hi, I just installed the 2nd option you worked up for the additional navbar to be directly above the welcome panel. Very nice, thank you!

I am seeing one issue... the table border became twice at thick and is not bordered along the top edge. Any clues? This is a vB 3.0.1 forum. here is a shot of what I mean.

Thanks!

I looked at your site and noticed that the border colors are the same as the background color so people should not see a different color. It should blend right in. I just played with it and the outside borders are the same size on mine with and without this hack. So you must mean the think black line under the link names?

If that is what you are talking about. I tried fixing that and could not figure it out. I will have to play with it some more.

chrisvonc 05-23-2004 04:16 PM

Oopps.. I had installed it on my local dev forum. Its now on the production site so you can see it live.

Yes, sorry I didnt explain it correctly, the line under the new links seems to be double thick.

Thanks!

attroll 05-23-2004 04:21 PM

Quote:

Originally Posted by chrisvonc
Oopps.. I had installed it on my local dev forum. Its now on the production site so you can see it live.

Yes, sorry I didnt explain it correctly, the line under the new links seems to be double thick.

Thanks!

Yes that was what I thought you meant.

I played with that for one hour last night and could not figure it out. I think it has something to do with putting a table within a table. But can not inderstand why the bottom one does not do that.

Anub1s 05-25-2004 11:20 PM

also i was waiting for something like this

a lot of thanks =D

RichieBoy67 05-30-2004 02:09 AM

Great..Just installed... This hack helps me big time because my navbar is so hard to add anything too..

Thanks!!

The Realist 05-30-2004 11:41 AM

Installed - Thanks.

Rich 05-30-2004 01:27 PM

Hello,
I have been playing with this,and I placed it under my current navbar. My question is,how do I remove the space between the 2? I want them to sit directly underneath one another without any space. Currently,there is a space the width of a navbar.


All times are GMT. The time now is 05:03 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.01600 seconds
  • Memory Usage 1,896KB
  • 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
  • (10)bbcode_code_printable
  • (19)bbcode_php_printable
  • (16)bbcode_quote_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
  • (40)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