Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 09-29-2011, 11:44 AM
helmica helmica is offline
 
Join Date: Mar 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default move code from navbar to header

hi all,
I have tried to move the following code from navbar to header;

Code:
<div id="breadcrumb" class="breadcrumb">
<ul class="floatcontainer">
<li class="navbithome"><a href="index.php{vb:raw session.sessionurl_q}" accesskey="1"><img src="{vb:stylevar imgdir_misc}/navbit-home.png" alt="{vb:rawphrase home}" /></a></li>
{vb:raw navbits.breadcrumb}
{vb:raw navbits.lastelement}
</ul>
</div>

When the code is executed from navbar my Breadcrumb is showing in front end as expected. When i move the code from navbar to the header section it will just show the "house" before the breadcrumblinks and no links is showing.

Is it possible to move the code, and if so, what am i doing wrong?

Best regards,

saad
Reply With Quote
  #2  
Old 09-29-2011, 12:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not working because you would need to register the navbits variable to the header template. You could try making a plugin with this code:

PHP Code:
global $navbits;
$navbits = array();
vB_Template::preRegister('header', array('navbits' => $navbits)); 

but there's also the issue of when the header template is rendered. Normally it wouldn't happen until another template was rendered, which I think means that this method could work. But I think it's also possible that a plugin could cause a template to be rendered earlier in which case this wouldn't work.
Reply With Quote
  #3  
Old 09-29-2011, 01:59 PM
helmica helmica is offline
 
Join Date: Mar 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi kh99,

thanks for your reply
i use new template not the default template
i try your code and not working

please continue help me
regards

helmica
Reply With Quote
  #4  
Old 09-29-2011, 03:21 PM
nhawk nhawk is offline
 
Join Date: Jan 2011
Posts: 1,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You can move the breadcrumb anywhere on the page you want without editing the header or navbar templates.

Go to ACP->Styles & Templates->Style Manager.

For your template, select Edit Templates. Then go to CSS Templates and select vbulletin-chrome.css

Locate this code in the template..
Code:
/*************************************************/
/* BREADCRUMB */

.breadcrumb > ul {
	background:transparent url({vb:stylevar imgdir_misc}/navbit-home.png) {vb:stylevar left} top no-repeat;
	border:none;
}
And replace with this..
Code:
/*************************************************/
/* BREADCRUMB */

.breadcrumb > ul {
	background:transparent url({vb:stylevar imgdir_misc}/navbit-home.png) {vb:stylevar left} top no-repeat;
	border:none;
	position:absolute;
	top:60px;
	left:450px;
}
On the standard vB template, that will place the Breadcrumb on the same line as the navtabs next to the What's New button.

You can adjust it's position by changing the top and left values to put it anywhere on the page you want.

EDIT: For some custom templates, you may need to find the breadcrumb in additional.css.
Reply With Quote
  #5  
Old 10-03-2011, 06:23 AM
helmica helmica is offline
 
Join Date: Mar 2008
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi nhawk,

thanks for you reply
i replace the code with code that you provide and nothing occur

please continue help me

thanks in advance for your help

regards

helmica
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 02:52 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.11168 seconds
  • Memory Usage 2,197KB
  • Queries Executed 11 (?)
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
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete