Reset views in an album - Page 2 Reset views in an album - Page 2
 

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.

ebonyhunter

I guess this is too difficult to be explained simply.  Thanks for your help.  I gotta go change my car oil.

OmegaGOD

First back-up your database before attempting this just in case. Using phpMyAdmin, there is an option to execute an SQL statement, ie. the code below.

This will reset the view counter for all the albums in your gallery.
UPDATE `cpg11d_pictures` SET `hits` = '0' WHERE `hits` > 0;

This will reset the view counter for a select album. Simply replace *** in the code below with the aid number of the selected album you want to reset. You can get the AID number by looking at the album's URL.
UPDATE `cpg11d_pictures` SET `hits` = '0' WHERE `aid` = ***;


Quote from: ebonyhunter on April 15, 2005, 06:39:45 AM
I guess this is too difficult to be explained simply. Thanks for your help. I gotta go change my car oil.
Actually, it was explained simply earlier in this thread.

Hope this helps,
--OmegaGOD
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

ebonyhunter

I saw that in the explanation above.  I dont know where this is done.

OmegaGOD

I've explained it as clearly as I could. If you are not sure how to utilize phpMyAdmin, then I would suggest finding someone who does.

Launch phpMyAdmin
In the left hand side of the screen, select the CPG database from the drop down menu
Click on the SQL tab from the top menu
Enter the SQL queries I supplied you from my previous post into the box that says "Run SQL query/queries on database"

This is step-by-step and as elementary as it gets. I would highly recommend that you find someone who is familiar with phpMyAdmin and mySQL databases to do this for you since you clearly don't understand what a SQL query is.
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

ebonyhunter

Perhaps you could tell me where "phpMyAdmin" is located?  Is it the Admin Tools link when I'm in Admin Mode? Or somewhere else?  Perhaps that's part of my prolem.  I cant find phpMyAdmin.  Remeber, I'm using CPG 1.3

Joachim Müller

phpMyAdmin is not a part of coppermine. It's another server-driven app written in PHP. Either your webhost has installed it for you (many have), or you have to download and install it. Get it from http://www.phpmyadmin.net/ .

Joachim

P.S. Google is your friend

OmegaGOD

phpMyAdmin is not part of CPG. It is a set of PHP scripts to modify mySQL databases. Check with your web-host to see if it is included with your hosting plan.
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

Tranz

Funny how similar your replies are. :D

OmegaGOD

 ;D Looks like GauGau beat me to the post by 28 seconds.  ;)
Please do not PM me with support questions. Please read the manual and then if posting questions please place them in the proper sub-boards.

ebonyhunter

Now you may understand why I'm confused.  Nobody bothered to mention that until now and just assumed I knew that, which I did not.  I've been searching Coppermine for phpmyadmin for 45 minutes.

Joachim Müller

Quote from: TranzNDance on April 15, 2005, 07:02:30 AM
Funny how similar your replies are. :D
Yeah, it's amazing. ;D
I think we've been holding ebonyhunter's hand long enough on this thread - if you (E.H.) still can't manage to solve this on your own, I suggest you wait for cpg1.4.x to be released. After all, newbies shouldn't be messing directly with the database, and it's obvious that ebonyhunter is not a mysql expert yet. As a side-note: before running queries on phpMyAdmin, it's strongly recommended to do a backup (dump) of the database. Those little queries (even if the appear to be "innocent") can wreak havoc on your coppermine install if not done properly (especially if you have no idea what you're doing).

You say
Quote from: ebonyhunter on April 15, 2005, 07:06:03 AM
Now you may understand why I'm confused. Nobody bothered to mention that until now and just assumed I knew that, which I did not. I've been searching Coppermine for phpmyadmin for 45 minutes.
although just some postings above you said
Quote from: ebonyhunter 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."
-> this suggested that you already had phpMyAdmin, don't you think.

Joachim

ebonyhunter

No. it merely meant that where I was looking...which was in CPG Admin Tools....there wasnt anything about "executing an SQL Statement".  And in my version of phpmyadmin, which I've located now, I dont see that option either.

And you're correct.  I'm not an SQL expert or even an intermediate.  I have no problem admitting that.  If this is an advanced function, I shouldn't be messing around with it, which is what I said with my initial inquiry.

Tranz

Yeah, one of the things on the to do list is to enable sql statement execution from within cpg's admin tools. Would make things a lot easier. Though there is the danger in making it easier to do damage. :-\\

ebonyhunter

I can suggest something far easier.  Just have a button somewhere that says "Reset All Image Views to 0" and when you click on it, it resets all of them to zero.

Sound easy?

Actually, I found CPG to be an oustanding and very user-friendly tool, even for elementary dunderheads like me.  I have no complaints.  And because its so great, I just ASSUMED there was a simple button to hit to reset everything.  See what happens when you make a great product?  We just assume it MUST do anything we want on demand.

Not always the case, as this example proved.

Tranz

Well, yes, we could do that. But we also have to decide how many people will benefit from features we add. I don't think majority of users want to reset their views to 0; they would want to have increasing view counts. If we have too many features, it becomes overwhelming and cluttered. It also increases chances for bugs.

Joachim Müller

erm, may I remind you what thread you're in: the request for a "reset all views" button is what this thread is all about, and I posted (although on page 1 of the thread) that the feature will be there in the next version (cpg1.4.x), along with a screenshot. I think it was Nibbler who pointed out that this option exists in the admin tools of version cpg1.4.x as well ("Reset view counters"), and you can choose there what album to apply this for, or even the whole gallery.
So what you're suggesting has already been discussed and even implemented by the dev team, there's no point in further suggesting those features. If you can't wait for cpg1.4.x to be released, you're welcome to get a copy of it right now and play with it (although I have to remind everybody that it's not yet recommended for production sites and comes without support).

Joachim