most viewed: only counts per viewer, not per view most viewed: only counts per viewer, not per view
 

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

Main Menu

most viewed: only counts per viewer, not per view

Started by clazymike, December 05, 2005, 02:35:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

clazymike

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.

Joachim Müller

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

clazymike

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

Abbas Ali

Edit displayimage.php

Replace


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


with


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


This should do what you want.


Abbas
Chief Geek at Ranium Systems

Sasse

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

Joachim Müller

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.