View Full Version : Navbar Question.
FoOpLe
12-15-2010, 04:42 PM
Hello, I was wondering if anybody on this site knows a way to put the vavbar on top of the page, and not under the header. similar to the navbar at http://game-tuts.com
It would be much appreciated if anybody on here can help me understand how to do something like this. Thanks.
TheLastSuperman
12-15-2010, 04:50 PM
Hello, I was wondering if anybody on this site knows a way to put the vavbar on top of the page, and not under the header. similar to the navbar at http://game-tuts.com
It would be much appreciated if anybody on here can help me understand how to do something like this. Thanks.
That's a vBulletin 4 site, is your site vB3 or vB4?
That will determine how you go about it as in 4.x you must register the variables so for example in that site you linked to they either made a custom navbar of their own based on code and css then removed the default or they registered all the correct variables and moved the actual navbar menu from the navbar template into the header template.
More info here about registering variables:
https://vborg.vbsupport.ru/showthread.php?t=228078
FoOpLe
12-15-2010, 05:22 PM
My site is vB4.1, I will look Into that link you posted, if I have any more questions I will post later.
--------------- Added 1292462644 at 1292462644 ---------------
What variables should I register for the navbar to be fully functional in the header template? I already have it moved and all, but it is not fully functional without the variables registered.
TheLastSuperman
12-15-2010, 11:32 PM
My site is vB4.1, I will look Into that link you posted, if I have any more questions I will post later.
--------------- Added 1292462644 at 1292462644 ---------------
What variables should I register for the navbar to be fully functional in the header template? I already have it moved and all, but it is not fully functional without the variables registered.
Foople, you will need to register any variable you see in the code properly!
Reference Lynne's tips here and you'll see how you can move the Facebook connect from the header into the navbar, once you graps that it's pretty much opposite yet a few more variables must be registered but the way to do it is there in Lynne's info ;).
http://www.vbulletin.com/forum/showthread.php?361140-Moving-Facebook-Connect-out-of-the-header-template-and-into-the-navbar-template
FoOpLe
12-15-2010, 11:41 PM
vB_Template::preRegister('header', array('navbar' => $navbar));
Am I close? Haha
--------------- Added 1292464749 at 1292464749 ---------------
Oh wait, this would have to be done before I deleted everything in the navbar template. Am I right? And I realized that I need to add variables, not an array right?
TheLastSuperman
12-16-2010, 05:32 AM
vB_Template::preRegister('header', array('navbar' => $navbar));
Am I close? Haha
--------------- Added 1292464749 at 1292464749 ---------------
Oh wait, this would have to be done before I deleted everything in the navbar template. Am I right? And I realized that I need to add variables, not an array right?
Well for example I noticed a post a while back where a member wanted the notifications in the footer...
http://www.vbulletin.com/forum/showthread.php?360905-How-can-I-change-the-notifications-menu-place
Lynne was very helpful and so was I, that member learned and I want you to as well so what you need to do is some more testing with this, try things out and check out some articles here and even mods here that deal with modifying the header or navbar remember you can download the mods to install or to view and learn you just can't copy/paste it off as your own however you have one gigantic pool of knowledge right in front of you so jump in :cool:.
And yes your correct about removing the code from the navbar that your pasting into the header if you have the same variable in both it will not display properly.
FoOpLe
12-16-2010, 06:29 PM
Okay :P, I will do a little more research instead of taking the easy way out, I'm just kinda lazy haha. But I am a quick learner :D
--------------- Added 1292533979 at 1292533979 ---------------
Okay, I think I am finally getting the hang of this, all of the {vb:raw xxxxxxx) from the navbar that are not in the header file need to be preregistered, but does that cover all of the {vb:rawphrase xxxxxxxx} or do those have to be preregistered also?
TheLastSuperman
12-16-2010, 08:34 PM
Okay :P, I will do a little more research instead of taking the easy way out, I'm just kinda lazy haha. But I am a quick learner :D
--------------- Added 1292533979 at 1292533979 ---------------
Okay, I think I am finally getting the hang of this, all of the {vb:raw xxxxxxx) from the navbar that are not in the header file need to be preregistered, but does that cover all of the {vb:rawphrase xxxxxxxx} or do those have to be preregistered also?
Well (lol) does it? If not then register the rest :p
Remember that's not something you should have to await a reply on ;).
BirdOPrey5
12-16-2010, 08:36 PM
What about if you just edit your templates and swap the header and navbar call?
example: in forumdisplay template change:
{vb:raw header}
{vb:raw navbar}
to:
{vb:raw navbar}
{vb:raw header}
I just tested this and it worked fine... sure you'll want to edit the navbar a little maybe to make it look better at the top but it works.
You'll have to make this change in every template that has the navbar in it (you can search templates for "{vb:raw navbar}") which is a bit tedious but a lot easier than erasing exsting templates and pre-registering variables.
TheLastSuperman
12-16-2010, 08:38 PM
What about if you just edit your templates and swap the header and navbar call?
example: in forumdisplay template change:
{vb:raw header}
{vb:raw navbar}
to:
{vb:raw navbar}
{vb:raw header}
I just tested this and it worked fine... sure you'll want to edit the navbar a little maybe to make it look better at the top but it works.
You'll have to make this change in every template that has the navbar in it (you can search templates for "{vb:raw navbar}") which is a bit tedious but a lot easier than erasing exsting templates and pre-registering variables.
Brilliant suggestion!
Mike runs off to hide behind a corner...
BirdOPrey5
12-16-2010, 08:49 PM
I was hesitant to post this because you guys already seemed so invested in this. :D But it's actually a pretty neat design, if my live forum was VB4 I'd really consider it.
TheLastSuperman
12-16-2010, 09:05 PM
I was hesitant to post this because you guys already seemed so invested in this. :D But it's actually a pretty neat design, if my live forum was VB4 I'd really consider it.
Well admittedly I did slightly confused this thread with this one:
https://vborg.vbsupport.ru/showthread.php?t=255327
Thinking it *had* to be moved but your suggestion was dead on for Foople ;).
FoOpLe
12-17-2010, 01:13 AM
I succeeded at last! :D, Thanks to the both of you for helping me out. And I still would like to learn more about vB so expect me back in the near future.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.