[Solved]: Re: Mod to sort thumbnails by rating in album view [Solved]: Re: Mod to sort thumbnails by rating in album view
 

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

[Solved]: Re: Mod to sort thumbnails by rating in album view

Started by BIG, December 30, 2008, 07:27:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

BIG

to add on to this...... Is there a way to delete pictures by number of views. Example I have an album with 400 hundred pictrues and I want to delete all that have less than 30 views is there a way or at least get that to happen in properties that you can sort them by views then I can delete pages at at time.

divestoclimb

Quote from: BIG on December 30, 2008, 07:27:06 PM
to add on to this...... Is there a way to delete pictures by number of views.

I don't know of any way to do this in Coppermine itself but you could (sort of) do this directly if you know your way around a database and a command line.

Find all the pictures you want to delete with this:
SELECT filepath, filename FROM cpg14x_pictures WHERE hits<400;
Save the result of this query.

Then you can delete the database entries:
DELETE FROM cpg14x_pictures WHERE hits<400;
...and then delete the files from the albums subdirectory of your coppermine install location. If you have shell access to your web server this can be easily done with a little shell script using the output of the SELECT query.

This won't delete the comments, but I don't think that will cause a serious problem in the database. Deleting those would require some programming.

...and if none of this makes sense you'll need to wait for someone to write a script that does all this for you :)

BIG

Now thats more than what I do now. I just look at a number of views then delete them manually but would be nice if auto... Would be a nice add on feature.

Joachim Müller

This thread has originally been posted as a reply to a totally unrelated mod announcement thread. Split and moved accordingly.

@BIG: you caused a lot of extra moderation effort. Your behaviour to hijack an existing mod thread with something completely unrelated was very silly and selfish. Respect board rules and common sense in the future. The question you asked has been asked and answered countless times already - you just where to lazy to respect board rules.

@divestoclimb: thanks for your readiness to help even if someone abuses "your" thread. Please don't do so in the future. Instead, please tell people like BIG that it was wrong to try to hijack an announcement thread. Tell them to start a thread of their own on the support board after having searched the board.

BIG

Quote from: Joachim Müller on January 01, 2009, 06:58:48 PM
This thread has originally been posted as a reply to a totally unrelated mod announcement thread. Split and moved accordingly.

@BIG: you caused a lot of extra moderation effort. Your behaviour to hijack an existing mod thread with something completely unrelated was very silly and selfish. Respect board rules and common sense in the future. The question you asked has been asked and answered countless times already - you just where to lazy to respect board rules.

@divestoclimb: thanks for your readiness to help even if someone abuses "your" thread. Please don't do so in the future. Instead, please tell people like BIG that it was wrong to try to hijack an announcement thread. Tell them to start a thread of their own on the support board after having searched the board.
Joachim and whoever eles that was not my intent I posted it in the wrong spot just that simple no need act like I stabbed someone in the neck...I did do a search and that where it lead me I didn't look at the threads location as it took me directly there,,, I just asked the question. Please forgive me as I am sure you have never made a mistake. Last I am not a thread jacker once again an honest mistake...If I could have found the answer I would not have asked the quesiton as my question had to do with views and not rating....

BIG

Since the post doesn't have a name more fitting I think I wont get the help I need anyway,,,, feel free to delete the thread.....as it has this name [Solved]: Re: Mod to sort thumbnails by rating in album view 

My quesiton was is there a way to sort the albums by veiws not ratings druing file edit. Then I could delete file with little or no views very quickly,, if not then it would be a requested feature..I dont write PHP so this is the only reason I was asking.

Joachim Müller

Your postings get read no matter what. However, we have a strict "one question per thread" policy, so it's not a bright idea to come up with another question. That's why I'm locking this uselsess thread. We never delete threads as per our moderation policy unless they are spam, so we definitely won't delete this thread.
If you have questions, read up board rules, then start a thread of your own.