forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: aka1908 on September 20, 2004, 06:52:09 pm

Title: How do I incorporate my php elements into the template since it ends in .html??
Post by: aka1908 on September 20, 2004, 06:52:09 pm
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!
Title: Re: How do I incorporate my php elements into the template since it ends in .html??
Post by: Tranz on September 20, 2004, 07:05:05 pm
Have you done a search? This question has been asked many times before.
Title: Re: How do I incorporate my php elements into the template since it ends in .htm
Post by: aka1908 on September 20, 2004, 09:12:49 pm
Yes, I have done a search.
Title: Re: How do I incorporate my php elements into the template since it ends in .htm
Post by: Joachim Müller on September 21, 2004, 09:23:11 am
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