forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: encoro on May 12, 2008, 11:21:18 pm

Title: [Solved]: hit counter
Post by: encoro 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
Title: Re: hit counter
Post by: just_some_guy 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.
Title: Re: hit counter
Post by: encoro 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?
Title: Re: hit counter
Post by: just_some_guy 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.
Title: Re: hit counter
Post by: encoro on May 12, 2008, 11:59:49 pm
http://encoro.net/viewer
Title: Re: hit counter
Post by: just_some_guy 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.
Title: Re: hit counter
Post by: encoro 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!
Title: Re: hit counter
Post by: Joachim Müller 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.