PDA

View Full Version : Using PHP in templates


Arabica
05-14-2006, 10:41 AM
Hi,

While working on a new template I was asking myself, why there is no possibility to use PHP-Code in the templates. Is it because of security reasons?

I found some threads where people modify the index.php to calculate the half of the imagesize. In consequence you can't share the template, without modifying the index.php. Also an update of pixelpost cause trouble because of the minor changes in the index.php.

From my point of view it would be useful to allow php-code in the templates.
Is there an easy way to get this working? Or is it under development for further versions?

greetings
Arabica

Connie
05-14-2006, 10:51 AM
Hi!

it is not useful to allow php in templates, templates are only for layout

you have other possibilities to add some functionality:

Addons and Admin-Addons (since 1.5)

you can always write an Addon and generate some TAGS there which you can include in your template

we separate between content and layout.
Script + Addons are for content, templates for layout

this was discussed many times already

our principle is: keep it simple

and this simplicity already confuses many people ;=(

so, check out how simple it is to write an addon and write it!

Joe[y]
05-14-2006, 02:52 PM
of course it's easier for developers to have php available for templates. but pixelpost isn't for developers.. its' for photographers and some people find it hard enough to get their heads around the concept of html and tags, let alone php.