forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: clazymike on December 05, 2005, 02:35:37 am

Title: most viewed: only counts per viewer, not per view
Post by: clazymike 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.
Title: Re: most viewed: only counts per viewer, not per view
Post by: Joachim Müller 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.
Title: Re: most viewed: only counts per viewer, not per view
Post by: clazymike 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?
Title: Re: most viewed: only counts per viewer, not per view
Post by: Abbas Ali 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
Title: Re: most viewed: only counts per viewer, not per view
Post by: Sasse 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
Title: Re: most viewed: only counts per viewer, not per view
Post by: Joachim Müller 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.