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
  #2  
Old 02-22-2003, 03:03 AM
marcel-ea marcel-ea is offline
 
Join Date: Oct 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Work! Great

but on my 2.2.9

This line

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

is withount the point after navbits
Reply With Quote
  #3  
Old 02-22-2003, 03:15 AM
N!ck N!ck is offline
 
Join Date: Mar 2002
Location: Lake Havasu City, AZ
Posts: 886
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ah, you're right...i need to modify my instructions a little bit. make sure you put that dot in or it won't work right.
Reply With Quote
  #4  
Old 02-22-2003, 02:34 PM
Overgrow's Avatar
Overgrow Overgrow is offline
 
Join Date: Nov 2001
Posts: 320
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Excellent Nick! I always find myself frustrated on other people's vBs that don't have a clear link back to the home page. (vBulletin.com being one obvious example!) It's poor UI since most people enter through the home page and expect that to be the top level of breadcrumb navigation.
Reply With Quote
  #5  
Old 02-22-2003, 02:49 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome idea

- miSt
Reply With Quote
  #6  
Old 02-22-2003, 03:42 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Remember that you should change other templates that don't use the makenavbar function to make the breadcrumb. But it's a really good idea! thanks!
Reply With Quote
  #7  
Old 02-23-2003, 02:59 AM
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 JulianD
Remember that you should change other templates that don't use the makenavbar function to make the breadcrumb. But it's a really good idea! thanks!
Actually, I thought of that, but I don't agree. Things like the calendar or user control panel should be just under the top level in my opinion. It's just a matter of template editing if you want them to be below your forums.
Reply With Quote
  #8  
Old 02-23-2003, 03:03 AM
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 Overgrow
Excellent Nick! I always find myself frustrated on other people's vBs that don't have a clear link back to the home page. (vBulletin.com being one obvious example!) It's poor UI since most people enter through the home page and expect that to be the top level of breadcrumb navigation.
wow, haven't seen anything from you in a long time...glad to see you're still around

thanks
Reply With Quote
  #9  
Old 02-23-2003, 07:38 PM
Lacrosse Boy's Avatar
Lacrosse Boy Lacrosse Boy is offline
 
Join Date: Feb 2003
Location: MN
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #10  
Old 02-25-2003, 12:55 AM
FleaBag's Avatar
FleaBag FleaBag is offline
 
Join Date: Dec 2001
Posts: 1,674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
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 10:43 AM.


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.05222 seconds
  • Memory Usage 2,294KB
  • Queries Executed 23 (?)
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
  • (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
  • (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