The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Hi all
Well, here goes my first v2 hack This hack will replace the linear nav bar (Board Title > Category > Forum > sub forum) nav bar with a cascading one, where the categories drop down and indent. Unfortunately, this hack will only change the navbar that is generated by vB, it won't change the hard coded nav bars in pages like the member list/profile. I still have to figure out how to do that. The hack is clunky, probably could be done in 4 lines of code instead of what I've done it in, and be cleaner, but I've tested it down to a depth of 6 and it seems to work clean, and that's all that matters right now I'm working on changing the hard coded sections to use the CP flag, so that this can work on the site and change if the CP changes. Kathi File: Post #41 Demo: http://www.underlight.com/VBB Installer file for latest version now at Post #41. If you have installed this before the timestamp of that post, you should be fine. Show Your Support
|
Comments |
#22
|
|||
|
|||
In my 2.2.1 functions.php file, it's in
function makenavbar Look for Code:
if ($altnavbar) { If you don't have that in your functions.php, then I don't think you have v2.2.1, unless your vBPortal over-wrote functions.php, in which case I have no idea, sorry. I'm fairly sure the forums rules say I can't post the entire function to look for here. Kathi Quote:
|
#23
|
||||
|
||||
I have 2.2.1 which is hte latest.....I will try this when I get back to work tomorrow.
|
#24
|
||||
|
||||
Ok I found it, but it did not work.
Quote:
|
#25
|
|||
|
|||
Find
Code:
if ($altnavbar) { Code:
eval("\$navbar = \"".gettemplate("navbaralt")."\";"); Code:
if ($altnavbar) { Code:
$navbits = explode(gettemplate("nav_joiner"),$navbits); while (list($key,$val)=each($navbits)) { if($key == 0) { $altnavbits = "<br><img src=\"vbimages/cascade/casendline.gif\"><img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } elseif ($key == 1) { $altnavprefix = "<img src=\"vbimages/cascade/casvertline.gif\"><img src=\"vbimages/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } else { $space_count = (13 * ($key - 1)); $altnavprefix = "<img src=\"vbimages/cascade/casvertline.gif\"><img src=\"vbimages/space.gif\" width=\"".$space_count."\" height=\"1\"><img src=\"vbimages/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } } Code:
if ($altnavbar) { $navbits = explode(gettemplate("nav_joiner"),$navbits); while (list($key,$val)=each($navbits)) { if($key == 0) { $altnavbits = "<br><img src=\"vbimages/cascade/casendline.gif\"><img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } elseif ($key == 1) { $altnavprefix = "<img src=\"vbimages/cascade/casvertline.gif\"><img src=\"vbimages/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } else { $space_count = (13 * ($key - 1)); $altnavprefix = "<img src=\"vbimages/cascade/casvertline.gif\"><img src=\"vbimages/space.gif\" width=\"".$space_count."\" height=\"1\"><img src=\"vbimages/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"vbimages/cascade/casicon.gif\"> $val\n"; } } eval("\$navbar = \"".gettemplate("navbaralt")."\";"); } else { eval("\$navbar = \"".gettemplate("navbar")."\";"); } return $navbar; Kathi |
#26
|
||||
|
||||
Its not doing anything in the forum, I must be an idiot, I added the template called navbaralt and it includes this
Code:
<a href="java script:window.location=window.location"><img src="{ imagesfolder}/cascade/casicon.gif" border="0" align="middle" alt="$bbtitle : Powered by vBulletin version $templateversion"></a> <normalfont><b><a href="index.php?s=$session[sessionhash]">$bbtitle</a></b></normalfont> $altnavbits |
#27
|
|||
|
|||
I'm not sure, I know -I- did something -wrong- with the last set of instructions, I forgot to put a space after the {'s so it was giving you the wrong instructions. The block I say yo put after the if ($altnavbar) { part should read:
Code:
$navbits = explode(gettemplate("nav_joiner"),$navbits); while (list($key,$val)=each($navbits)) { if($key == 0) { $altnavbits = "<br><img src=\"{ imagesfolder}/cascade/casendline.gif\"><img src=\"{ imagesfolder}/cascade/casicon.gif\"> $val\n"; } elseif ($key == 1) { $altnavprefix = "<img src=\"{ imagesfolder}/cascade/casvertline.gif\"><img src=\"{ imagesfolder}/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"{ imagesfolder}/cascade/casicon.gif\"> $val\n"; } else { $space_count = (13 * ($key - 1)); $altnavprefix = "<img src=\"{ imagesfolder}/cascade/casvertline.gif\"><img src=\"{ imagesfolder}/space.gif\" width=\"".$space_count."\" height=\"1\"><img src=\"{ imagesfolder}/cascade/casendline.gif\">"; $altnavbits .= "<br>$altnavprefix<img src=\"{ imagesfolder}/cascade/casicon.gif\"> $val\n"; } } Kathi |
#28
|
||||
|
||||
Great hack! Thanks, i gonna install this one later.
|
#29
|
||||
|
||||
Still nothing....this sucks, I think I did not do somethign right.
|
#30
|
|||
|
|||
OK
Did you add the altnavbar variable to the database table setting? Did you submit the control panel options page -twice- with the "Use Alternative Nav Bar" set yo "Yes"? If you did and it's not working, and the instructions were followed, then it looks like the hack isn't compatible with vBPortal. Kathi |
#31
|
||||
|
||||
LOL I dont have portal, but I did not do the thing with the control panel, where is that?
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|