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
Well you obviously didn't use my latest code. You need to add the include above all other things in your file. You need to put it at the very top.
hey krakter,
I'm trying to do the exact same thing with my site. Here's the code that I placed at the top of my page:

<?php
$cwd = getcwd();
chdir('MyBB');
ob_start();
include("index.php");
$output = ob_get_contents();
ob_end_clean();
$output = str_replace('"'.$theme['imgdir'].'/', '"forum/'.$theme['imgdir'].'/', $output);

chdir($cwd);
?>

and then:

<div id="mybb"><?php
echo $output;
?></div>


but nothing appears in the div box when I preview in a browser. It's just blank. Any ideas?
exitglacierguides Wrote:chdir('MyBB');
Is your forum actually installed to a directory called "MyBB"? Also take into account that on a Linux server, capitalisation in directory names is important as "mybb" and "MyBB" are not the same.
hey mr. doom,
Thanks for the reply. Yep, the forum is in a "MyBB" directory. And the case is correct, too. I thought maybe I'd have to include the full path to the directory too (scripts/MyBB), but that didn't seem to help either. Maybe there is a different way I need to enter the full path?
Pages: 1 2