Jump to content

Archived

This topic is now archived and is closed to further replies.

foreverhex

include function on .tpl file?

Recommended Posts

I have a phpBB (who doesn't?) and I wanted to know if there was an equivalent of [code]<?php
include 'file.php';
?>[/code] for a .tpl file? I tried [code]{include file="file.php"}[/code] but that didn’t seem to work. Is there a certain spot I need to put the code?

P.S. I tryed asking ppl at phpBB and there hasn't been one reply in a day!!!

Share this post


Link to post
Share on other sites
If you want to include a file within a phpBB Template file then this will require a mod for phpBB to beable to do what you are trying to do. The best possible way is to asking the MOD team over at phpBB.com for such a mod. Also I'm moving this thread to the third party PHP scripts forum.

Share this post


Link to post
Share on other sites
try this ok
<?php

$file_name="file.php";

include '$file_name';
?>

Share this post


Link to post
Share on other sites
I didnt think phpBB uses a Smarty like template system. You wont be able to do that in phpBB. How about adding another template "variable" such as {MY_NEW_PAGE} and then replace this with the connts of a page using file_get_contents() ?

Share this post


Link to post
Share on other sites
[quote author=Gast link=topic=100904.msg398839#msg398839 date=1153161115]
How about adding another template "variable" such as {MY_NEW_PAGE} and then replace this with the connts of a page using file_get_contents() ?
[/quote]

this worked for me.  Good call.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.