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] 2   Go Down

Author Topic: Reset views in an album  (Read 15440 times)

0 Members and 1 Guest are viewing this topic.

olegario

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Reset views in an album
« on: January 08, 2004, 02:48:30 pm »

I was wondering if anyone's come up with a way to reset the number of views in one album back to zero.

Thanks in advance!
« Last Edit: September 14, 2004, 09:05:26 am by GauGau »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Reset views in an album
« Reply #1 on: January 08, 2004, 02:55:23 pm »

you mean another way than clicking on "edit pics" next to the album thumbnail in category view when logged in as admin and enabling the checkbox "Reset view counter" next to each pic? Something like "reset views on the whole album"? Hasn't been done yet, will go into my todo-list.

GauGau
Logged

olegario

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Reset views in an album
« Reply #2 on: January 08, 2004, 04:43:48 pm »

Yup!  That's it...Having to go through 100 pictures in an album specifically picking out which pictures have views and resetting them can be an eye-strain.

Thanks again.
Logged

Spike05

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
    • http://www.meghahirn.de
Reset views in an album
« Reply #3 on: March 01, 2004, 08:46:16 am »

When does that feature Release?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Reset views in an album
« Reply #4 on: March 01, 2004, 09:21:27 am »

as soon as someone is actually doing the coding. This request has very low priority for me - if you need it urgently, you'll have to code it for yourself.

GauGau
Logged

Nibbler

  • Guest
Re: Reset views in an album
« Reply #5 on: July 20, 2004, 01:05:19 am »

Added into admin tools for version 1.4
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: [Done]: Reset views in an album
« Reply #6 on: September 13, 2004, 04:20:52 pm »

I was looking for this function, too. Since it's not yet available, I figured I'd see if I could make the change directly in the database.

Here is the SQL query to run to reset views/hits for specific albums:
Code: [Select]
UPDATE `cpg11d_pictures` SET `hits` = '0'
WHERE `aid` = AA AND `hits` > 0;

AA = album id, which you can get by looking at the album's URL. cpg11d should match whatever your cpg table name is.

To reset views for all  albums
Code: [Select]
UPDATE `cpg11d_pictures` SET `hits` = '0'
WHERE `hits` > 0;

Use these instructions with care and only after backing up your database. If you don't understand this, please don't try this at home.
« Last Edit: April 15, 2005, 05:53:55 am by TranzNDance »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Reset views in an album
« Reply #7 on: September 14, 2004, 09:03:52 am »

Added into admin tools for version 1.4
Will even be in album properties screen of each album in cpg1.4 (see attached screenshot).

Joachim
Logged

cryogenic

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 79
    • the cynic says...
Re: Reset views in an album
« Reply #8 on: September 14, 2004, 09:57:29 am »

I noticed that and a few other things added in the new CVS. I like it a lot... just one minor thing... it's "irrevocably" (you missed an R), though I'd think the word "irreversibly" would be more fitting there.  ;)  Either way, good addition. Can't wait to see what's next.
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #9 on: April 15, 2005, 05:12:12 am »

I was reading this thread trying to figure out if there is a simple way to reset the view counter for ALL the albums at once or by individual albums.  Since this discussion took place over six months ago, I'm wondering if there is an update or new answer.  I'm using CPG 1.3.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reset views in an album
« Reply #10 on: April 15, 2005, 05:15:40 am »

Did you try what I suggested?
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #11 on: April 15, 2005, 05:20:00 am »

No.  Your warning scared me off.  I dont want to screw anthing up and I dont really understand where you were working.
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #12 on: April 15, 2005, 05:24:26 am »

"SQL query to run"--I dont know what this means or how to do it.
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #13 on: April 15, 2005, 05:38:43 am »

I'm guessing you're suggesting editing one of the SQL files, but I dont know which one or where to locate the code you gave.  I've looked at all three of them but cant find anything that resembles what you posted.  If that's all there is to this, then I can easily do that if you could just explain where to find the existing code I need to edit.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: Reset views in an album
« Reply #14 on: April 15, 2005, 05:52:22 am »

Use a tool like phpMyAdmin to execute a SQL statement.  There is no editing of files.
Logged
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

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #15 on: April 15, 2005, 05:54:32 am »

I have no idea what you're talking about.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reset views in an album
« Reply #16 on: April 15, 2005, 05:57:21 am »

Unfortunately, if you don't know what you're doing, you'll have to have someone else do it for you. If no one else will do it for free, you would have to pay them. That's life. I have to pay someone else to do my car oil changes because I don't want to learn how.
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #17 on: April 15, 2005, 06:00:45 am »

Oh, I want to learn how.  I just need it explained in plain english.  It would help if, instead of telling me to "execute a SQL statement", which I do not understand, you simply said, "go here and do this."  Pretty simple, really.
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Reset views in an album
« Reply #18 on: April 15, 2005, 06:08:46 am »

kegobeer did tell you where to go... phpmyadmin.
Logged

ebonyhunter

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 46
Re: Reset views in an album
« Reply #19 on: April 15, 2005, 06:14:32 am »

yes...and do what?  "execute an SQL statement".  What does that mean?  I didnt see anything in phpAdmin that says "execute an SQL statement."
Logged
Pages: [1] 2   Go Up
 

Page created in 0.023 seconds with 20 queries.