Reset views in an album Reset views in an album
 

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 views in an album

Started by olegario, January 08, 2004, 02:48:30 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

olegario

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!

Joachim Müller

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

olegario

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.

Spike05

When does that feature Release?

Joachim Müller

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

Nibbler

Added into admin tools for version 1.4

Tranz

#6
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:
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
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.

Joachim Müller

Quote from: Nibbler on July 20, 2004, 01:05:19 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

cryogenic

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.

ebonyhunter

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.

Tranz

Did you try what I suggested?

ebonyhunter

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

ebonyhunter

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

ebonyhunter

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.

kegobeer

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

I have no idea what you're talking about.

Tranz

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.

ebonyhunter

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.

Tranz

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

ebonyhunter

yes...and do what?  "execute an SQL statement".  What does that mean?  I didnt see anything in phpAdmin that says "execute an SQL statement."