Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Details »»

Version: , by Moonwolf Moonwolf is offline
Developer Last Online: Nov 2003 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 01-07-2002 Last Update: Never Installs: 4
Is in Beta Stage  
No support by the author.

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-08-2002, 09:49 PM
Moonwolf Moonwolf is offline
 
Join Date: Jan 2002
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In my 2.2.1 functions.php file, it's in

function makenavbar

Look for

Code:
if ($altnavbar) {
which should be in that function declaration. My code replaces the string you can't find.

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:
Originally posted by Horizon
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.
Reply With Quote
  #23  
Old 01-08-2002, 10:38 PM
Horizon's Avatar
Horizon Horizon is offline
 
Join Date: Nov 2001
Location: Butler, NJ
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have 2.2.1 which is hte latest.....I will try this when I get back to work tomorrow.
Reply With Quote
  #24  
Old 01-09-2002, 05:58 PM
Horizon's Avatar
Horizon Horizon is offline
 
Join Date: Nov 2001
Location: Butler, NJ
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok I found it, but it did not work.

Quote:
if ($altnavbar) {
$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";
}
}
eval("\$navbar = \"".gettemplate("navbaralt")."\";");
} else {
eval("\$navbar = \"".gettemplate("navbar")."\";");
}
IS this spaced right?
Reply With Quote
  #25  
Old 01-09-2002, 06:06 PM
Moonwolf Moonwolf is offline
 
Join Date: Jan 2002
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Find
Code:
	if ($altnavbar) {
Delete everything after that to:
Code:
		eval("\$navbar = \"".gettemplate("navbaralt")."\";");
Then insert after the
Code:
	if ($altnavbar) {
the following:
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\">&nbsp;&nbsp;$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\">&nbsp;&nbsp;$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\">&nbsp;&nbsp;$val\n";
               }
		}
You should end up with a section that reads:
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\">&nbsp;&nbsp;$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\">&nbsp;&nbsp;$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\">&nbsp;&nbsp;$val\n";
               }
		}
		eval("\$navbar = \"".gettemplate("navbaralt")."\";");
	} else {
		eval("\$navbar = \"".gettemplate("navbar")."\";");
	}

	return $navbar;
It looks like you have the original version in there, which I changed

Kathi
Reply With Quote
  #26  
Old 01-09-2002, 06:10 PM
Horizon's Avatar
Horizon Horizon is offline
 
Join Date: Nov 2001
Location: Butler, NJ
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Then I did the change to Functions.php in the admin folder and then saved those files....did I not do something right?
Reply With Quote
  #27  
Old 01-09-2002, 06:46 PM
Moonwolf Moonwolf is offline
 
Join Date: Jan 2002
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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";
               }
		}
Take the space out after the {'s, and you should be set. Sorry about that.

Kathi
Reply With Quote
  #28  
Old 01-09-2002, 06:56 PM
Lesane's Avatar
Lesane Lesane is offline
 
Join Date: Oct 2001
Location: The Netherlands
Posts: 1,149
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack! Thanks, i gonna install this one later.
Reply With Quote
  #29  
Old 01-09-2002, 07:10 PM
Horizon's Avatar
Horizon Horizon is offline
 
Join Date: Nov 2001
Location: Butler, NJ
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Still nothing....this sucks, I think I did not do somethign right.
Reply With Quote
  #30  
Old 01-09-2002, 07:17 PM
Moonwolf Moonwolf is offline
 
Join Date: Jan 2002
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #31  
Old 01-09-2002, 07:18 PM
Horizon's Avatar
Horizon Horizon is offline
 
Join Date: Nov 2001
Location: Butler, NJ
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL I dont have portal, but I did not do the thing with the control panel, where is that?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:06 PM.


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.09588 seconds
  • Memory Usage 2,324KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete