File Set Question

Permalink 1 user found helpful
Hello,
Can a file set have an associated order to the images?

johndorsay
 
andrew replied on at Permalink Reply
andrew
In 5.4.1 we are adding this.
johndorsay replied on at Permalink Reply
johndorsay
Ok cool, so in case anyone was wondering. I did solve this problem.
I found out that you can create file attributes, just as one would with page attributes. So I created a rating attibute then in a custom template I order the images based upon this attribute.

Who knew :)
jaredquinn replied on at Permalink Reply
jaredquinn
That's excellent news - been looking forward to this feature :)
senshidigital replied on at Permalink Reply
senshidigital
Excellent news!

I hope this is coming out soon as I have a photography client who specifically asked for this. ;-D
jordanlev replied on at Permalink Reply
jordanlev
In case you don't want to wait until 5.4.1 is released, I have a block I've created and use for my own client projects that allows photos to be sorted via drag and drop. I was going to release it on the marketplace until I found out that 5.4.1 is going to have fileset re-ordering.

If you're interested in using it let me know and I can send it your way.

-Jordan
johndorsay replied on at Permalink Reply
johndorsay
That would be great, thanks.
Maybe this is a block that we can work on. And release to the marketplace.

Here is were I'm really trying to get to,
Grab an ordered file set, grab a video link and load all of it into an ordered list to be viewable in a light box.

I've got the file set working right now, I love hoer idea of a drag able ordering then have the client add a video link into a (block?). In the end the images and the video link will all be part of the ordered list. Hope ghat makes sense and if it doesn't. You can see the dev site here and click on the photos tab
http://www.internexusdev.com/grandtheatre/index.php/mainstage-theat...

Thanks
-John
Thanks again
johndorsay replied on at Permalink Reply
johndorsay
@Jordan
I just found out that we can import videos directly via the incoming files, so guess you have already created this add on in it's entirety. If you have the chance I'd still love to use the code
-John
jordanlev replied on at Permalink Best Answer Reply 1 Attachment
jordanlev
I've attached the package. You will need to modify a couple of things to make it work for you:

1) The current front-end (view.php) displays thumbnails of each image as DIV's and includes the jquery "colorbox" lightbox effect. Modify the html in the view.php file to output list items or whatever you want, and if you don't want the lightbox at all, remove the "colorbox" folder from the blocks/sortable_gallery/ folder, and remove the entire "on_page_view" function in the blocks/sortable_gallery/controller.php file.

2) It is currently set up to ONLY show images. You will need to change "$sg->getPermittedFiles(true)" to
"$sg->getPermittedFiles(false)" in TWO places: blocks/sortable_gallery/controller.php (in the "view" function), and in tools/get_thumbnail_items.php.

3) I'm not sure how it is going to handle files that aren't images (like your videos) -- it probably will just show a broken image link in the add/edit dialog (but should show its title so it can still be identified and dragged/dropped). But in the view.php file it might choke when the controller tries to create a thumbnail for it -- you may need to modify that code in the
"view" function in blocks/sortable_gallery/controller.php so it somehow identifies what kind of file it is and only does the thumbnail thing for images (and does something else sensible for other kinds of files).

Hope this helps!