Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Albums in Gallery

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1 2 3 4
Go to End
Author Topic: 5599 Views
  • UncleCheese
    Avatar
    4085 Posts

    Re: Albums in Gallery Link to this post

    If you're just showing photos, you guys might want to try out my extension to the Gallery module here:

    http://www.silverstripe.com/extending-hacking-silverstripe-forum/flat/218462

    Album support in the next release..

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Albums in Gallery Link to this post

    I will post a complete example tonight

    UncleCheese: I love your extension, it's just what I wanted for controlling the images, particularly the drag and drop reordering, great work! I think what I was doing here to have a gallery holder should still work the same with your extension, all I'm doing is calling each childs first page images to display in the holder. Kind of like albums......how are you going to do the albums in your next release?

  • UncleCheese
    Avatar
    4085 Posts

    Re: Albums in Gallery Link to this post

    Glad you like it! You gotta love bulk uploading, right?

    As of now, I'm using a basic "GalleryHolder" page to loop through the child pages for "album" management. Works fine. It's a little heavy, though, because each ImageGallery page just carries so much data around with it that is essentially redundant (per page, popup size, etc..). But for now, that should work fine for you.

    Two things I have in mind for albums -- an image gallery page will get an Albums tab, which will be a simple TableField to manage a has_many relation to albums. On upload, you'll get a select box that will let you choose the album you're uploading to.

    I'm also wondering if I can use the DropdownField_WithAdd (I believe that's the name) to manage albums on the front end. That would all you to choose an existing album, or add one right there.

    The big question, though. How do you move all photos from one album to another? Agh!

    Ideally, of course, we're eliminating all the noise of having multiple pages for each album, each with its own configuration, etc. It's too much. The next release will allow you to call an album name through the Action segment in the URL.

    Shouldn't be too long. I'll start work on it today if I can.

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Albums in Gallery Link to this post

    haha, I hadn't even realised you could batch upload, that rocks!

    The albums sounds awesome too, you're right it's a little heavy at the moment having all those settings per gallery, and also annoying if you want to change the sizes of thumnails etc you gotta do it in all the child galleries.

    Are you going to tag each image to decide which album it's going into? If so then to move from one album to another all you'd have to do is batch edit that tag right? In the popup for each album you could have an option to merge/transfer the images in that album into another. Perhaps I'm oversimplifying that, a lot of the stuff you've done is above my level at the moment

    Anyway great work mate, looking forward to seeing what you come up with next!

  • mhull
    Avatar
    Community Member
    79 Posts

    Re: Albums in Gallery Link to this post

    Aram,

    Did you have that code to create the album? it would be helpful if you could upload it.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Albums in Gallery Link to this post

    New version is just about ready. Give me a few more hours.

  • mhull
    Avatar
    Community Member
    79 Posts

    Re: Albums in Gallery Link to this post

    I am actually after Arams code as described earlier in the thread
    and hoped he could upload the 
GalleryHolder.php, GalleryHolder.ss that he had working

  • Aram
    Avatar
    Community Member
    598 Posts

    Re: Albums in Gallery Link to this post

    Ok the .php and .ss files are in the zip below.

    Basically all im doing is cycling through the cildren of GalleryHolder and calling the function CurrentGalleryItems, which is then formatted by the same code that is in GalleryPageContents inbetween the <% control CurrentGalleryItems %> <% end_cotntrol %> call.

    I also copied the init function from GalleryPage.php so that the lightbox will work on the holder page.

    If you have any trouble let me know, I have quickly remade these files as I had some other customisations in there that I've taken out, namely a different lightbox (shadowbox) and a CSS layout for the thumbs, so I havnt actually tested these files. They should work though, theres nothing complex in there.

    5599 Views
Page: 1 2 3 4
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.