Using <?php includ ?> in the tpl files... Possible?

blacksburgpoker

Joined: 2005-11-26
Posts: 108
Posted: Fri, 2006-12-08 03:54

Hey,
I searched for this on the website and didn't find a definite answer.

I'm trying to use <php include> inside the theme.tpl
I've copied it to the "local" directory and all.

As a matter of fact I've customized it too http://www.blacksburgpoker.com/gallery/main.php

but i want it to be with <php include> so that it is easier for me to modify everything.

I know that I cant simply use <?php include("......");?>
but I dont know what I NEED to use.

I'm trying to add the following php files to the layout of Gallery:

<?php include("../common_head.php"); ?>
<?php include("../header.php"); ?>

[GALLERY]

<?php include("../left_menu.php"); ?>
<?php include("../right_menu.php"); ?>
<?php include("../footer.php"); ?>

Thanks for your help.

==================================
Website Design and SEO | Poker Picture Gallery | Free Desktop Wallpapers

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2006-12-08 04:30
 
blacksburgpoker

Joined: 2005-11-26
Posts: 108
Posted: Tue, 2007-12-04 19:38

Thanks,

This is what I did right now:

on the main.php page, I added the following lines to the very top of the code:

<?php include("../common_head.php"); ?>
<?php include("../header.php"); ?>

and the following lines to the very bottom of the code:

<?php include("../left_menu.php"); ?>
<?php include("../right_menu.php"); ?>
<?php include("../footer.php"); ?>

it sort of worked but there are still couple big problems. (other than CSS style)

some pictures disappear, when you click refresh it takes for ever to load (and when it does load it's all wrong)...

Can you take a look please?
www.pokereagles.com/poker-pictures/main.php

Thanks,

==================================
Nima | Poker Picture Gallery | Free Desktop Wallpapers

 
blacksburgpoker

Joined: 2005-11-26
Posts: 108
Posted: Tue, 2007-12-04 19:37

I need some help here guys,

To use the smarty tags in the theme.tpl, how do I point to a php file???

{include file="$../../../header.php"} ??????

Please help.
THanks

[EDIT]: I didn't want to post a new post, but I noticed this thread was coming up a lot on Google and i have changed the pages listed here since. So I am changing them all to the new pages for reference. And Dave's suggestion worked great.

==================================
Nima | Poker Picture Gallery | Free Desktop Wallpapers

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2006-12-10 06:34

{include_php file='/path/to/header.php'} no need for the $

Dave
____________________________________________________
Blog with G2 || Gallery Frames / Mods || G1 Test Gallery

 
rizwan6feb

Joined: 2008-03-15
Posts: 1
Posted: Sat, 2008-03-15 06:37

I have used this
{include file="$../../../header.php"}

But i get the same printed on the web page instead of header.php being included

QC

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Wed, 2009-08-26 04:26