Topic: Additional Templates?

How easy/difficult would it be to add new templates for PunBB. I want some pages I'm making to use different templates than the current ones (main.tpl, admin.tpl, etc.).

2

Re: Additional Templates?

Take a look at th code starting at line 37 of header.php which is used to decide whether to use main.tpl, admin.tpl or help.tpl. All you need do is define a constant near the top of whichever file you want to use a different template then add it to that list.

Re: Additional Templates?

ortz do a search for wordpress integration or u can look at my forum post on.. http://bunpai.com
how to put punbb in a css template. i listed my index.php and my main.tpl in the forum.

My stuff or my style might sux, but atleast I'm willing to help when I can.
Don't be stupid and help ! We are the stupid one's !!!

Re: Additional Templates?

Okay thanks guys. I eventually got away from PunBB's template system and just did everything manually since I needed to do a lot of php inbetween and you can't put php in the templates.

Re: Additional Templates?

ortzinator wrote:

you can't put php in the templates

Actually, by using pun_include (see the docs), you can, but obviously the work is already done, so just keep that in mind for the future.

Looking for a certain modification for your forum? Please take a look here before posting.

Re: Additional Templates?

also you can call eval on the output to execute the php inlined in your templates.

Re: Additional Templates?

pogenwurst wrote:
ortzinator wrote:

you can't put php in the templates

Actually, by using pun_include (see the docs), you can, but obviously the work is already done, so just keep that in mind for the future.

Yes, I know. That wouldn't work for what I was doing. smile