1 (edited by Lok 2011-12-12 17:16)

Topic: Site header integration

I would like to integrate the html header of my site to my punbb copy.
It is some simply html lines, but with css.
How to implement that footer?
I tried to put a php include to punbb header file, it work but there are problems with the css.
How can i make the css for the header working without having problems with punbb style?

2 (edited by Kushi 2011-12-12 17:28)

Re: Site header integration

Copy main.tpl and admin.tpl from /include/template to your style folder and simply edit this files. You can include files there by putting

<!-- forum_include "file_name.php" -->

Where file_name.php should be in /include/user/ folder. CSS should be contained at the end of your style/style_name/min/style_name.min.css file.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

3 (edited by Lok 2011-12-12 17:36)

Re: Site header integration

I copied main.tpl and admin.tpl to the root of the site.
Then i put <!-- forum_include "header.html" --> after <body> tag of main.tpl

Maybe i have understood bad, but now the forum must have the header of the site?
Because seems that not work.

4 (edited by Kushi 2011-12-12 18:29)

Re: Site header integration

Nope. You have to put main.tpl admin.tpl to the /style/your_style folder in your forum directory. Then restyle it to look like this one from root site. Probably add

<!-- forum_include "header.php" -->

in the proper place of DOM tree. However header.php ( i don't know whether it could has got any other extension ) should be copied to forum/include/user folder.

This is perhaps the simplest way.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

5 (edited by Lok 2011-12-12 20:19)

Re: Site header integration

I continue to not understand, i think my website knowledge is not enough.
I have this tree:

index.php (website root)
/forum (forum folder)

To make my forum header to be the same of my website, I have to copy main.tpl, admin.tpl and put it into my forum style folder (in my case Oxygen).
Now i reached the part i not understood. I have to open main.tpl and add <!-- forum_include "header_filename.php" -->. header_filename.php must stay into my /forum/include/user folder?
After done this, my forum should have my site header working??

I'm not english, maybe the problem is this too.
P.S: my forum is just installed, so it is a virgin copy of punbb without extensions and themes except Oxygen.
Thank you however.

6

Re: Site header integration

You understood perfectly smile.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

7

Re: Site header integration

I did this but the forum not has my site header then sad

8 (edited by Kushi 2011-12-12 23:17)

Re: Site header integration

And you put everything in your /forum/include/user/header_filename.php properly?
Note that

<!-- forum_include

should be somewhere inside <body> tag of your main.tpl.

EDIT
Oh, I've checked it. Seems that it doesn't work on Oxygen sad. It gets tpl files from /include/template folder by default. However you shouldn't edit this files. It would be better if you copy Oxygen folder, name it e.g. Oxygen2, then rename Oxygen.php to Oxygen2.php and edit $forum_loader line to

$forum_loader->add_css($base_url.'/style/Oxygen2/min/Oxygen2.min.css', array('type' => 'url', 'group' => FORUM_CSS_GROUP_SYSTEM, 'media' => 'screen'));

Then rename /style/Oxygen2/min/Oxygen.min.css to /style/Oxygen2/min/Oxygen2.min.css, set it to your default forum style and then put there main.tpl and admin.tpl smile.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

9 (edited by Lok 2011-12-12 23:17)

Re: Site header integration

In header.php i included the html header and it works.
The problem is the css, i added the css on the footer of the oxygen css file.. something works with this and something not!
For example there is no padding and background. The problem is that i can't add a lot of parameter cause it maybe result the same of punbb parameters sad
There's a solution for this? Can i send you the link in private?

10

Re: Site header integration

Sure, send me a link, we'll figure out what's wrong tongue.

If any of my dropbox link fails with 404 error, change dl.dropbox.com/u/56038890/punbb/*.zip in address to 82283017.

Currently working on rPlus - responsive theme for developers to create their own themes basing on this one.

11

Re: Site header integration

My compliments to Kushi, he's a very kind person. wink