Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Reset Album viewed  (Read 5354 times)

0 Members and 1 Guest are viewing this topic.

Aknot

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Reset Album viewed
« on: June 30, 2012, 02:33:03 pm »

I have a site that I display sports cards on. http://www.facciolli.com/cards/index.php?cat=10001

I would like to know if there is a way reset the Album Viewed information:

For example Dolphins For Trade:
148 files, last one added on May 31, 2012
Album viewed 23 times

I would like to reset that 23 times (or whatever number it may be if you look) to 0.

Thanks in advance for any support.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reset Album viewed
« Reply #1 on: July 02, 2012, 10:30:46 am »

Do you want to reset just the albums view counters, or also the file view counters?
Logged

Aknot

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Re: Reset Album viewed
« Reply #2 on: July 03, 2012, 04:31:33 pm »

Do you want to reset just the albums view counters, or also the file view counters?

Both if not album is more important to me.

Thanks.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reset Album viewed
« Reply #3 on: July 03, 2012, 04:41:48 pm »

Open util.php, find
Code: [Select]
cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET hits = 0 $albstr");and below, add
Code: [Select]
cpg_db_query("UPDATE {$CONFIG['TABLE_ALBUMS']} SET alb_hits = 0 $albstr");
Now, please use the admin tools to reset the view counters.


For your information: that code change has already been committed to our SVN repository in revision 8438 and will be part of the next Coppermine release, cpg1.5.22.
Logged

Aknot

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Reset Album viewed
« Reply #4 on: July 03, 2012, 06:12:10 pm »

I went into the file you said. I could not even find the word "hit". I copied and pasted it into notepad and searched again and could not find that string or the word hit.

I am using 1.5.20.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reset Album viewed
« Reply #5 on: July 03, 2012, 06:36:50 pm »

Sounds like you visited that file with your browser at your gallery? If so, that's not what I want you to do. Please open the file with your favorite text editor (you'll probably have to download it via FTP/SSH/etc. in advance). Then, do as suggested. It's definitely there, see here.
Logged

Aknot

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Reset Album viewed
« Reply #6 on: July 03, 2012, 09:04:43 pm »

Got it and thank you for your help.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Reset Album viewed
« Reply #7 on: July 03, 2012, 09:26:24 pm »

Please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.