CCK Image Gallery Module?
mcantelon - April 9, 2008 - 22:49
Is there a module that allows you to create image galleries out of nodes with CCK images?
I've hacked together something rough that builds on http://drupal.org/node/144725 but manages the process a bit, allowing user submission of images, review, open/closing of galleries, etc.
Mike

This is one area where
This is one area where Drupal is broken. Badly!
For such a sophisticated development environment, the overwhelming desire to treat everything as a node has blinded the developers to the fact that image-intensive sites cannot be managed on this basis. And the lack of consistency in image handling, (image vs CCK Imagefield) means that one method will break the other.
Users are screamng for image subdirectories and filename control with uploads. There is no common image-handling functionality and nothing has been committed to core. The task has been left to a cluster of independent module developers who are continuously re-inventing the wheel and working at crossed purposes.
Treating an image as a node is fine for one or two images. For bulk images, we need to define another content type, image, which is not a node! Then, attach one or more images to a node.
We should be able to categorize the images into subdirectories, and create a content type called gallery for which you simply define the subdirectory for the node to find its images. The module could collect the file names from the directory to establish its content. Include a pager, definable table formatting for thumbnails, and imagecache style preprocessing on the fly if required. Pass the appropriate file name to a thickbox or similar presentation if the user clicks on a thumbnail.
If you wish to define the images in the database, tell the database the directory and let it record the image files. Then set any attributes on the images, like taxonomy terms, in a separate administrative module.
There are so many twists and turns in the way Drupal manages images and galleries that I am taken back to the days of the 'goto' and spaghetti code. Drupal developers should stop trying to patch this, and make some basic strategic decisions on how images are handled.
1. Upload and node creation are NOT the same thing. Do not make me combine them.
2. Do not make me place all files in the same directory. Large numbers of files badly affect the efficiency of disk access.
3. Do not make me go through a labor intensive process of uploading, naming and categorizing files which I have already named and categorized into directories.
4. Do allow me to use files already on the server.
5. Do allow a single content type which will handle a gallery.
6. Do KEEP IT SIMPLE!
I just finished a site for an architectural client. After wasting my time with Drupal, I started from scratch, coded a taxonomy based selection and navigation for the photos, and had a working prototype up and running in two weeks. The primary reason for abandoning Drupal was the lack of efficiency and consistency in its image handling.
I swear by Drupal for its ease in establishing a working interactive site for a client, and I will continue to use it for such. But until the developers have realized the problems with its image handling, it is more efficient to leave the drupal environment for image-intensive sites.
Hello, Is it still the case
Hello,
Is it still the case ?
I am new to drupal and supposed to do a website that is "image-intensive" as you say...
.
Drupal can handle a lot of nodes. If you are going to have hundreds of thousands of images, though, you would probably be better off bridging to a dedicated gallery application.
Michelle
---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)
i agree!
i am very new to Drupal and so maybe i don't know what i'm talking about, but i just don't understand why you can't add an image gallery as a field to a node to keep everything together.
i've now spent almost 40 hrs trying to work it out, and i'm not stupid or computer illiterate & have many years experience in HTML/CSS web design, mild java programming and flash . I've tried various modules and solutions, and i'm sure i'll get there in the end, but why does it need to be SO counter intuitive & complicated?
Just trooping out the company line of 'you just need to select the solution that's best for you' is frustrating, unwelcoming, and just plain ridiculous. there should be a strong simple core of image handling features WITHIN drupal core.
It seems that the basic ethos of Drupal is that all sites should be text based, and that the internet is entirely a text-based medium. Again, just plain ridiculous.
As I said, I am very very new. But even if i have everything back to front, at the very least Drupal tutorials, support and documentation do an appalling job of making things clear and cutting through the opinion, gossip, self promotion and rubbish.
I see there is a move to create a new Handbook in an attempt to address some of this confusion. THIS IS NOT ENOUGH!!!
I realise it's the basic architecture of Drupal, but why is there a CORE module to create a blog, but not core image handling?!! absolutely BARMY! it's frankly WAY beyond me. Obviously.
Beyond you?
If you can't grasp the concept that nothing gets into core without someone who wants/needs it putting in the time to write it and polish it and get it reviewed, then perhaps open source isn't for you.
FWIW, Drupal 7 finally has the needed folks working on the problem and so will come with image handling.
And no one thinks Drupal sites should be text based. The problem isn't that there is no way to do images with Drupal. The problem is that there are too many ways to do it. There's at least 10 methods and they all work and suit different needs but there is no one "default" way for someone who comes along and just wants to add images and not take the time to research all the possibilities.
Michelle
---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)
dont get me wrong!
thanks for your replies and suggestions. i'm not attacking drupal as a system or open source as a concept. i CAN see the power of drupal CMS and open source development, and i have tried various solutions including node gallery, imagefield/imagecache/cck/views, brilliant gallery/lightbox etc, most of the more popular modules for image handling and followed tutorials from ebooks and videos by lullabot, learn by the drop, drupal school, mustard seed, etc.
it's fantastic that drupal core will have (hopefully robust) image support in release 7. but that's taken a hell of a long time to integrate something so fundamental to a user's internet experience.
my point is i HAVE researched the possibilities, pretty much full time for a week. as a newbie, i understand that it's very probable i'm missing the point and most likely something incredibly simple that seems obvious to the core knowledge of regular drupal users. this is how the learning curve works, i understand and respect that. a little frustration and hard work makes the eventual solution all the sweeter. but i'm not the first to have asked how to integrate an image gallery as PART (ie field) of a another content type. i've looked at node gallery, and it's great, but how do i integrate that into another node? or is that not how i should be looking at it?
if it is that i'm looking at drupal the wrong way, then is there a no nonsense, easy to follow explanation of the structure of drupal sites and how various components fit together (nodes, views, blocks, regions, search functionality)?
if there is a simple solution, i sure as hell will write it up so's other newbies following me can save time wading through all the various (and it seems to me often superfluous) possibilities.
.
You're not reading what I wrote. Image handling is a problem in Drupal. There's tons of different ways of doing it, no One Way. This means development is splintered over a whole bunch of paths and it's hard to know what to do. I've been with Drupal over 4 years and I still struggle with it. My point is that getting something into core isn't a matter of saying "this should be in there". You have to have a very dedicated individual or team who comes up with a solution that the majority agrees with, polishes it until it's perfect, and then pushes it through the review cycle until it's committed. Getting something into core is hard enough as it is and doing so with something like image handling that doesn't have any consensus on the "best way" is a herculean task. It's really not surprising that it's taken 8 years.
As for putting a gallery on one content type, I'd use imagefield for that. Imagefield Gallery made it a snap in D5 but, unfortunately, hasn't been officially ported to D6. I've been told that it can be done with views, but havent' investigated that yet.
Michelle
---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)
thank you
thanks michelle!
i'm sorry if we've got off on the wrong foot. i don't mean to be derisive about drupal or open source. i truly believe it is the best way to develop a system based on merit. and when you describe the process, i can see that arriving at a consensus on the 'best way' is not an easy task! it's good to see that it is moving forward, and it is a credit to drupal and open source that people are so passionate about it. thank you for taking the trouble to help me. i am using D6, but i will look at imagefield for ideas and hopefully find a suitable solution from there!
It's ok
Now you understand, though, why posts that say "I can't believe X isn't in core already you slackers!" don't get a good reception. (And no, you didn't say exactly that, but that general them runs through way too many posts.)
Imagefield is definitely a good route to go. It lets you attach images directly to the node without making each image a node on its own. Then the trick is to display them nicely.
Michelle
---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)
Take a look at Node Gallery
http://drupal.org/project/node_gallery
Fully integrated with node system, allow use of CCK, Views, Taxonomy etc
Aigars Matulis
www.esoulution.com
All the time spent on this
All the time spent on this thread going back and forth (being reactive, at best) instead of using that time to come up with a game-plan, solution, or something (being proactive) is exactly why it's taken eleventeen years to come up with what we have as opposed to something solid (or at least "positive").
Addressing the original question, "No" -- there is not a stand-alone module that will do that (that I know of... except for what matulis wrote above). However you might also find this quite helpful (I certainly did): http://drupal.org/node/449730
_
Michelle has already said everything I would say. I just wanted to pop a link on this thread for future reference.
At the moment, imo one of the best, and most flexible, ways of going galleries finally has a decent screencast. See http://www.lullabot.com/articles/photo-galleries-views-attach for more info.
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
Mostly Targeting for Core
Thanks WorldFallz, that link represents "the way" for a lot of developers. It's certainly the way that Lullabot uses on 9/10 sites. Regarding comments about "this has taken way too long", I can't agree more. We're working on putting the majority of the functionality used in that screencast into core.
- ImageCache is already in, and is being polished up.
- FileField is being added to core to replace Upload.
- ImageField will be added to extend File Field specifically for images (thumbnails).
However, there's still a huge chunk missing, which is Views module and with it the ability to create a decent gallery listing. Views is the #1 installed contributed module, and it would be ridiculous of us to make a custom gallery module in core, when Views has this ability 100 times over. However, Views alone is nearly the same size as all of core. It's a massive amount of code and building it into core is going to take some time that is beyond the Drupal 7 timeframe.
What I'd like to point out though, between what we will have in Drupal 7 and what we have right now, hardly anything will change except that a bunch of solutions are being moved from Contrib to Core. The ImageField/ImageCache/Views combo has been around for nearly 3 years, it's just that it was left up to end-users to figure out how to put them all together. In Drupal 7 we'll improve this significantly by making it a Core/Views combo, but it'll still require some research to get the "gallery" side of things unfortunately.
Nathan Haug
creative graphic design w: quicksketch.org
& software development e: nate@quicksketch.org
I still think it will help
Right now, we have a ton of different ways to handle images, only some of which involve the modules you mentioned. I think having those in core will give them a psychological advantage and hopefully the solutions will start to narrow down to focus on what you can do with those 3. If just about everyone is using the same base modules for images, then the gallery solutions will just be variations on what you can do with them, likely all or at least most using views. So there will still be some variety, which is good, but not the utter chaos we have now.
Michelle
---
I'm looking for folks to help me out by posting in my Coulee Region forums. You don't need to live in the area; there's plenty of general forums. But please, no Drupal support questions. :)
_
I think you're underestimating the effect that moving the filefield/imagefield/imagecache trifecta into core is going to have in this area. i believe it's going to be game changing-- as Michelle pointed out what we have now is utter chaos. Having the 'big 3' in core will immediately funnel the majority of users in the right basic direction, which we don't have now. Then it's just a matter of variations on the views used and whether you make taxonomy or node based galleries. imo loads of image based contrib modules will be clearly unnecessary or reduced to special cases.
I've been following the progress of d7 with great interest hoping to be able to contribute (alas my skills are still not quite there yet)-- it is going to be a game changer-- I can barely wait. Kudos to you and everyone working on it!
_
Don't be a Help Vampire - read and abide the forum guidelines.
If you find my assistance useful, please pay it forward to your fellow drupalers.
jeff eaton is a genius
HURRAH!
now i haven't even attempted this yet, but finally there it is, a viable solution! thank you so much worldfallz for the link!
it seems my frustration at the bewildering array of image handling options has finally been narrowed! YAY!
i still have the fresh-out-of-the-box, wide-eyed, naive view of drupal, but as a total newbie who's dedicated an entire working week to getting to the bottom of this, i would like to wholeheartedly thank the good folks who've worked on this! if my vote is worth anything, having looked at most of the image handling options, cck, views, imagefield/imagecache and vitally viewsAttach is where its at for me!!!
YES!!! i'm really excited again!!!
the vibrancy of this community is astounding. fairest of play!
http://drupal.org/project/vie
http://drupal.org/project/views_gallery (module based on http://www.lullabot.com/articles/photo-galleries-views-attach , so you do not need to do all these setting from lullabot podcast manually - everything will be done by this module)