Page 1 of 1

Adding a line of PHP-code

Posted: Sat Nov 18, 2006 1:22 pm
by Davy
Hello!

I want to add a line of PHP-code at the bottom of the "index.php"-file in the "templates/default"-folder.
That line will be an include-function, so: include("filename.ext");
But... How to do this in a template?

Re: Adding a line of PHP-code

Posted: Sat Nov 18, 2006 8:26 pm
by garvinhicking
Hi Davy!

Usually one uses Plugins toinsert stuff at places, but if you really need includes at that place, create a config.inc.php in your template folder:

Code: Select all

<?php
$serendipity['smarty']->security = false
Then you can use {include_php} in your smartytemplates.Have a look at smarty.php.net for documentation on that function!

HTH,
Garvin

Re: Adding a line of PHP-code

Posted: Sat Nov 18, 2006 8:48 pm
by Davy
Thanks! I found the first step: include_php, but I was missing the second one: how to turn off the security...

So thanks for your help!