Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-10-2008, 01:06 AM
3pixelchicks 3pixelchicks is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Integrated header and navigation across website

I have a php logo and nav that I want to incorporate across the entire site - including in the forums. I'm very new at this and pretty clueless, but I do have the header.php file that seems to work ok: www.3pixelchicks.com/header.php

I've searched the forums, and I think I need to add to add this code to a global start plugin:

ob_start();
include('home/www3pix/public_html/header.php');
$includedphp = ob_get_contents();
ob_end_clean();

I've activated the plugins, but now I'm stuck. I tried adding: $includedphp in the header template, but I'm not sure if that's right. It gives me an error message in the forum. Here's the error:
Warning: include() [function.include]: Failed opening 'home/www3pix/public_html/header.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in [path]/global.php(383) : eval()'d code on line 2

If someone could let me know what I'm doing wrong, and which template (header? header includes? something else altogether??) I need to add $includedphp in, I would very much appreciate it! I apologize for being a total newbie here - it seems like the more I learn, the less I know.
Reply With Quote
  #2  
Old 05-10-2008, 05:02 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
ob_start();
include(
'/home/www3pix/public_html/header.php');
$includedphp ob_get_contents();
ob_end_clean(); 
Reply With Quote
  #3  
Old 05-10-2008, 11:37 AM
3pixelchicks 3pixelchicks is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Dismounted - I think that's the exact code I already added into the global start plug in. But I don't know what to do next! Putting $includedphp in the header template gives me an error in the forums: www.3pixelchicks.com/henhouse . I don't know if I'm putting it in the right place in the header (or if you can put it anywhere), or if it maybe belongs somewhere else, of if there is something else in the admin cp I need to do. Thanks for any help!
Reply With Quote
  #4  
Old 05-10-2008, 11:49 AM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Look closely .
Reply With Quote
  #5  
Old 05-10-2008, 11:53 AM
3pixelchicks 3pixelchicks is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Dang - that little slash! I copied and pasted your code and now it works!!!! YAY!!! Thank you sooo much. Now off to see if the the photopost gallery is integrated too... You rock!

--------------- Added [DATE]1210424934[/DATE] at [TIME]1210424934[/TIME] ---------------

Ok - I knew it was too good to be true! It worked once, and now when I refresh, I ONLY see the header - no vbulletin content!! Any clue what I've done wrong now???
Reply With Quote
  #6  
Old 05-10-2008, 12:36 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try using this:
PHP Code:
ob_start();
include(
'/home/www3pix/public_html/header.php');
$includedheader ob_get_contents();
ob_end_clean(); 
And using $includedheader in the template.
Reply With Quote
  #7  
Old 05-10-2008, 01:39 PM
3pixelchicks 3pixelchicks is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That works the same way - still nothing after the header. I think there must be something wrong with my header.php file...what I can't figure out is how I got it to work right once, and now - nothing!
Reply With Quote
  #8  
Old 05-10-2008, 01:46 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you post that file?
Reply With Quote
  #9  
Old 05-10-2008, 01:55 PM
3pixelchicks 3pixelchicks is offline
 
Join Date: May 2008
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go:
PHP Code:
<?php include("headernav.html");

 
?>
And the headernav.html code:

PHP Code:
<html>
<
head>
<
title>3 Pixel Chicks</title>
<
script src="http://www.3pixelchicks.com/rollover.js" type="text/javascript"></script>
<
link href="http://www.3pixelchicks.com/headerstyle.css" type="text/css" rel="stylesheet" />
</
head>
<
body>
<
div id="tplHeadWrapper">
  <
div id="tplHeadContent">
    <
div id="tplHeadTitle">

      <
div id="tplHeadNavbar">
    <
a href="http://www.3pixelchicks.com/zencart/index.php"><img src="/images/market.jpg" border="0" alt="Store" class="imgover"/></a>

    <
img src="/images/dot.jpg" />
    <
a href="http://www.3pixelchicks.com/henhouse/index.php"><img src="/images/henhouse.jpg" border="0" alt="Forum" class="imgover"/></a>
    <
img src="/images/dot.jpg" />
    <
a href="http://www.3pixelchicks.com/coop/index.php"><img src="/images/coop.jpg" border="0" alt="Gallery" class="imgover" /></a>
    <
img src="/images/dot.jpg" />
        <
a href="http://www.3pixelchicks.com/blog/index.php"><img src="/images/chickenfeed.jpg" border="0" alt="Blog" class="imgover"/></a>
    <
img src="/images/dot.jpg" />
    <
a href="http://www.3pixelchicks.com/freebies/index.php"><img src="/images/freerange.jpg" border="0" alt="Freebies" class="imgover"/></a
    </
body>
    </
html
And headerstyle.css (just in case that's what's messing everything up...)

PHP Code:
#tplHeadWrapper { background: url('/images/header_center.jpg');  height: 230px; overflow: hidden; margin: 0; }
#tplHeadContent {  background: url('/images/header_left.jpg') top left no-repeat; height: 215px; margin: 0; text-align: right; }
#tplHeadTitle {  background: url('/images/header_right.jpg') top right no-repeat; height: 218px; margin: 0; text-align: right; }
#tplHeadNavbar {  text-align: center; padding: 180px 20px 0 0; } 
Reply With Quote
  #10  
Old 05-10-2008, 02:05 PM
Dismounted's Avatar
Dismounted Dismounted is offline
 
Join Date: Jun 2005
Location: Melbourne, Australia
Posts: 15,047
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where are you putting the variable?
Reply With Quote
Reply

Thread Tools
Display Modes

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 05:00 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.05327 seconds
  • Memory Usage 2,273KB
  • Queries Executed 13 (?)
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
  • (5)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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