Advanced search  

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

Pages: [1]   Go Down

Author Topic: [Solved]: Re: Mod to sort thumbnails by rating in album view  (Read 4141 times)

0 Members and 1 Guest are viewing this topic.

BIG

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
[Solved]: Re: Mod to sort thumbnails by rating in album view
« on: December 30, 2008, 07:27:06 pm »

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.
« Last Edit: January 01, 2009, 06:59:15 pm by Joachim Müller »
Logged

divestoclimb

  • Contributor
  • Coppermine newbie
  • ***
  • Offline Offline
  • Posts: 16
Re: Mod to sort thumbnails by rating in album view
« Reply #1 on: December 30, 2008, 11:06:13 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:
Code: [Select]
SELECT filepath, filename FROM cpg14x_pictures WHERE hits<400;Save the result of this query.

Then you can delete the database entries:
Code: [Select]
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 :)
Logged

BIG

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: Mod to sort thumbnails by rating in album view
« Reply #2 on: January 01, 2009, 10:10:16 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Mod to sort thumbnails by rating in album view
« Reply #3 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.
Logged

BIG

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: Mod to sort thumbnails by rating in album view
« Reply #4 on: January 02, 2009, 09:14:20 am »

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....
Logged

BIG

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 33
Re: [Solved]: Re: Mod to sort thumbnails by rating in album view
« Reply #5 on: January 02, 2009, 09:42:02 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: [Solved]: Re: Mod to sort thumbnails by rating in album view
« Reply #6 on: January 02, 2009, 10:30:49 am »

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.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.