coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: blowfishdl on January 29, 2008, 05:41:03 PM

Title: Turn template into a php file
Post by: blowfishdl on January 29, 2008, 05:41:03 PM
Anyway to use template.php instead of template.html?
Title: Re: Turn template into a php file
Post by: Joachim Müller on January 29, 2008, 05:42:16 PM
No. Read the docs? Searched the board? Obviously not.
Title: Re: Turn template into a php file
Post by: zoinks on April 19, 2008, 10:49:34 PM
I understand that this question has been asked a million times, and the answer is always an emphatic "no!" But here's a followup question... Why not? If so many people (myself included) would benefit from the template.html file being template.php, why has this not been implemented in any of the updates over the years? To just say "that's the way it is in the core" -- as I've seen many times on this board -- doesn't really answer the question. Obviously the core can be revised, it happens all the time!

And having a template.php isn't just a one-off benefit -- Having to "hack" the include/themes.inc.php file to include additional php makes security updates/upgrades all the more difficult.

If one of the developers can address this I'd really appreciate it.  ???
Title: Re: Turn template into a php file
Post by: Joachim Müller on April 20, 2008, 02:27:16 AM
Quote from: zoinks on April 19, 2008, 10:49:34 PMI understand that this question has been asked a million times, and the answer is always an emphatic "no!"
There will be no beaftures from cpg1.4.x to cpg1.4.y.

Quote from: zoinks on April 19, 2008, 10:49:34 PMwhy has this not been implemented in any of the updates over the years? To just say "that's the way it is in the core" -- as I've seen many times on this board -- doesn't really answer the question.
The question "why has coppermine been coded in the way it is" simply doesn't apply.

Quote from: zoinks on April 19, 2008, 10:49:34 PMObviously the core can be revised, it happens all the time!
Only happnes for bugfixes, but not for additional features. PHP-driven templates would be an additional feature. Doesn't make sense anyway, since you can accomplish anything without PHP being parsed in template.html.

Quote from: zoinks on April 19, 2008, 10:49:34 PMHaving to "hack" the include/themes.inc.php file to include additional php makes security updates/upgrades all the more difficult.
You're not supposed to edit that file - under no circumstances. Instead, you should edit themes/yourtheme/theme.php instead. This will help you when updadting as well. You have done something wrong (editing themes.inc.php instead of theme.php), so your question is invalid in the first place. RTFM!