Using <?php includ ?> in the tpl files... Possible?
blacksburgpoker
Joined: 2005-11-26
Posts: 108 |
Posted: Fri, 2006-12-08 03:54 |
Hey, I'm trying to use <php include> inside the theme.tpl 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("......");?> I'm trying to add the following php files to the layout of Gallery: <?php include("../common_head.php"); ?> [GALLERY] <?php include("../left_menu.php"); ?> Thanks for your help. ================================== |
|
Posts: 27300
http://smarty.php.net/manual/en/language.function.include.php
Posts: 108
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
Posts: 108
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
Posts: 27300
{include_php file='/path/to/header.php'}
no need for the $Dave
____________________________________________________
Blog with G2 || Gallery Frames / Mods || G1 Test Gallery
Posts: 1
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
Posts: 27300
http://www.smarty.net/manual/en/language.function.include.php
http://www.smarty.net/manual/en/language.function.include.php.php
http://www.smarty.net/manual/en/language.function.php.php