Announcement

#1 2014-03-05 22:57:46

stinkysGTI
Member
2014-03-05
2

How do I stop Piwigo from commenting out my php?

Hello,

I tried adding my own custom php to the footer.tpl file:

<?=date('Y'); ?>

When the page is loaded in a browser it gets rendered as:

<!--?=date('Y'); ?-->

So nothing is displayed. How can I get it to NOT add html comments to my code?

Thank you

Offline

 

#2 2014-03-05 23:02:18

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3270

Re: How do I stop Piwigo from commenting out my php?

Hello

You can't add php in template files. Only Smarty syntax. See the documentation on the official website to find how to achieve what you want.

If it is not possible you must create a plugin with php scripts, template variables assignment and custom template (see Skeleton extension for concrete examples)

Offline

 

#3 2014-03-05 23:10:00

stinkysGTI
Member
2014-03-05
2

Re: How do I stop Piwigo from commenting out my php?

Ah, ok. This is my first time working with Piwigo.

I'll look into that, thank you.

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact