PHP Include Question PHP Include Question
 

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

PHP Include Question

Started by Vball, February 23, 2004, 09:09:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Vball

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

Casper

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.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

Joachim Müller

this has been asked a million times... :cry:
Next time, please search the board before posting...

GauGau

tonyratboy

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...

Joachim Müller

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

tonyratboy

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-