coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Installation & Setup => Topic started by: flomar on March 07, 2005, 12:44:13 AM

Title: Integrating PHP
Post by: flomar on March 07, 2005, 12:44:13 AM
Hi,

I want to run a php script for a counter out of my own template? I have to execute the following lines in different parts of the page.

<?php include "/home/marschou/public_html/phphits/phphits.inc.php"; ?>

<?php phphitsAddHit(); ?>
<?php echo phphitsShowHits(0); ?> Visits

How can I activate it?

Thanks, Flo.
Title: Re: Integrating PHP
Post by: donnoman on March 07, 2005, 02:14:15 AM
I would put it in a custom footer if I were you. That way you could control where it ends up in the template.

there's an example of adding a custom header in the docs, as well as in the forums if you search.

the only difference between a custom header and custom footer, is that a header would be dealt with in pageheader, and the footer would be in pagefooter

http://coppermine.sourceforge.net/faq.php#customHeader
Title: Re: Integrating PHP
Post by: flomar on March 07, 2005, 02:12:38 PM
Thanx ... after some interesting lectures of php its working know.

:-) Flo.