Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
Navbar Mini-Hack Details »»
Navbar Mini-Hack
Version: 1.00, by N!ck N!ck is offline
Developer Last Online: Oct 2008 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 02-21-2003 Last Update: Never Installs: 6
 
No support by the author.

This mini-hack will add Forums to your navbar in folders and threads. This is useful if your forums are not the highest level of hierarchy on your site.

For example, if you have a thread title "Thread" in a forum "Folder", your navbar shows:

MySite.com Forums > Folder > Thread

But what if MySite.com is a thing of its own, and you want MySite.com to be the highest level in the hierarchy. This hack (combined with changing $bbtitle to your site title), will change that to:

MySite.com > Forums > Folder > Thread

It will only work in threads and forums, however, because I feel that the calendar, user cp, etc. are their own things and don't really need to be on a lower level than the forums. Also, these things can be edited in your templates if you really care.

If you don't understand what this does, feel free to ask.

Anyway, to do this little hack, open functions.php in your admin folder.

In functions.php, find:
PHP Code:
    $navbits=makenav($id,$idtype,$highlightlast);

    if (
$altnavbar) {
        
$navbits explode(gettemplate("nav_joiner"),$navbits);
        while (list(
$key,$val)=each($navbits)) { 
Replace it with:
PHP Code:
    $nav_title="Forums";
    
$nav_url="forums.php?s=".$session[sessionhash];
    eval(
"\$navbits = \"".gettemplate("nav_linkon")."\";");
    eval(
"\$navbits .= \"".gettemplate("nav_joiner")."\";");

    
$navbits.=makenav($id,$idtype,$highlightlast);

    if (
$altnavbar) {
        
$navbits explode(gettemplate("nav_joiner"),$navbits);
        while (list(
$key,$val)=each($navbits)) { 
Make sure you change forums.php to the name of whatever file your index.php was renamed to.

Show Your Support

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

Comments
  #12  
Old 02-25-2003, 03:07 AM
Bad Bunny's Avatar
Bad Bunny Bad Bunny is offline
 
Join Date: Apr 2002
Posts: 555
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Lacrosse Boy
There only seems to be one problem with my hac of this: it shows it in the worng order. What do I do? Here's the example : http://www.metrodancecenter.com/vb/f...p?s=&forumid=2

Thanks!! :classic:
I beleive this hack assumes that you have renamed your forum index to another name, and instead have a different index in your forum folder. At least that is how I did it.
Reply With Quote
  #13  
Old 02-25-2003, 08:14 PM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've worked out how to do this through templates, no file hacking required - and it works perfectly.
Reply With Quote
  #14  
Old 03-05-2003, 09:32 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by GamerForums
Shouldn't I get a little credit for this idea?

I posted it here days ago!

As far as I know www.dragonninja.co.uk was the first site to do this.
No. I don't care when you posted it, I never saw your post. I was making it for my new site and thought perhaps it would be useful to others.

If you've ever seen any of my hacks that were in response to requests, then you should know that I always give credit for the idea. I am sorry I happened to have the same idea, but I promise you that your post had nothing to do with it.
Reply With Quote
  #15  
Old 03-05-2003, 09:37 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by GamerForums
I've worked out how to do this through templates, no file hacking required - and it works perfectly.
Oh? Would you mind releasing it, or are you just B.S.'ing me?
Reply With Quote
  #16  
Old 03-05-2003, 10:02 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Me too. Templates, that is.

In the navbar template, all you have to do is put the site url before the bburl. The BBURL is a static thing in all of the navbars, and you can put whatever you want in front of it.

Amy
Reply With Quote
  #17  
Old 03-12-2003, 01:40 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Granted. That works. Only thing is that it applies to any file (i.e. an addon) that uses the navbar templates. If you don't have any such files, then your method is effective and easy.
Reply With Quote
  #18  
Old 08-09-2003, 11:03 PM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But, to reiterate, template modifications will produce half-assed results.
Reply With Quote
  #19  
Old 05-07-2004, 06:35 PM
Machone Machone is offline
 
Join Date: May 2004
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea how to do this in vb3?
Reply With Quote
  #20  
Old 07-25-2005, 04:13 AM
Spacefreak Spacefreak is offline
 
Join Date: Jul 2005
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd am also spending a good deal of time trying to figure a way to make this work in vB3.0.7.

Any help would so be appreciated.
Reply With Quote
Reply

Thread Tools

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:08 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07349 seconds
  • Memory Usage 2,294KB
  • Queries Executed 24 (?)
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
  • (2)bbcode_php
  • (3)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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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