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

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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.