Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2005, 02:31 AM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Duplicate breadcrumb on page

Folks-

Okay, i'm stumped. Heeeeelp!

I want to split the navbar and breadcrumb, so I can duplicate the breadcrumb at the bottom of the page.

I created a new template called "navbar_breadcrumb", added a fetch_template line to the phpinclude_start template, and inserted a $navbar_breadcrumb variable into the proper pages, then copied the entire navbar script into navbar_breadcrumb.

Now, here's the strange part....

When I display the page, the breadcrumb that is produced by the navbar template works, the breadcrumb that is produced by navbar_breadcrumb does not! They are the *same* code.

The reason that it is not working seems to be that there is a conditional in the breadcrumb code:

PHP Code:
<if condition="is_array($navbits)"
that is testing true in the navbar template and false in the navbar_breadcrumb template.

But I don't know why. Any suggestions, ideas?

--don
Reply With Quote
  #2  
Old 07-27-2005, 02:40 AM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

$navbits and $navbar are defined before the page is displayed, whereas php_include code is output at the end of the header template. Try putting it near the end of global.php.

I'm gonna go test this to double check, so I'll be back in a few mins.
---

Okay I got it working putting

PHP Code:
eval('$navbar2 = "' fetch_template('navbar2') . '";'); 
Just below (global.php)
PHP Code:
eval('$header = "' fetch_template('header') . '";'); 
Also, it seems I have to add $navbar2 into every template I want it used in... The easiest way I see doing this is a find replace: replace every instance of "$footer" and replace it with "$navbar2 $footer".

(well replace every navbar2 with navbar_breadcrumb, as that is what you used).
Reply With Quote
  #3  
Old 07-27-2005, 03:55 AM
darnoldy darnoldy is offline
 
Join Date: Dec 2004
Posts: 234
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by TheSpecialist
Try putting it near the end of global.php.
First, thanks for helping!

Okay, I edited global.php--and nothing blew up <g>! However, still no joy. Although the template displays, the breadcrumb won't leave crumbs.

If you look at the attachment, you can see what I mean. The upper navbar/breadcrumb is produced by $navbar, the lower navbar/breadcrumb is produced by $navbar_breadcrumb. Again, these two template contain exactly the same code.

:surprised: don
Attached Images
File Type: gif menus.gif (13.0 KB, 0 views)
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 07:07 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
  • Page Generation 0.04135 seconds
  • Memory Usage 2,204KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (3)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)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
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete