Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: most viewed: only counts per viewer, not per view  (Read 4875 times)

0 Members and 1 Guest are viewing this topic.

clazymike

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
most viewed: only counts per viewer, not per view
« on: December 05, 2005, 02:35:37 am »

hello all,

my "most viewed" page seems to only count views once per unique IP, regardless of how many times that person may view the picture.  even if someone views a single picture 10 times over a span of a week or so, it only will count it as one view.  is there any option to make refreshes and reviews count?

thanks.
« Last Edit: April 19, 2006, 10:10:52 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: most viewed: only counts per viewer, not per view
« Reply #1 on: December 05, 2005, 08:24:16 am »

that's expected behaviour - you wouldn't want someone to increase the views counter by force-refreshing a page.
Logged

clazymike

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: most viewed: only counts per viewer, not per view
« Reply #2 on: December 06, 2005, 08:01:36 am »

even though it might be ill-advised, is there a way for the view counters to count every individual view, including refreshes?
Logged

Abbas Ali

  • Administrator
  • Coppermine addict
  • *****
  • Country: in
  • Offline Offline
  • Gender: Male
  • Posts: 2165
  • Spread the PHP Web
    • Ranium Systems
Re: most viewed: only counts per viewer, not per view
« Reply #3 on: December 06, 2005, 09:05:18 am »

Edit displayimage.php

Replace

Code: [Select]
if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {

with

Code: [Select]
if ($album != "lasthits" && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {

This should do what you want.


Abbas
Logged
Chief Geek at Ranium Systems

Sasse

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: most viewed: only counts per viewer, not per view
« Reply #4 on: April 19, 2006, 10:05:36 am »

Hi!
I found this Topic via the search.
It's the same thing I want to change so I didn't start a new topic.
The only difference is, I'm using 1.4.x
What is the new code i need to replace? It isn't the same code you posted anymore.
Thx!

Sasse
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: most viewed: only counts per viewer, not per view
« Reply #5 on: April 19, 2006, 10:10:36 am »

Don't ask cpg1.4.x questions on a cpg1.3.x board, there's a good reason why we have different sub-boards for different coppermine versions. Locking this thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.