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

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]

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