1

Topic: including Punbb in a personal layout...

Hello, nice forum you have there!

I'm trying to get Punbb running on my website, and here is my little problem :

The website is designed in PHP.
the file header.php (built with several includes) displays the banner and the menu
the file footer.php (also built with includes) displays... the footer...
between them, I include dynamically the selected page by using an include, too. So, the included file has no tags like <HTML>, <HEAD> or so, because all this is located in header.php.

The problem is that I would like to include punbb/index.php in this "system", but it simply doesn't appear because it relies on the template main.tpl.

So the question is : how should I have to edit main.tpl to include Punbb in my layout? I believe I should make it look like my header.php file... but where do I need to put the main.tpl arguments?
(if it's not clear, I'll try to post more detailed explanations...)

thanks for replying and keep u the good work!

Re: including Punbb in a personal layout...

Hmm, that is a problem. PunBB sends HTTP headers (for cookies and stuff) and uses output buffering and therefore must be the "initiator" of the pages. I would recommend that you edit main.tpl so that you include your own header and footer with banners and stuff.

There is a small mod you can install that will allow you to run PHP code in templates. You can find it here.

Did this help?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: including Punbb in a personal layout...

If nothing else works, you could just use it on a separate page. Or an iframe tongue

4

Re: including Punbb in a personal layout...

Thanks alot, it works!
I just have to do some modifications to my includes, resize the forums a bit, and everything works! (I'll have to use new ones, because all other pages are on the root of the website and punbb is in a folder, so the paths in the includes are not correct...)
Great forum, easy to implement and to skin, very well done sincerely... I'll recommend it!
Thanks again for your help!

Re: including Punbb in a personal layout...

this was exactly what I was about to post about. now i dont have too!