Topic: Include PunBB into a existing layout.

Hello,

I have a existing layout with 1 "menu div" and 1 "main div", with a simple php script that inlcude the pages into "main".

I would like to do the same thing with PunBB, the problem is that if I include it the same way as the other pages (serverside), all links get broken (punBB is located in the folder /forum).

I have temporarly fixed this by including the forum with <object>, but now the problem is that I can't get <object> to resize after it's content in "height". Nor can I do this with Iframe.

I'm greatful for all tips.

Thank you in advance.

/Rickard

Re: Include PunBB into a existing layout.

Try making a constant called SITE_ROOT. Include it before every link and it should work smile

Re: Include PunBB into a existing layout.

I don't get it to work, or maybe I misunderstod you. I'll provide some code, and maybe someone can tell me what i did wrong.

define('site_root','http://location.com/');

if (isset($_GET['act'])) $PAGE = $_GET['act'];

include (site_root."forum/index.php");

Greatful for all help.

/Rickard

Re: Include PunBB into a existing layout.

I meant something like this:

define('site_root','http://yoursite.com');

echo '<a href="'.site_root.'/index.php">Site Index</a>';

Re: Include PunBB into a existing layout.

So.. You mean I should replace all links in PunBB with that code? Sounds like to much work for just being able to include it.

Re: Include PunBB into a existing layout.

No, in your site tongue

7 (edited by Diphilus 2006-03-10 20:06)

Re: Include PunBB into a existing layout.

But the links in my site works fine, it's the links inside PunBB that breaks when I include it.

hmm, it's like this.

In my index.php (located in root) I do "Include ("forum/index.php")"

But the links is still t.ex "search.php" when it should be "forum/search.php"

Hope you understand me smile

Re: Include PunBB into a existing layout.

Ah, like that smile it's an issue that I dislike, as each link should
a) have PUN_ROOT
or
b) have $config['o_base_url']
in it. Maybe it's something for 1.3, I dunno. But for now, I suggest you just fully intergrate the site in the forum (easier) or just open the forum and have some links to your main site.