[Solved]: Embedded call to PHP from template [Solved]: Embedded call to PHP from template
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: Embedded call to PHP from template

Started by steveeh131047, March 17, 2008, 01:02:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

steveeh131047

Hi,

I just upgraded to 1.14.6 and was reminded what a superb, flexible script, Coppermine is.

I'm now trying to integrate it better into the "look and feel" of a web site with some significant changes to the theme files. Everything works well, except that if I include a call in the theme.html template file for some PHP to generate content dynamically (e.g. <? require("../naviagation_links.php"); ?>) it seems to get ingored.

I don't think it's a path issue because I've tried many different combinations. I also have the right .htaccess entries to allow a .html file to be parsed for php.

Am I missing something? Perhaps I can't include a php call within a template?

Steve



Nibbler

Exactly, you can't. This is explained in the documentation. Use the custom header/footer features instead.

Quote from: Steveeh on March 17, 2008, 01:02:42 PM
I also have the right .htaccess entries to allow a .html file to be parsed for php.

Apache never sees template.html - it's handled within Coppermine.

steveeh131047

Nibbler,

Thanks for that. I'll look for another way to generate the content. Even if I can't, I can get pretty close to the appearance I want just by modifying style.css and theme.php.

Thanks for your help.

Steve

Nibbler

Use the custom header feature. Put {CUSTOM_HEADER} where your require() is and enter the path to the file in config as the custom header path.

steveeh131047

Nibbler,

Great - just tried it and it works beautifully.

Thanks,
Steve