don't increment view counter from admin user don't increment view counter from admin user
 

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

don't increment view counter from admin user

Started by claxxical, July 06, 2004, 06:10:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

claxxical

I've checked but I haven't seen an option to ignore picture views when logged into the admin account...I don't want to increment my counters when I'm doing admin stuff.....Thanks!

Joachim Müller

this option hasn't been implemented yet. Will be considered for future versions.

GauGau

cryogenic

I second that one... I'm constantly toying around with my gallery and hate that it increments the view counter when I view a pic. I'd like to see that make it into 1.4. 

RatKing

A very quick and dirty solution to this would be to do the following.

In file: displayimage.php

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

And all should be fine (haven't tested it but I am pretty sure it works) as I said it is a diry little trick but the simplest way of doing it.

Tarique Sani

I second RatKing's solution - simplest way to do it
SANIsoft PHP applications for E Biz

cryogenic


Joachim Müller

@devs: Should we add this to the devel code?

Joachim

Tranz

This was a great suggestion and solution! :) I also minimized viewing my images because I didn't want to inflate the view counter.

cryogenic

oh, by the way... I tested it on the 1.4 CVS I downloaded about a week or so ago. I've not bothered to download the latest CVS which appears to be about 4 days old. But I can verify that it does work as expected on 1.4. No idea about 1.3 though.

kegobeer

Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Nibbler


cryogenic