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: Integrating PHP  (Read 2191 times)

0 Members and 1 Guest are viewing this topic.

flomar

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Integrating PHP
« 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.
« Last Edit: March 07, 2005, 04:27:04 pm by GauGau »
Logged

donnoman

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1615
  • From donovanbray.com
    • Donovan Bray
Re: Integrating PHP
« Reply #1 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
Logged

flomar

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Integrating PHP
« Reply #2 on: March 07, 2005, 02:12:38 pm »

Thanx ... after some interesting lectures of php its working know.

:-) Flo.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 15 queries.