MyBB Community Forums

Full Version: layout question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Greetings. I just installed my first BB- it's awesome- and went really smoothly!!! Thanks for sharing this awesome script!

I was wondering if anyone could help me with a layout situation...

I'd like to include the BB within a div in my current site layout- so as to have my normal header and nav at the top- and just include the forum within the actual site structure- for now I just have it launch in a blank window.

Thanks again!
you could try
<div id="mybb"><?php include(board_location/index.php); ?></div>

Not sure what that will give, but I think it will work
ahh- sorry about the misplaced post..

thanks so much xiao- i gave that a try as:
<div id="mybb"><?php include("forum/index.php"); ?></div>

and got:

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/local/lib/php') in /homepages/2/d193449934/htdocs/forum/index.php on line 17

I'm not sure where to go from here- has anyone else successfully done this? Again- thanks so much for the time and response!
That's because the global.php can't be found, it has to be in the same directory.
I think you should just modify your forum to become your site, not the other way around. WinkJust edit the template of your forum theme.
you could use frames, but frames have many downsides...
cold roses Wrote:ahh- sorry about the misplaced post..

thanks so much xiao- i gave that a try as:
<div id="mybb"><?php include("forum/index.php"); ?></div>

and got:

Fatal error: main() [function.require]: Failed opening required './global.php' (include_path='.:/usr/local/lib/php') in /homepages/2/d193449934/htdocs/forum/index.php on line 17

I'm not sure where to go from here- has anyone else successfully done this? Again- thanks so much for the time and response!

<div id="mybb"><?php
$cwd = getcwd();
chdir('forum');
include("index.php");
chdir($cwd);
 ?></div>
This code should work. Smile
amazing! thanks so much crakter! as well as kikkerkont and xiao... the problem with the template mod- it's just going to be a lot of work- i was hoping this would be easier... and as far as frames- that would work i suppose... but it would kill my pride a bit too much. hahah the site is all css/layers based... thanks though!!!

crakter- your idea worked... however just above the actual forum, i'm getting this error:

Warning: Cannot modify header information - headers already sent by (output started at /homepages/2/d193449934/htdocs/interact.php:11) in /homepages/2/d193449934/htdocs/forum/inc/functions.php on line 1133

Warning: Cannot modify header information - headers already sent by (output started at /homepages/2/d193449934/htdocs/interact.php:11) in /homepages/2/d193449934/htdocs/forum/inc/functions.php on line 78

and none of the bullet graphics are showing up...

any ideas?

thanks!
Hmm. Okey. Do this instead.
Add
<?php
$cwd = getcwd();
chdir('forum');

ob_start();
include("index.php");
$output = ob_get_contents();
ob_end_clean();
$output = str_replace('"'.$theme['imgdir'].'/', '"forum/'.$theme['imgdir'].'/', $output); 

chdir($cwd);
?>
To the very top of your page.
Then you have to use:
<div id="mybb"><?php
echo $output;
?></div>

That should work.
ahhh- thank you so much crakter!!! so so close- everything is there and in place now. just getting this just above the forums:

Warning: Cannot modify header information - headers already sent by (output started at /homepages/2/d193449934/htdocs/interact.php:11) in /homepages/2/d193449934/htdocs/forum/inc/functions.php on line 1133

Warning: Cannot modify header information - headers already sent by (output started at /homepages/2/d193449934/htdocs/interact.php:11) in /homepages/2/d193449934/htdocs/forum/inc/functions.php on line 1133

Warning: Cannot modify header information - headers already sent by (output started at /homepages/2/d193449934/htdocs/interact.php:11) in /homepages/2/d193449934/htdocs/forum/inc/functions.php on line 78
Pages: 1 2