Topic: customizing

Hi, I have been fiddling with my recent install of punBB trying to fit it with the sites look and feel... beyond attaching my own css, but also the sites header and naviagtion files, which are php include files.  When I popped them in main.tpl, I got no results.  This leads me to believe that a php directives won't work with a .tpl... which makes sense I suppose... So I pasted the content from the include files directly into the main.tpl and the content displayed.  However, I have the headers and footers and navigation in include files for the reason that I don't have to repeat them anywhere else on the site so was wondering if anyone can fill me in on where I might be able to stick the include files so that they appear on the site in their proper locations.
thanks

Re: customizing

Punbb FAQ wrote:

3.4.  Is it possible to include my own PHP scripts in the templates?

Yes. PunBB has a special replacement variable called pun_include for including scripts in the templates. For example, if you wanted to include a script called banner.php (located in the forum root directory) at the bottom of all forum pages, you would add the following to your template files:

<pun_include "banner.php">

The path to banner.php is relative to the forum root directory. PunBB will execute the script and the pun_include variable will be replaced by any output that the script produces. Please note that all included scripts have access to the PunBB variables, so if you e.g. wanted to access the database, you could use the $db object just like the rest of PunBB does. Replacement of the pun_include variable is the last thing that PunBB does when it outputs a page, so you don't have to worry about not using variable names that PunBB uses.

wink

Re: customizing

Thanks... I was wondering where the faq was, searching around the punbb site when all along is was right under my own nose... er directory rather.