Topic: Using PHP in Template...

I know this topic has been posted a million times, but all the searching I've done doesn't seem to help my specific situation. I know that to include a PHP file you use the <pun_include "whatever.php">... but it doesn't seem to be working for me.

What I'm doing is integrating the forum into my websites template. I've taken a rather simple approach and just built a table around the content in the main.tpl. Right above the forum content, I've used <pun_include "boxes.php">. Boxes.php is a php file that echos out php based features of my site, such as a schedule, calendar, and recent posts. Each feature is placed within one of three boxes atop the page. All of this is done in the boxes.php file, which is uploaded to the forum/includes/user/ directory.

When I load the forum, nothing appears. It's as if the file wasn't even included. There's no error, no html structure of the boxes, nothing. I'm not sure what I'm doing wrong, but was wondering if perhaps it's not even possible to do what I'm trying to do.

It's 5:15 in the morning so if I've left out any information, just post and I'll be more than happy to provide you with what you need.

Last edited by jewofcanada (2008-09-12 09:18:52)

Re: Using PHP in Template...

To include a PHP file in templates use <!-- forum_include "<MY_FILE.php>" -->. <pun_include "*"> was used in PunBB 1.2.

Re: Using PHP in Template...

Still no luck... I've even just created a real simple test.php file, all it does is echo out the word "Hello." Using that syntax I've added it into the main.tpl and still get no results.

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


EDIT: Ahh I see... it's <!-- pun_include "test.php" -->

Thanks for putting me on the right path! :]

Last edited by jewofcanada (2008-09-15 23:38:04)

Re: Using PHP in Template...

You were misinformed i belive...

1.2.* uses <pun_include "*">
1.3.* uses <!-- forum_include "<MY_FILE.php>" -->

If your using 1.2 then you use the one from 1.2

Sorry. Unactive due to personal life.

Re: Using PHP in Template...

Slavok wrote:

To include a PHP file in templates use <!-- forum_include "<MY_FILE.php>" -->. <pun_include "*"> was used in PunBB 1.2.


I want to include banner on the right side of the forum head which is blank. How can I do it?
I'm new in punbb. My forum address is http://forum.banglalibrary.org
It would be kind enough if you help me.

Last edited by banglalibrary (2009-11-03 12:10:43)

Re: Using PHP in Template...

It seems that problem was solved. I can see the banner at the header.