When I create a Node Gallery using the plupload integration, all gallery image nodes get created in the reverse order of the original list I drop onto plupload.

It is a pain to re-order all images nodes in the gallery afterwards.

It the any way to force the nodes to be created in the order specified in the upload list?

Thank you

Comments

thatjustin’s picture

+1

thatjustin’s picture

Status: Active » Needs review

Here is how you can have plupload upload your images in reverse order. Plupload uploads the first one in the queue first, which will be the NG image that is created first. Which will make its default sort order last. Which totally makes sense, and, unfortunately not what some (most?) of us want.

This is what I did. I had to edit plupload.js and the one that you get by default is minified. The non-minified plupload.js is distributed in the src/ directory of plupload. The source is are also distributed in the dev downloads listed here.

So, get the non-minified plupload.js and replace your plupload.js in /libraries/plupload/ and edit it so that you are swapping

for (i = 0; i < files.length; i++) {
with
for (i = (files.length - 1); i >= 0 ; i-- ){

If someone wants to, they could fork plupload and post the minified version. That would be peachy keen.

marktheshark’s picture

I ended up reverse sorting my selection, then drag'n'dropping it on plupload.

Thanks for the suggestion above.