Jump to content

[solved] PHP code in the footer?


Recommended Posts

I want to add a piece of code to the footer.tpl (or where it is appropriate!) that will echo my copyright. Such as:

 

&Copy; Copyright <?php echo date('Y'); ?>–Tees And Beyond. All Rights Reserved.

 

It SHOULD look like this: © Copyright 2013-Tees And Beyond. All Rights Reserved.

 

But, it doesn't. The PHP code will not execute. I know it is written correctly, the page loads and all of the text and the HTML metacodes work correctly. I would like to have this appear in the footer so I don't have to remember to come back each year and modify the year!!

 

Help....

 

Thanks,

-DON-

Link to comment
Share on other sites

You have to edit frontcontroller for this, because you can't add php scripts to .tpl files.

All you have to do is to edit displayFooter function, add to smarty variable with date (for example $dateyear})

then you will be able to use it as a smarty variable: {$dateyear}

 

regards

Link to comment
Share on other sites

×
×
  • Create New...