Advanced search  

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]

Pages: [1]   Go Down

Author Topic: PHP Include Question  (Read 3986 times)

0 Members and 1 Guest are viewing this topic.

Vball

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
PHP Include Question
« 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
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
PHP Include Question
« Reply #1 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.
Logged
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

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
PHP Include Question
« Reply #2 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
Logged

tonyratboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • http://www.secretlair.com
PHP Include Question
« Reply #3 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...

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
PHP Include Question
« Reply #4 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
Logged

tonyratboy

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
    • http://www.secretlair.com
PHP Include Question
« Reply #5 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-
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.