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: Is there any way to maintain "total views" even if I delete certain images?  (Read 2003 times)

0 Members and 1 Guest are viewing this topic.

Secretcloud

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

Hi, first off let me say that I love your program. I have had fun with it so far and enjoy it very much.

Now for my question, I did some searches on this forum but could not find anybody speaking about my specific inquiry in regards to photo views:

I am curious if there is a way to keep the "total lifetime views" for my gallery regardless whether photos have been removed or not?

Basically, I want to remove a section from my gallery but that will also reduce my total views from:

"303 files in 7 albums and 2 categories with 4 comments viewed 23419 times"

all the way down to:

"70 files in 6 albums and 2 categories with 4 comments viewed 2445 times"

Is there any possibility to make it so that it does not base this number on files that remain but instead a "total lifetime time views" of the gallery history instead? For example, I know that on youtube if I delete a video my total video views on my channel does not fluctuate and is unaffected by the deleted video.  So if I had a total of 100,000 views and removed a video with 25,000 views my total will still remain 100,000 instead of becoming 75,000 because of the deleted video.  Is there anyway to do that here with Coppermine so that I can remove a large folder that was viewed heavily and even with the removed folder I can still maintain my total views for the lifetime of the gallery?

Thanks for any help about this,

Secretcloud
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765

That's not possible by default. Maybe it works when you move images (instead of deleting them) in a hidden, password protected album (I haven't checked that). If that's no option you'd have to insert a new value in the database that counts up every time someone views an image (the function add_hit would be the right place). Then you'll have to modify/extend the following row, so it just reads your new value instead of calculating it from all available images:
Quote
303 files in 7 albums and 2 categories with 4 comments viewed 23419 times
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.