View Full Version : How do I move the navbits?
pein87
02-02-2010, 03:17 AM
I have a forum right now that does not have navbits because I tried to move them out of the navbar template. I failed and I really have no clue how to do it. My forums is NarutoSoul (http://www.narutosoul.com/forums/index.php). I added a custom welcome box below the in-progress navbar. Right between the new navbar and welcome box I want to add the navbits there. Does anyone know how to do this and could explain to me how its done please?
Drareg
02-05-2010, 09:43 AM
The navbits are located in the Header template, look for <!-- nav buttons bar --> and <!--/ nav buttons bar -->
Hell Bomb
02-05-2010, 03:51 PM
The navbits are located in the Header template, look for <!-- nav buttons bar --> and <!--/ nav buttons bar -->
Correction that is only on some styles on most styles its located on the navbar template.
pein87
02-06-2010, 04:12 AM
Yeah I know in the default its in the navbar section but If I remove that info and add it to the header template it will not show. That skin was coded by me and another admin of my site. I removed the code before and it will not show the navbits.
Heres the code I got from the navbar template
<if condition="is_array($navbits)">
<a href="#" onclick="history.back(1); return false;">
<img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" />
</a>
<span class="navbar">
<a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]
<if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" />
<else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
if you visit my site and go to the default skin I move it to the header template and it will not show anything but the forums title.
metalguy639
02-09-2010, 08:59 AM
So you want to add the navbits between the two menus? The navbar and the menu above it? If so then you may want to try and place the code at the very top of your navbar depending upon where the other menu resides in the templates. I would make sure that the menu above the navbar is in the header personally and then place the navbits code at the top of the navbar template. You can place that code in a table or just place it as it is.
pein87
02-12-2010, 04:27 AM
kind of I made a custom navbar using suckerfish since the original vbulletin one has its limits. I noticed that you can't display navbits outside of the navbar template. All my custom work is in the header template. The funny thing is it has $navbits = build_navbits($navbits); on index.php but if you move the above code form my last post into the header template it will not display the navbits. Does anyone know of away to move the navbits into the header template?
metalguy639
02-13-2010, 12:15 AM
Does anyone know of away to move the navbits into the header template?
Yep! Try this...
Open your header template and add this code where you want the navbits to show:
<table cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
</tr>
</table>
Now if you have already taken the navbits out of the navbar template, you should be done if not remove the following code from your navbar:
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1" width="100%">
<if condition="is_array($navbits)">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="bottom">
<td><a href="#" onclick="history.back(1); return false;"><img src="$stylevar[imgdir_misc]/navbits_start.gif" alt="$vbphrase[go_back]" border="0" /></a></td>
<td> </td>
<td width="100%"><span class="navbar"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1">$vboptions[bbtitle]</a></span> $navbits[breadcrumb]</td>
</tr>
<tr>
<td class="navbar" style="font-size:10pt; padding-top:1px" colspan="3"><if condition="$_SERVER['REQUEST_METHOD'] == 'POST'"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="" border="0" /><else /><a href="$navbar_reloadurl"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_finallink_$stylevar[textdirection].gif" alt="$vbphrase[reload_this_page]" border="0" /></a></if> <strong>$navbits[lastelement]</strong></td>
</tr>
</table>
<else />
<div class="navbar" style="font-size:10pt"><a href="$vboptions[forumhome].php$session[sessionurl_q]" accesskey="1"><img class="inlineimg" src="$stylevar[imgdir_misc]/navbits_start.gif" alt="" border="0" /></a> <strong>$vboptions[bbtitle]</strong></div>
</if>
</td>
</tr>
</table>
Keep in mind that this part of the code usually has the login/register code in it. you will have to not deleted that if you still have it in the navbar. If you want to move it to the header check here for info: https://vborg.vbsupport.ru/showthread.php?t=235490
pein87
02-14-2010, 08:07 AM
Thats what I already posted it will not show anything at all on other pages besides index.php.
metalguy639
02-14-2010, 01:37 PM
Ok in order for it to show on the other pages you may have to place that same code on the other pages that utilize the header areas. So try copying that code into the templates that contain the $navbar code in them. you can find that by using the Search In Templates function in your admincp. There are several of them off the top of my head I know that FORUMHOME, FORUMDISPLAY, SHOWTHREAD, SHOWTHREADSHOPOST & threadbit I believe are some of them. You would also have to put the code in the calendar template if you use it and the faq etc. That may be the only way to do it. I've done that before with a skin and had to pretty much put that code in every place I used that had the navbar code in it. It would be alot of places to stick the code but it would solve your problem of not having the navbits exactly where you wanted them.
pein87
02-14-2010, 10:47 PM
My question is if it has the navbits code in the php page why wouldn't it work by just moving the code to the header template since header shows on all pages? could I call the $navbar inside the header template and just remove it from the files?
metalguy639
02-15-2010, 08:01 AM
You might be able to call the $navbits code in your header. I do not remember if I've tried that yet or not. Its possible that might work. Usually in most cases code works no matter where you put it but in the header, footer & navbar for some reason. There are other codes that cannot be moved either without some headaches like the Who's Online box. So its basically a trail and error sort of thing.
pein87
02-15-2010, 08:25 AM
I tried adding the $navbar variable to the header template and so far so good next I'm going to test if I can remove the $navbar variable from forumhome, forumdisplay etc... to see if it works that way. Its such a huge work around for such a small code vbulletin needs to make the template system more flexible. Thanks for your help mate.
metalguy639
02-15-2010, 03:03 PM
No prob, hope it works.
Marco van Herwaarden
02-16-2010, 12:27 PM
Your problem might be due to the fact that not all data that is needed for the navbar is available when the header is put out. The easiest solution would be to not move it to the header.
BLykMik
02-18-2010, 06:23 AM
Your problem might be due to the fact that not all data that is needed for the navbar is available when the header is put out. The easiest solution would be to not move it to the header.
Could you hide it (visually) and then place a copy of it wherever you want in the style?
Marco van Herwaarden
02-18-2010, 12:44 PM
You can't as it is dynamic.
metalguy639
02-18-2010, 09:19 PM
Could you hide it (visually) and then place a copy of it wherever you want in the style?
That may be technically something you can do I'm not sure. you would need to use an if conditional for the usergroups and then define which usergroups see the navbar in that template. But again you would be edited quite a few templates to do that. I have not tested it but it may look something like this:
<if condition="is_member_of($vbulletin->userinfo, 5)">$navbar</if>
Change the red number to the usergroup id number you want to see the navbar.
Like I said I have not tested it and there's a good bet that it may not work. Be sure to back up your template first if you have custom coding already in it.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.