Change "sorting" when using batch upload Change "sorting" when using batch upload
 

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]

Main Menu

Change "sorting" when using batch upload

Started by sonic911, January 10, 2010, 05:20:54 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sonic911

Hello, I am using version 1.4.25 and using the ftp/batch upload procedure for most part (when uploading a lot of pics)


LIST OF NEW FILES
I really would want to sort the result with new pics first (the marked ones) so I dont have to scroll like an idiot for new pics (and/or old pics I missed putting in albums earlier) each and every time I go there =)

I am guessing this should be done n the file "searchnew.php", since the URL says: "/searchnew.php?startdir=ftp_dir/picture_dir"

So if/when I use ftp to upload pics, (this part in the docs: "4.11.1 Uploading pics by FTP / Batch-Add Pictures") I would like the pics I already actually added (unchecked) to be at the bottom and the new ones (checked) to be at the top, instead of just sorted alphabeticly on filename!

Anyone that can help me show how i edit this in the file searchnew.php (if that in fact is the only file needs editing?)

Thanks

/Michael

sonic911

I actually do not find an "edit -button" for the post so I had to make a new one


First of all, thanks to the admin that actually moved my post to "upload" instead of "miscellaneous" which I put it in first!


All I search for is a way of changing the sorting order

See screenshot (its in Swedish but I did illustrate it in English!)


http://easycaptures.com/fs/uploaded/211/6718399361.png


Thanx

/Michael

Nibbler

You'd be better off if you created a new folder every time you batch add images. If you use dates in the folder names the problem will solve itself.

sonic911

Yes, I can see that! But what I ment is, if I batch add 400 files at one time, and then will sort them out in about +4 different albums, I have to go back to the page equal amount of times!
Agree/Understand, with me so far? :)

Then the later visits will make me scroll and more or less look out for the few ones remaining that still is "checked"! Since the page is sorted via file-name that can be quite a long and hard search. Imagine there will be only 1-2 files left at the end, to put in the last album and they are sorted on place #17 and #398

Scrolling down in search for a small "check-sign" is very easy to overlook aswell!

Joachim Müller

Your FTP application will upload 400 files in one folder just as quickly as four times 100 files in 4 folders. Keeping several hundred files in one folder is not a bright idea anyway.
I suggest considering Nibbler's suggestion a bit longer... His words are wise! ;D

Quote from: sonic911 on January 11, 2010, 03:11:22 PM
I actually do not find an "edit -button" for the post so I had to make a new one
It's not there - we don't want you to edit your postings.

Quote from: sonic911 on January 11, 2010, 03:11:22 PMSee screenshot (its in Swedish but I did illustrate it in English!)

http://easycaptures.com/fs/uploaded/211/6718399361.png
Board rules! Especially "Post Links" and "Add Attachments" apply in your case.

sonic911

Sry. I misread, the board rules about that part!
I am not doubting one second that Nibbler isnt a wise guy (not a wiseguy :)) and I am sure you have a valid point in what you are saying!

I am still quite at a loss here though, since what I am asking for isn't even reconsidered by you in the first place!

Is that

a. because its not possible to do?
b. because it creates a lot of other issues?
c. requires changes from my part to more than just the one file (searchnew.php) ?

If the answer is anything but a. I guess its possible to do, and if it creates other issues, I'll be sure to make a backup first (as always)
I am a design guy!
I cant do php, other than when guided, thats why I use the application in the first hand! But still this issue sounds to me as if its only really a matter of sorting! Everything presented from a database is about sorting! Even random, is about sorting!

Dont get me wrong!
I love the app, and I will continue to use it even if I dont get this matter sorted out, but I still would like to get help with the sorting issue :)
Thats kinda my entire point by being here!

Even if I would to follow this advice:
QuoteYour FTP application will upload 400 files in one folder just as quickly as four times 100 files in 4 folders. Keeping several hundred files in one folder is not a bright idea anyway
.
Even if I uploaded only 50 files in one batch, and unchecked 10 of them to get 40 in the first album, I would still want the remaining 10 checked images to be presented on top next time I go there to add those images to the next album

So pretty please, with sugar on top....  :-*
Is it possible to make this edit, and in that case, where and how should I edit code? =)


Best regards

/Michael

Joachim Müller

Noting is impossible, you could code anything, given the time and skills, so option a doesn't apply - it never applies. However, I can't see the need and therefore I'm not ready to look into this and waste any time on coding this with an outcome that hardly will help much. The batch-add screen doesn't feature an option to sort anything, it uses the PHP function readdir to loop through the existing files and outputs them as it finds them. They don't get stored somewhere first and sorted and then output as a whole. Instead, they are read and printed to the output immediately exactly in the order that the file system returns - this makes the batch-add process much more robust and stable, especially for people like you who don't understand the details and therefore force the app to loop through a folder that contains hundreds of files. So, yes, it's both options b and c that are the reason for my reluctance to do anything in this aspect: it's not impossible to achieve what you ask for, but nearly impossible.

Back to the original proposal: if you store your files in folders as suggested, there won't ever be the need to loop through a folder twice: just store your files cleverly inside those folders.

Back to the board rules: I told you about them (well, you agreed to respect them anyway when you signed up anyway, so you have at least been told twice already), and you still ignore them? Instead of mocking me and the other supporters with remarks like
Quote from: sonic911 on January 11, 2010, 08:04:31 PMSo pretty please, with sugar on top....  :-*
you're required to do as suggested and post a link to your gallery. It's our decision who we support and what we require for support, and there is no discussion about the need to see a link to your gallery first. So respect board rules and don't waste our time by leading yet another futile discussion.

sonic911

Never mind!
I got assistance and productive help that actually solved things, from an outside forum instead!

Joachim Müller

#8
Sure, whatever. You claim to have gotten help yet you fail to post what the help actually is, which is very selfish (if it's true what you say in the first place). Anway, 3rd time you failed to do as suggested. You're banned.

Here's my farewell gift for you: <°)))o><