Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Number of views  (Read 2976 times)

0 Members and 1 Guest are viewing this topic.

Steve1234

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Number of views
« 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
« Last Edit: January 04, 2008, 10:24:18 am by Joachim Müller »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Number of views
« Reply #1 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.
Logged

Steve1234

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Number of views
« Reply #2 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
Code: [Select]
// 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

Logged

Steve1234

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: Number of views
« Reply #3 on: January 04, 2008, 10:12:57 am »

OK

Have solved
Thanks
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Number of views
« Reply #4 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 20 queries.