User-managed galleries - is that posible with Drupal 6?

Events happening in the community are now at Drupal community events on www.drupal.org.
kirilius's picture

One of the most frequently asked questions in Drupal's forums is how to create image galleries. Quite often the questions are about user-managed galleries but because they are not asked in a clear way, they usually get answers that are not useful. A number of solutions exist that can help the site administrator or editor set up a gallery but so far I haven't seen one complete native Drupal 6 solution that can handle user-managed galleries. Acidfree is probably the only one but it is far from ready for D6. So here is simplistic description of a typical user-managed gallery that I want to build on D6. Similar functionality can be found in Gallery2, Picasa, PhotoBucket, etc. I will appreciate if those of you who have build such things provide any tips or how-to materials ;-)

Requirements:

  1. Every authorized user should be able to create multiple galleries/albums
  2. A user should be able to add and remove pictures to/from any gallery owned by him/her and also change the parent gallery of an image
  3. A user should be presented with an efficient interface for managing the galleries and pictures within them.
    • Images must be presented as paged thumbnailed lists with options (icon links) for deleting and editing (and possibly reordering) adjacent to each picture
    • Galleries must be presented as paged thumbnailed lists with options for deleting and editing adjacent to each picture.
    • When galleries are displayed to other users those editing/deleting options should not be available
  4. An image should only exists in the context of a gallery. Thus:
    • It should not be possible to create an image without specifying a parent gallery
    • When a gallery is deleted, all images in it must be deleted as well (automatically). No orphaned images are allowed.

More can be added to the requirements but let's stick to the basic structure for now.

Constraints:

  1. To allow seamless integration with Views, Panels, etc. the galleries must me Drupal nodes.
  2. For the same reason images should also be nodes although this is not that important as long as the requirements can be met.
  3. I would also exclude Gallery2 and any other non-Drupal package. Bridges always cause problems in the long run and using views/panels will be a challenge as well.
  4. No custom coding! ;-))) Configuration, setting up views, CCK types, blocks, basic theming - yes. Custom coding - no. The reason is that the functionality I am asking for is really basic and available on almost every photo site where users log in and submit pictures in their own galleries. It makes no sense to me to build that from scratch in PHP.

I have tried different solutions and the closest I got was to use Node Hierarchy + CCK and Views. The nature of this type of galleries is hierarchical. A very simple hierarchy though - just two levels. Node Hierarchy gives you the ability to create a parent-child relationship between custom node types (e.g. Gallery and Image). Using views one can create thumbnailed pages to show all the pictures within a gallery. You can also have a child order (custom order of the pictures in a gallery). The problem I found with node hierarchy was that it still cannot enforce the relationships. I.e. one can easily end up with images without a parent gallery.

I have also thought about using nodereference to establish the Gallery-Image hierarchy, but one can easily delete a parent without deleting the referencing children thus leaving the site in an inconsistent state.

I also tried a solution using imagefield and some custom theming but it does not work well for too many images. Imagefield's interface is not so good if you have 100 images in a gallery for example.

So my questions are: Why is it so hard to create a user-managed gallery in Drupal. How can one create Picasa-type of gallery in D6?

Thanks for the suggestions!

Comments

take a look at..

likewhoa's picture

take a look at http://drupal.org/node/325272 it has a good comparison of the image handling modules, I have tried most of the image modules including, IMAGE,GALLERY,NODE_GALLERY,IMAGE_FIELD,Gallerix "seems good but doesn't have bug tracker in d.o and wants money for a widget". Right now I am testing photos module which seems to have all the features you requested but the ideal method would be to just use filefield+imagecache+views.

bending technology to fit businesses.

Image

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: