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: [Solved]: hit counter  (Read 3620 times)

0 Members and 1 Guest are viewing this topic.

encoro

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
[Solved]: hit counter
« on: May 12, 2008, 11:21:18 pm »

how do I make my hit counter go up by say 3 or 4 instead of 1 when a pic gets viewed?
I now it's cheating but...........
my gallery is http://encoro.net
« Last Edit: May 13, 2008, 08:20:49 am by Joachim Müller »
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: hit counter
« Reply #1 on: May 12, 2008, 11:24:52 pm »

in include/functions.inc.php

find

Code: [Select]
function add_hit($pid)
{
        global $CONFIG, $raw_ip;
        cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET hits=hits+1, lasthit_ip='$raw_ip', mtime=CURRENT_TIMESTAMP WHERE pid='$pid'");


And edit "hits+1" accordingly.
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

encoro

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: hit counter
« Reply #2 on: May 12, 2008, 11:40:16 pm »

hi - i dont have a file include/functions.inc.php
where else should i be looking for that function?
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: hit counter
« Reply #3 on: May 12, 2008, 11:44:55 pm »

Where is your gallery for a start? that link you posted isn't your CPG gallery. You must have that file.
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

encoro

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: hit counter
« Reply #4 on: May 12, 2008, 11:59:49 pm »

Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: hit counter
« Reply #5 on: May 13, 2008, 12:16:38 am »

http://encoro.net/viewer/include/init.inc.php < that's the file you need to edit. Navigate to it on your FTP client and edit as i mentioned above.
Logged
Tambien, Hablo Espaņol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

encoro

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: hit counter
« Reply #6 on: May 13, 2008, 12:31:43 am »

got it - ty much - 1 more thing how can i make the theme a fixed size so it the stuff doesnt move around when the ie gets resized!
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: hit counter
« Reply #7 on: May 13, 2008, 08:20:36 am »

One issue per thread - you agreed that board rule when signing up. Your initial question got solved, so I'm marking this thread accordingly and locking it.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.