#1 2015-03-08 04:06:31

Applepiee
Member
2014-07-11
41

How to Include a php file in index.tpl?

Since the update I can't include my php script anymore.
I come from 2.6.3 and it worked great using:
{php}
include("././././thepool/thepool.php");
{/php}

But now with the upgrade to the latest version I get:

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "./themes/default/template/index.tpl" on line 270 "{php}" unknown tag "php"' in ./include/smarty/libs/sysplugins/smarty_internal_templatecompilerbase.php:665 Stack trace: #0


Any idea?

Offline

 

#2 2015-03-08 13:51:17

flop25
Piwigo Team
2006-07-06
7038

Re: How to Include a php file in index.tpl?

Hello
That's normal; we updated Smarty which doesn't recommend anymore using php tags
use the standard way aka assign tpl variables from php to the tpl file or use prefilter or postfilter


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2015-03-09 03:09:32

Applepiee
Member
2014-07-11
41

Re: How to Include a php file in index.tpl?

I'm sorry I'm not that advanced in php or smarty to understand. Could you write what I have to write?

Thanks!

Offline

 

#4 2015-03-11 15:44:08

Applepiee
Member
2014-07-11
41

Re: How to Include a php file in index.tpl?

bump

Offline

 

Board footer

Powered by FluxBB