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?
Adding a line of PHP-code
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Adding a line of PHP-code
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:
Then you can use {include_php} in your smartytemplates.Have a look at smarty.php.net for documentation on that function!
HTH,
Garvin
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
HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Re: Adding a line of PHP-code
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!
So thanks for your help!