coppermine-gallery.com/forum

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: Vball on February 23, 2004, 09:09:42 PM

Title: PHP Include Question
Post by: Vball on February 23, 2004, 09:09:42 PM
I want to use a PHP include file in the template.html file but the code does not get processed, the server is not looking at html files for php code...

Some things some to mind...

I could:

Modifty the theme.php file.. kind of messy??
Possibly change CPG settings??? so it would take the template.html as template.php instead???

Any suggestions?

TIA
Title: PHP Include Question
Post by: Casper on February 23, 2004, 09:22:08 PM
You'll have to go the messy route.

php code cannot be included in the template.html, and that cannot be changed to template.php. So you'll have to work with the theme.php.
Title: PHP Include Question
Post by: Joachim Müller on February 24, 2004, 07:53:16 AM
this has been asked a million times... :cry:
Next time, please search the board before posting...

GauGau
Title: PHP Include Question
Post by: tonyratboy on March 11, 2004, 06:45:52 PM
Quote from: "casper"php code cannot be included in the template.html, and that cannot be changed to template.php
I was able to change template.html to template.php with no problems.  But I still can't do PHP includes in template.php.  Searching for a solution myself.  Since this has been asked a million times, how about including it in a FAQ or make the topic sticky?

The one solution I've found is making a content block, but that doesn't give me control over where on the page the block appears, does it?  It seems these can only be stacked vertically on a page.  I dunno, I'm no coder...
Title: PHP Include Question
Post by: Joachim Müller on March 12, 2004, 07:33:04 AM
renaming template.html to template.php won't do anything. If it was that easy, we'd have posted this (I tried putting a label "coffee machine" on my bike, but it still won't make coffee :wink: ).
There already is a section on this in the faq (although you're right: the faq needs an update). If we would make all questions "sticky" that are posted frequently, the first two pages of the supoort board would be stickies... :wink: . You might say that coppermine is to difficult to use, if there are so many questions that are being posted over and over, but then: that's why there's the documentation, the faq and the search feature on the board.

GauGau
Title: PHP Include Question
Post by: tonyratboy on March 12, 2004, 02:44:43 PM
Thanks for the reply :)  Coppermine *is* easy to use, you guys did a great job on it.  It's not quite so easy to find answers to questions-- the docs are good but don't cover everything-- the search on the forum is good if you phrase your search precisely or generally enough-- and the FAQ is good too, it's a little outdated, but I understand that keeping it up to the minute would be a full time job.

Cheers,
-t-