Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: How do I incorporate my php elements into the template since it ends in .html??  (Read 2954 times)

0 Members and 1 Guest are viewing this topic.

aka1908

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

How do I incorporate my php elements into the template since it ends in .html?  I want to add php elements to my gallery, but the template ends in .html therefore my php includes do not work.  How do I change that?

Thanks in advance!
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149

Have you done a search? This question has been asked many times before.
Logged

aka1908

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Yes, I have done a search.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de

If your search hasn't come up with proper results, you should have re-phrased your search keywords - the answer has been given before, as TranzNDance suggested.

If it's a plain html page (which means it's static), you can't have dynamic content from Coppermine in it (exclamation mark). If the extension of the file is just named ".htm", but the server it is on allows you to have php files, you could
a) rename the html file to php (recommended)
or
b) use this method (if you're on apache and your webhost let's you use .htaccess): Create a file called ".htaccess" (mind the dot at the start) if it doesn't already exist in the folder your html file is in. Add this line of code to it:
Code: [Select]
<FilesMatch "\.(htm)$" >
ForceType application/x-httpd-php
</FilesMatch>
This lines will instruct the server to parse files with the extension ".htm" with the php parser.

You can then use the random image include mod or the rss feed mod from the mods board.

Joachim
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 18 queries.