Build your Drupal Meta Module - Context, Spaces, Features, Patterns

paketmann.png

Drupal is modular. Drupal is more modular. Sometimes you feel Drupal is _too_ modular. Example: The recommended best practice for building a mainainable and generic image gallery uses at least seven Modules: CCK, Views, Filefield, Imageapi, Imagecache, Imagefield, A batch uploader like image fupload plus a template file and css for your theme. Uff. And now here you go and explain to a beginner that Drupal is easy.

Thing is: in the end it is quite a simple structure. Recently I came to my personal best practice: Using multiple values for an imagefield and the new image fupload for slick batch uploads. With the new feature in imagefield to add captions to images even when using multiple values and the ability to rearrange the order with the drag and drop widget there is not much to miss. With some Views and Taxonomy magic one should be able to build _Really_ large multiuser galleries, and if you want to seperate the images better you make single nodes of each - good news image fupload also supports this option. Sounds like a missing link, eh?

But this is not what this post is about.

Now how do I share this wonderfully flexible gallery with someone who came to Drupal only a month ago and is struggling with CCK let alone views without having to do it for him? This thought came to me and I asked people on IRC for a solution. I  found that just recently an entire bunch of modules saw the light of day that make up for this strength of drupal that can be a weakness.

Lotsa nifty solutions

There is context and spaces with features and also patterns Module that are able to save complex configurations of Modules and settings into something that can be transferred to other sites given the same modules are installed. I have not investigated in depth, so forgive mistakes about the exact way the modules do this. Context and spaces come up with a module in the end that you install and which then performs his magic. Patterns produces more of a portable code like you use for importing/exporting content types / views / panels.

Here's a presentation screencast for patterns. There is also an explanation available on drupal.org what exactly is the difference in approach between the two alternatives and how they complement each other. There is even an entire group on d.o. that is on deployment and packaging. Wow.

I am not sure if any of the modules solves the problem that this approach also needs styles to be added to style.css and you might need a template file - normally the system does not have write access to the themes directory so this might be tricky. Storing styles inside the database makes every purist shout bloody murder. But I am sure this problem will be solved.

All these approaches have in common that they differ heavily from installation profiles: installation profiles can only be performed on the first install of your site. These approaches can be used anytime to add features to an already existing site. So the use cases are different and can well complement each other.

Together with the new energy that is put into installation profiles this might take Drupal to another level: We can preach the holy purity of CCK/Views/writeyourmodulenamehere solutions and at the same time make them affordable for Non-Drupal-Ninjas. I am really excited about this and we will see what the enormous creativity of Drupal Developers brings to us next. The daily needs for better solutions brings on the power to solve problems that have been there for quite a while, so one can be very confident. Rock on!

 

Kommentare

Dan

It's so funny that you used the example of the cck, filefield, imagefield, views, FUpload, more and more modules to create an image gallery. I have been investigating the Drupal image gallery solution for a long time and making it something an average user, rather than us Drupalers, would enjoy and easily understand using is a big issue. I too have been excited about the use of all of these modules to create a image gallery solution, especially since all I hear is that imagefield is the future of images in Drupal. But you are right that trying to give the instructions on setting this up is a giant task.
As much as I love using Drupal and promote it under all circumstances, I have difficulty saying to someone who just wants a family website to put up picture galleries of their kids to setup this solution. Unless, of course, I'm the person setting it up for them. And since that is usually the case, the solutions you are discussing here could definitely be a huge help. I will look forward to reading up on, watching the video presentation and experimenting with these modules. Let's keep our fingers crossed that it could help us bring easier solutions to people who are interested in using Drupal for a given task.
Thanks for the information.

I, too, prefer roll your own image galleries and image fupload is the missing link for me that I never knew about.

I've been watching spaces / patterns for a while with interest. I was looking for something like that 1.5 years ago ( http://shellmultimedia.com/blog/why-not-install-profiles ) and am excited that we're finally getting there.

Michelle

Sinkva

Where do I find the "recommended best practice for building a maintainable and generic image gallery" ??

Is there a "Drupal 6" answer?
Google only points me to partial solutions...

Bild von tommi
tommi

Well I admit being guilty of promising something I do not deliver - this would be another post describing how I do this.

My post as it is was rather targeted at somewhat experienced Drupal Users that know all these Modules - which can take a year :(. As you express this interest, maybe I will outline the way I build this in another post.

Mitchell

Great article!!

Disclaimer: This may also be viewed as advocacy for my Summer of Code application, entitled: Package Management.

I have taken a different approach to this umbrella concept of packaging and meta-packaging. I'm using both install profiles and modules together. The install profile is the Base Distribution, and the configurations/components are assembled into packages. Packages will most commonly be available as a single module or a Drupal/Package combination. Later there will be an option to download an entire LAMP/Drupal/Package virtual machine as well, all from an open source web application.

An Image Gallery based on a CCK, is a perfect example, rather than a one-size-fits all module like galley2 or acidfree. I agree that CCK is a best-practices starting point, and therefore it is one of the Base Components (part of the Base Distribution). It makes perfect sense for someone to build an image gallery with the components you described, but one thing that I believe my system offers, more so than the others, is a way for everyone to make a Video Gallery or Music Gallery all based off of the original Image Gallery. This is made possible by having granularity within the settings and the plugin/code extensions. Alone, this granularity is not the holy grail we need, because a unified website for sharing and building packages is vital as well (kinda like the digital music revolution that came after iPod + iTunes, not the mp3 alone).

To see more about the three necessary parts and links to a glossary and further comparisons, visit http://drupal.org/project/package-management

sinkva

Either an outline or a link to a discussion of "best practices" would be very appreciated. Drupal 6 would be best.

articles

Good article..!! I truely accept the facts you presented about Drupal. I really agree

I agree with von Dan, allot of work left on this module, but it will be worth it when it is all said and done.

Kalamazoo Web Design

The modules are what we love about drupal.  They allow for really powerful CMS.  We do sometimes have to hack modules for the desired output or look.  Drupal is the best on the block.

Gast

Please checkou out: http://www.quiptime.com/downloads/drupal6/gallery_assist

At the moment, "Easy Gallery" still highly developed. The goal is: A gallery in 3 steps. Simple, fast and efficient.

1. Enable Module

2. Administer Access and Layout

3. Create galleries

In one, the latest in two weeks, is the development of the modules completed.

Quiptime

 

nwwoman

You typed: "With the new feature in imagefield to add captions to images even when using multiple values and the ability .."    and I went ..huh??  

How are you doing this?  I'm using latest versions of cck, imagefield, link field, views, panels...and am now on day two of how to display a caption for my linked image (link field module used). 

I'm not a coder/programmer so I've been trying to learn how to modify the content-type I created so that the title for the image could be the caption.  But so far, I'm only 25 percent of the way there.

Anyway, I got a jolt when I read your sentence re this "new" feature.??  I've searched..  what new feature?  How do you do captions in cck??

Hoping ..

 

 

 

 

dido

Very good post, thanks a lot.

Gast

Große post, danken

my blog

Neuen Kommentar schreiben