Reset Album viewed Reset Album viewed
 

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

Reset Album viewed

Started by Aknot, June 30, 2012, 02:33:03 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aknot

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.


Αndré

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

Aknot

Quote from: Αndré on July 02, 2012, 10:30:46 AM
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.

Αndré

Open util.php, find
cpg_db_query("UPDATE {$CONFIG['TABLE_PICTURES']} SET hits = 0 $albstr");
and below, add
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.

Aknot

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.

Αndré

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.

Aknot

Got it and thank you for your help.

Αndré

Please
Quote from: Joachim Müller on September 28, 2008, 12:46:26 PM
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.