[Solved]: hit counter [Solved]: hit counter
 

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

Main Menu

[Solved]: hit counter

Started by encoro, May 12, 2008, 11:21:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

encoro

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

just_some_guy

in include/functions.inc.php

find


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.
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

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

just_some_guy

Where is your gallery for a start? that link you posted isn't your CPG gallery. You must have that file.
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


just_some_guy

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.
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

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!

Joachim Müller

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.