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: "problem" with number of views  (Read 4109 times)

0 Members and 1 Guest are viewing this topic.

neeth

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 131
  • I love my gallery
    • Gelipo
"problem" with number of views
« on: June 30, 2005, 05:44:17 pm »

i know that is beter that users cant just refresh and that picture have 100000views but on some my pictures we have "games" and there is litle problem on some pictures we have more comments than views , for users that is funny ;)
see http://www.neeth.info/galerija/displayimage.php?pos=-20996

what to do ?
is there any modification to every view of picture is numbered ?
« Last Edit: July 04, 2005, 07:14:28 am by GauGau »
Logged
[

Nibbler

  • Guest
Re: "problem" with number of views
« Reply #1 on: June 30, 2005, 07:23:55 pm »

displayimage.php

Code: [Select]
    // Add 1 to hit counter
    if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {
        add_hit($pid);
        if (count($USER['liv']) > 4) array_shift($USER['liv']);
        array_push($USER['liv'], $pid);
    }

Adjust that code to work as you see fit.
Logged

neeth

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 131
  • I love my gallery
    • Gelipo
Re: "problem" with number of views
« Reply #2 on: June 30, 2005, 07:46:26 pm »

I try but no luck ;)

i need that every time when user open picture give it one views,

ex.. if i refresh my pic 100times that it have 100views

tnx.
Logged
[

Nibbler

  • Guest
Re: "problem" with number of views
« Reply #3 on: June 30, 2005, 07:59:53 pm »

Change it to simply

Code: [Select]
add_hit($pid);
in that case.
Logged

neeth

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 131
  • I love my gallery
    • Gelipo
Re: "problem" with number of views
« Reply #4 on: July 01, 2005, 01:13:29 pm »

its work !!

thnx,
Logged
[
Pages: [1]   Go Up
 

Page created in 0.022 seconds with 19 queries.