forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: claxxical on July 06, 2004, 06:10:00 pm

Title: don't increment view counter from admin user
Post by: claxxical on July 06, 2004, 06:10:00 pm
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!
Title: Re: don't increment view counter from admin user
Post by: Joachim Müller on July 06, 2004, 06:29:00 pm
this option hasn't been implemented yet. Will be considered for future versions.

GauGau
Title: Re: don't increment view counter from admin user
Post by: cryogenic on July 15, 2004, 04:40:06 am
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. 
Title: Re: don't increment view counter from admin user
Post by: RatKing on July 16, 2004, 01:07:34 pm
A very quick and dirty solution to this would be to do the following.

In file: displayimage.php

Replace
   
Code: [Select]
if ($album != "lasthits" && !in_array($pid, $USER['liv']) && isset($HTTP_COOKIE_VARS[$CONFIG['cookie_name'] . '_data'])) {
   
Code: [Select]
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.
Title: Re: don't increment view counter from admin user
Post by: Tarique Sani on July 16, 2004, 01:17:56 pm
I second RatKing's solution - simplest way to do it
Title: Re: don't increment view counter from admin user
Post by: cryogenic on September 13, 2004, 10:13:27 am
Tested it... works great. Thanks!
Title: Re: don't increment view counter from admin user
Post by: Joachim Müller on September 13, 2004, 10:23:59 am
@devs: Should we add this to the devel code?

Joachim
Title: Re: don't increment view counter from admin user
Post by: Tranz on September 13, 2004, 10:27:05 am
This was a great suggestion and solution! :) I also minimized viewing my images because I didn't want to inflate the view counter.
Title: Re: don't increment view counter from admin user
Post by: cryogenic on September 13, 2004, 10:27:38 am
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.
Title: Re: don't increment view counter from admin user
Post by: kegobeer on September 13, 2004, 04:45:12 pm
@Joachim: Yes, add it to devel.
Title: Re: don't increment view counter from admin user
Post by: Nibbler on September 16, 2004, 01:39:07 am
committed @ devel displayimage.php v.1.61
Title: Re: don't increment view counter from admin user
Post by: cryogenic on September 22, 2004, 02:55:14 am
*heads over to CVS* :P