vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Navbar Question. (https://vborg.vbsupport.ru/showthread.php?t=255270)

FoOpLe 12-15-2010 04:42 PM

Navbar Question.
 
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

Quote:

Originally Posted by FoOpLe (Post 2134330)
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 [DATE]1292462644[/DATE] at [TIME]1292462644[/TIME] ---------------

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

Quote:

Originally Posted by FoOpLe (Post 2134348)
My site is vB4.1, I will look Into that link you posted, if I have any more questions I will post later.

--------------- Added [DATE]1292462644[/DATE] at [TIME]1292462644[/TIME] ---------------

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/showt...avbar-template

FoOpLe 12-15-2010 11:41 PM

PHP Code:

vB_Template::preRegister('header', array('navbar' => $navbar)); 

Am I close? Haha

--------------- Added [DATE]1292464749[/DATE] at [TIME]1292464749[/TIME] ---------------

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

Quote:

Originally Posted by FoOpLe (Post 2134537)
PHP Code:

vB_Template::preRegister('header', array('navbar' => $navbar)); 

Am I close? Haha

--------------- Added [DATE]1292464749[/DATE] at [TIME]1292464749[/TIME] ---------------

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/showt...ons-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 [DATE]1292533979[/DATE] at [TIME]1292533979[/TIME] ---------------

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

Quote:

Originally Posted by FoOpLe (Post 2134958)
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 [DATE]1292533979[/DATE] at [TIME]1292533979[/TIME] ---------------

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:
Code:

        {vb:raw header}

        {vb:raw navbar}

to:
Code:

        {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

Quote:

Originally Posted by BirdOPrey5 (Post 2135009)
What about if you just edit your templates and swap the header and navbar call?

example: in forumdisplay template change:
Code:

        {vb:raw header}

        {vb:raw navbar}

to:
Code:

        {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...


All times are GMT. The time now is 06:40 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.01291 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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