![]() |
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. |
have you got a demo?
|
Quote:
There's a version of it at www.underlight.com/VBB Kathi |
i think ill give it a bash
it looks good cheers |
i did it word for word and nothing happened
do you think this is because i run vbportal? |
Quote:
Kathi |
i got it working
heres what i done *set the nav bar settings to yes like you said *wrapped the $altnavbits round a smallfont like this <smallfont>$altnavbits</smallfont>, to make the text to appear smaller (obviously) * removed the spaces before the imagefolders in functions.php the casvertline.gif doesnt look right though, see how its yellow instead of white look at my attached image |
Quote:
Kathi |
thanks - appreciate it
also, i didnt like the big white space which this new bar left at the right so i added a banner in this space using this code Code:
<table border=0> |
Nice use. Underlight's nav buttons will be taking up the space on that site, but I don't know what anyone else is using, so I just leave it up to them.
Now if only you could see the light and admit that Albion rules :) Kathi |
are you talking about albion rovers or stirling albion
|
Plymouth Albion :P
Although I doubt they're in the FA anymore, they were kind of borderline a decade ago when I lived in Plymouth :) Kathi |
down the old south west coast
dont know much about Plymouth (ive been to torquay though) would i have to change that image in photoshop or would psp do |
It's a .gif, anything should do it. If you get it fixed, could you stick it up here? I only included the custom ones from when that site migrated from UBB to vB years ago, so they're probably not right for everyone anyways.
Kathi |
i probably wont get a chance to do it today but when i do, ill post them here
:) |
How do you add something to the setting field in the database, per your first set of directions???
Through MySQLAdmin? |
I used phpMyAdmin, select the database to modify (vbulletin or whatever you called it at install time).
A textarea box is there letting you manually run queries on the database. Just add the line to that and hit go and it'll update the database. I'm going to try and get this out using the install_ script that tubedogg et al use, when I figure out how to add it to one of them :p Kathi |
I have admin v 1 and I dont see a go button, I select the forum db and then the setting on the right side, but then dont see where to add it.....
|
This has changed since the last version
In admin/functions.php: Find: code:-------------------------------------------------------------------------------- $altnavbits .= "<br>$altnavprefix<img src=\"{ imagesfolder}/cascade/casendline.gif\"><img src=\"{ imagesfolder}/cascade/casicon.gif\"> $val\n"; $altnavprefix .= "<img src=\"{ imagesfolder}/cascade/casvertline.gif\">"; } -------------------------------------------------------------------------------- That is not in my functions.php cause I never did the intial release.....so where does it go? I finally did the query using MySQLGUI of www.mysql.com worked great. |
good hack :)
|
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:
|
I have 2.2.1 which is hte latest.....I will try this when I get back to work tomorrow.
|
Ok I found it, but it did not work.
Quote:
|
Find
Code:
if ($altnavbar) { Code:
eval("\$navbar = \"".gettemplate("navbaralt")."\";"); Code:
if ($altnavbar) { Code:
$navbits = explode(gettemplate("nav_joiner"),$navbits); Code:
if ($altnavbar) { Kathi |
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> |
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); Kathi |
Great hack! Thanks, i gonna install this one later.
|
Still nothing....this sucks, I think I did not do somethign right.
|
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 |
LOL I dont have portal, but I did not do the thing with the control panel, where is that?
|
*whimper*
Guess who forgot a step in the instructions :( When you ran the database query in the instructions, you set up a control panel flag to tell the system to use the alternative nav bar instead of the linear one ... Go to your admin CP, in the 5th section down will be an entry "Alternative Nav Bar". Select "Yes" for that, then submit the chaanges, then click on control panel again and submit it again. For some reason, it didn't take for some people on the first submit. Then you should be running :p Kathi post 1 updated to reflect my being blonde |
OK it works now, just the icons do not show up right.....any idea they are broken links
here is a broken link http://rikernet/forum/{%20imagesfolder}/cascade/casicon.gif |
Did you download cascade.zip and put the 3 image files in it in your folder images/cascade?
Kathi |
ok I had to change your image links...one does not work still though....here is the code, am I missing something?
Code:
if ($altnavbar) { THE TOP IMAGE STILL COMES UP WITH THIS Code:
http://rikernet/forum/{%20imagesfolder}/cascade/casicon.gif |
screenshot
|
Ummmm, that %20 means you didn't take the space out after a {
Check your navaltbar template code. Kathi |
Yes but where does that space come from?? I posted my exact code from the functions.php up there.....any ideas? It looks great so far.
|
Check both the code to inout into the .php file and the code in your templastes. It looks a lot like you have a { imagesfolder} line instead of an {\imagesfolder} line (\ added to try and get around that being parsed)
|
Code:
<a href="java script:window.location=window.location"><img src="images/casicon.gif" border="0" align="middle" alt="$bbtitle : Powered by vBulletin version $templateversion"></a> Great hack, now that I got it to work.... |
Here is an XP folder if you want to change the blue one.....
: ) Just thought I would add this for my troubles |
All times are GMT. The time now is 03:51 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|