coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: Steve1234 on January 03, 2008, 07:52:26 PM

Title: Number of views
Post by: Steve1234 on January 03, 2008, 07:52:26 PM
My counter is working fine, however I would like it to register each time a photo is viewed from the same pc. ideally I would prefer a time delay of maybe ten minutes.
I have spent a number of hours looking for solution in forum using the search facility but cant find the answer

Steve
Title: Re: Number of views
Post by: Joachim Müller on January 04, 2008, 07:46:41 AM
Such a solution doesn't exist - Coppermine counts unique hits. That's why your search didn't yield any results. If you need this behaviour changed, you'll have to code it.
Title: Re: Number of views
Post by: Steve1234 on January 04, 2008, 09:19:50 AM
Could you advise where I should look.
I know your not reccomended to change themes.inc.php
however is it this that needs changing or is it a lot more complicated
// Add 1 to hit counter
    if (!USER_IS_ADMIN && !in_array($pid, $USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
        add_hit($pid);
        if (count($USER['liv']) > 4) array_shift($USER['liv']);
        array_push($USER['liv'], $pid);


any point in the right direction would be appreciated

Title: Re: Number of views
Post by: Steve1234 on January 04, 2008, 10:12:57 AM
OK

Have solved
Thanks
Title: Re: Number of views
Post by: Joachim Müller on January 04, 2008, 10:24:09 AM
Marking thread accordingly. However, for the benfit of others with similar issues, you should share your insight and post what you did to solve your issue - that's the whole point of a support board: think of it as a knowledge base.