Topic: Integrating the forum with the rest of my website's design (Help!)

Okay, here's the deal. I can design, but programming isn't my cup of tea. I've tried, it just doesn't work out.

For my latest project, I wanted to run my entire site using PunBB as base, and using the extern.php News Extension (http://punbb.org/forums/viewtopic.php?id=7552). Getting posts from the forum shouldn't be too difficult now.

However, I want my forum to fit into my current design. This is what my forum page template looks like: http://powerofmetal.net/forum.php

I wanted the forum in the empty part in the middle.

The thing is, the entire design is seperated into different files and brought together with a bunch of "include_once();" commands, so that I wouldn't have to edit every page for changes in design.

Now this should technically have been easy. There's a header and there's a footer. Thing is, when I tried to use the same "include_once();" commands in /header.php, it didn't work.

Besides, my includes need to link to their own CSS page as well.

The forum is located at http://www.powerofmetal.net/forum I'll need to change the look after it's integrated into the current design.


I appreciate any help at all. First time with PunBB, so... wink

Thanks!

Parimal Satyal - Powermetal from Nepal

Re: Integrating the forum with the rest of my website's design (Help!)

Did you read the documentation? You are probably best just editing main.tpl read http://punbb.org/docs/faq.html#faq3_3

3

Re: Integrating the forum with the rest of my website's design (Help!)

I ran into the same issue.
One of the very, very few drawbacks of PunBB is that it keeps spitting out HTML before it's finished.
You just cannot use the scripts as includes for something else.
So you really have to go the other way round. This will limit our layout possibilities a bit but it's not that hard.
For one thing Connor is right, mots things happen in the main.tpl.
And if you want to place dynamic content there just create a new tag and have this tag replaced in head.php

The German PunBB Site:
PunBB-forum.de

Re: Integrating the forum with the rest of my website's design (Help!)

You should be able to do that with the pun_include directive in the templates. One problem with that is that the files you want to include must be placed in /include/user/. You could also add symbolic links to the files if they are located somewhere else.

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

5 (edited by livatlantis 2005-10-13 07:55)

Re: Integrating the forum with the rest of my website's design (Help!)

Ah, symbolic links and pun_include. I'll try that and see how it comes smile

Thanks (all of you).

Parimal Satyal - Powermetal from Nepal

6

Re: Integrating the forum with the rest of my website's design (Help!)

Rickard wrote:

One problem with that is that the files you want to include must be placed in /include/user/. You could also add symbolic links to the files if they are located somewhere else.

Which is really a problem if you already have a site that you don't want to move completely to /include/usr/ smile

And Symlinks are one good way to solve these issues - unless your apache config doesn't allow it or you are on a windows server where it's a pain in the ass.

But really - I found it terribly easy to invent some tags for main.tpl and have them replaced by the include() result that I want in header.php .
That way you can also add more logic to it, like having different includes depending on the page you're on and such.

The German PunBB Site:
PunBB-forum.de

Re: Integrating the forum with the rest of my website's design (Help!)

Is <pun_head> really header.php?

Parimal Satyal - Powermetal from Nepal

8

Re: Integrating the forum with the rest of my website's design (Help!)

No, <pun_head> is a tag that is parsed by header.php .
You find header.php ritgh in your punbb installation directory.

Most PunBB scripts call header.php which in turn parses main.tpl

The German PunBB Site:
PunBB-forum.de

9 (edited by livatlantis 2005-10-13 09:03)

Re: Integrating the forum with the rest of my website's design (Help!)

Oh, thanks.

Great news - it worked! I moved all my includes to /include/user
It's an interesting feature that php code doesn't work from main.tpl. Turned that into an include and pun_include-ed that as well.

You can see the result: http://www.powerofmetal.net/forum/viewtopic.php?id=2

Thanks guys, PunBB is awesome. big_smile

I'll work on the nitty-gritties now smile

Parimal Satyal - Powermetal from Nepal

10

Re: Integrating the forum with the rest of my website's design (Help!)

can you show the code you use to put the forum in the html page ?
i wanna do exactly the same thing ...

Re: Integrating the forum with the rest of my website's design (Help!)

shenji wrote:

can you show the code you use to put the forum in the html page ?
i wanna do exactly the same thing ...

I am curious about the same.