The Gallery module is an excellent one. The only problem is, it can't be modified. If I want to add pre-existing fields to its node type, tough luck.

Would it be possible to recreate this image-to-gallery relationship using the CCK?

Comments

Rob_Feature’s picture

Sure, if I were to make a gallery with a CCK type, I'd just use views and taxonomy to do it. I would suggest:

-Your first view would be a page that's the collection of galleries, all showing the latest image and gallery description. (these would be your taxonomy terms)

-Your sub pages would simply be views pages, showing all images of that taxonomy. Using contemplate here, you could style your teaser images (the gallery images) and your full nodes (when you click on the image in the gallery).

Seems like a pretty straight forward application of views and taxonomy working together.

/**
  * Bob Christenson
  * Mustardseed Media
  * http://mustardseedmedia.com
  */
bajakan’s picture

agreed... very good use of views, taxonomy and image. One thing that might throw people for a curve is the use of CSS to make the nodes in the view appear like a gallery (x number per row). you can accomplish by telling the view to display in list view, and then using CSS to float left all the items in the list, among other styles.

xxparanormalxx’s picture

brilliant. i knew how to do this. just didn't put it all together in my head. thanks for pointing this out.

Rob_Feature’s picture

After posting this, I realized there's one hurdle to overcome. I haven't been able to figure out how to get a list of Taxonomy terms out of Views. See the explanation here:

http://drupal.org/node/128085

-Bob Christenson
Owner/Designer, Mustardseed Media, Inc.
MustardseedMedia.com

/**
  * Bob Christenson
  * Mustardseed Media
  * http://mustardseedmedia.com
  */
Rory--’s picture

...getting permissions to work. With the gallery module, I'm pretty sure the gallery owner can decide who can add pictures to his gallery. CCK's nodereference tables (what I'd assume I'd use to add it to the gallery) doesn't have permissions like that. Ditto the Node Relativity module.

q_man’s picture

No, not between people, but a place to use the arguments function in views or Drupal in general.

I am new to Drupal and don't know enough to say for sure, but I recently added a context sensitive embedded view to my project nodes to show a selection of images associated with the active project node's name. This worked great and showed me some further dynamic possibilities were there that I had hoped for.

I am very interested in finding a decent solution for this as I am looking to implement an advanced gallery in Drupal myself.

I wonder if the current user name could somehow be passed on to a form field in an image node through some argument so that creates an automatic association with a gallery node matching the user name.
You can certainly use cck to create a gallery node type, views to create a gallery view that shows images associated with the gallery node name and possibly the usernode module to automatically create a gallery node for every user with their name on it which can then have images associated with it.

My work in progress on trying to implement similar features is at the address below.

http://www.disscamera.org.uk/index.php

uniterre’s picture

So please, how did you manage to create "Camera settings" fields on your image'nodes (for example on http://www.disscamera.org.uk/node/29) ?

Regards,
http://www.uniterre.com

q_man’s picture

...group.

It's not very elegant and requires manual input from the user.
I hope to get the exif module working but my hosting is configured as PHP4.4 and the site has been created like that, they do however have PHP5 but all files must be renamed .php5 or the php version can be reset to interpret using php5 for all php files but I tried this and my site disappeared so I unset it.....

http://www.disscamera.org.uk

Rob_Feature’s picture

Now, I'm not sure, since I haven't thought thru it very long...but it seems the Taxonomy Access module could address this issue. Each gallery would be a taxonomy term, and taxonomy access allows users (based on their role) to be given permissions based on taxonomy.

Seems like a good match, but again, I haven't tried it out...

-Bob Christenson
Owner/Designer, Mustardseed Media, Inc.
MustardseedMedia.com

/**
  * Bob Christenson
  * Mustardseed Media
  * http://mustardseedmedia.com
  */
Rory--’s picture

The problem would be, though, that users creating the gallery would have to decide who was and wasn't allowed to create inside the gallery. That would probably involve giving them some administrator powers, which is a no-no.

q_man’s picture

I am currently trying to impliment this suggestion by BobChristenson.
I have no real concern about permissions like later posters since all users (a limited list of local paid up cub members) will be able to associate their images with any project or competition nodes and for individual user galleries I plan on having views collate them by author ID.

The problem I am stuck with at the moment is trying to figure out how I can create a Galleries front page which has a number of grids containing a teaser image, title and link to each sub-gallery. Each Grid wants to be dealing with a different way of collecting the images.

My planned page would be as follows:

Title: Diss Camera Club Galleries

Grid 1: Title: Galleries by User.
Grid of thumbnails with 1 random or latest image per user, with their name below with both image and username being linked to a seperate page view listing all the pictures by that user.

Grid 2: Title: Galleries by Project.
As previous grid but 1 image per project (project is associated to an image by node reference cck field) and linked to a view listing all pictures associated with that project.

Grid 3: Title: Galleries by Competition.
As previous grid but 1 winning image per competition (competition is associated to an image by node reference cck field and a cck field created to rate or delineate winners) and linked to a view listing all pictures associated with that competition.

My main headaches are :

1. How do I limit the number of nodes returned in the view to 1 or another specific number per user/project/competition?
2. How do I present three different grids (essentially views in themselves) in one page?
3. How do I get images, usernames, project titles and competition titles on this page to link to the subviews/galleries that they represent? Currently they seem to automatically link to either the specific image node or user profile etc.

Any help you can give would be much appreciated.

My work in progress is here:

http://www.disscamera.org.uk/galleries

P.S. Bob, I like the design of your mustardseed site by the way. Very neat and pretty.

possum4all’s picture

I needed something super simple and this technique worked out great for me, q_man, thanks for the info.

This is proving to be THE most usable solution I could find for my users -- versus using taxonomy, views and template mods.

t4him’s picture

this is a stickler using cck & imagefield. How would you select "ONE" image from each term?

kirilius’s picture

I am also interested in a solution to attach a group of images to a node. I like the idea to use views but here is my question:
Suppose I have the view(s) in place. How can I attach that group of images (defined by the view) to a specific node?

q_man’s picture

hope those help you attach views if you haven't figured it out already. The first would expose it to content creators the second might be less visible if users arent allowed to enter php code. You can also embed it into your php templates for a content type but I'm not sure for individual nodes - see http://drupal.org/node/124446 for more info and discussion on how to embed views.

bsonnich’s picture

Viewfield seems to be the right solution for that. Although it's the same egg I'm trying to crack.

http://drupal.org/project/viewfield

possum4all’s picture

This is a manual way to do it....

Just make it a block view then config the block to only show your view on a particular node id?

Example:
1. Create your view as you would any other....node + filters, etc..
2. Create a block display of the view
3. Visit blocks
4. Assign your new view to a page block, save
5. Under Page Specific Visibility.... "Show on only the listed pages." Then add your node number. save
6. Should show up on your node.

doc2@drupalfr.org’s picture

Have a look at this handbook post:
http://drupal.org/node/144725 HOW TO: Create an image gallery using CCK and Views (not Image Module)

These forum topics:
http://drupal.org/node/144726 Forum redirection for previous post.
http://drupal.org/node/156287 Image Gallery with CCK and Taxonomy

Hope this helps. Arsène

konsumer’s picture

I think my method was pretty simple and I set it up pretty fast. It works really well for my setup.

I made a couple galleries with these criteria/features:
  • galleries as nodes (so they can be edited easily by client) 1 (gallery) to many (images) relationship, but not 1 image to many galleries - each image is to be shown in a specific gallery
  • thumbnails, cached for speed
  • Don't have to worry about taxonomies
  • Automatic list of galleries
  • No custom view/CCK theming, so I don't have to worry about copying theming files, just do it in CSS, also views and content-types can be exported for different sites in the admin, which makes it fast to setup.
  • Use more versatile imagefield, instead of "image" module (I don't even have the image module enabled, I don't use it.)

This is how I did it:

install and enable the following modules:
  • CCK (the module is called 'Content', not CCK)
  • Imagefield ("Image" under CCK in "Modules" admin)
  • Imagecache
  • Views(optional) (also turn on "Views UI" in "Modules" admin)
  • Thickbox (optional)
  1. Enable clean-urls (needed for imagecache)
  2. Go to yoursite/admin/settings/imagecache. Create a profile for "thumb". I used "scale", "inside" and 100x100 dimensions
  3. Go to yoursite/admin/content/types. Create a content type for "Gallery" that has an image field. Name it "Images". You can add any other fields you want, just make sure it has one image field with "multiple values" checked. I also made it required, and allowed "Enable custom title text" so titles will display in gallery/thickbox windows. You can also set a custom dir for the images to be uploaded to (like gallery or photos)
  4. Go to the "Display Fields" section of your new Gallery type. Here is how I set it up for "Images" (you can set it however you want.) Label=<hidden>, Teaser="thumb as link", Full="Thickbox:thumb", also set the weight so it shows up in the right order - I set mine to "1".
  5. Setup a view to list the galleries. This can be used in a block and page to make automatic content connected to this gallery. It's optional, if you don't want t a list of galleries anywhere. Go to yoursite/admin/build/views and add a new view. Turn on page view, set type to "List View" and set filters to Node: Type is one of Gallery. And Node:Distinct is distinct. Add any fields you want to be shown in gallery list. I set it to Node:Title - with updated mark - as link, Node:Body - teaser, and Image:Images - do not group - thumb as link You could also use "teaser" view type, if you like the way that looks.

At this point you should have galleries with automatic thumbs and list of galleries.

I further customized the display by adding this line to my style.css file:

.view-content-photos .item-list ul li  { background-image:none; list-style-type:none;  margin:20px;  margin-left: auto; margin-right:auto; padding: 20px; background-color: #eee; border: 1px solid #000;  width:150px; text-align:center; }

The name of my view for the gallery list is "photos" change it in the CSS to whatever your's is set to. This is just an example of a decent way to theme it, you should do whatever you want to make it look good with your theme.

I themed the actual Gallery with this (also in style.css):

.field-field-images div { margin: 20px; display:inline; }
Here are some screenshots:

gallery list
gallery
viewing

dorien’s picture

I have been cluttering around with image modules and gallery 2. This solution is so simple that I really like it!!!!!!!!!!
I just added a view for all of the galleries from one user (mygalleries), for the rest, your explanation was the best! Thanks

The only problem I have left is that I use user node for the user's profiles and I would like to have a link somewhere in the user node to the mygallery page of this particular user. I am a bit stuck here. I guess I have to make a seperate view for this too. I would appreciate any ideas to point me in the right direction.

Again, thanks for this great solution!

konsumer’s picture

I'm not sure how views would help with this. I would just setup the gallery as a child of the usernode (the same way you make a profile CCK node) and give users access to create, and edit their own "gallery" nodes.

dorien’s picture

I used the node family option to set gallery as a child of usernode. Then checked the box in the gallery content type to "works with user node" (or something), setting the box above to 1 will then give you one gallery per user!!! Finally!!!

Thanks for the help.

lias’s picture

thanks for the nodefamily tip, I'm going to try that out.

fashion’s picture

Looks cool. Can you tell me ..
Does this method give a per user album ?
Will the users be able to create sub-albums or more than one album ?
Does it create a "My album" type link in the menu ?

Fashion

konsumer’s picture

My method just shows you how to make a single CCK gallery node, and use views to organize them. It is an alternative to using "Image" and "Image Gallery" and taxonomies, which I feel is cumbersome. Also, you can edit how the actual nodes look (I have a gallery I made for a client that has a bunch of other information on the gallery page.) You can use this method with other techniques to get per-user stuff, etc. It's just a standard CCK node, so you can use it in views, with "Usernode" and anything else you can do with CCK. Look around for info on using CCK for profiles, or per-user, and you should get the info you need.

wonder95’s picture

I tried this setup (I was doing one image per node and using views), but I can't get the photos to display correctly like yours do. I created a type called Gallery with Multiple Select checked, and created a node with 4 photos. I then created the view as specified, and I get the node on the views page, but I don't get them to line up like you have them on your "gallery" link in your post, and I don't get all of them to show up in Thickbox when I click on the picture. When I click on the gallery title, they are displayed vertically. How did you get them to display horizontally? Was that with CSS, or should it happen that way automatically?

Thanks.

Wonder95

konsumer’s picture

I did a default drupal install, and wrote the steps as I went, so yours should look exactly the same as the screenshots. No special CSS (other then what I included in the description, which you should put at the bottom of the style.css file for your theme) and no theming. It's just Garland, with the stuff in grey added to my style.css file.

If thickbox isn't working on yours, make sure you did the imagecache stuff right, and that the "display fields" stuff is connected to the right imagecache profile. Only one image shows in thickbox at a time. What you are seeing is one image (a long one.) I included this to show how it resizes irregular images.

natem50’s picture

I am very new to Drupal and your solution works perfect. However, I seem to be at a loss to create some additional functionality. I am able to create galleries just fine, but I would like to create a menu link that is only visable for authenticated users that shows all my galleries. For example, the menu link is labeled Photo Galleries ==> a page that lists links with years ==> a page that shows all the galleries for that year.

I hope that makes sense.

konsumer’s picture

There currently isn't a way to make a menu from a view (that I know of). I wish there was, as this is something that I keep needing, for various things. Maybe I will write it. Looks like someone else needs this too.

q_man’s picture

Just simply create a new menu item manually which points to that views url. (you have to make sure the view provides a page url first)
These can then be organised and nested as you want.

Hope I understood the question.

http://www.disscamera.org.uk

konsumer’s picture

Sorry, you are right, I misread the original post. Yes, you can easily add a menu item. What I mean is dynamically generate a menu from a view, which I think would be even more useful (for alot of other things, too.)

Like this:

Galleries (view) generates a menu of available galleries, based on the view (described above)

so the menu would look like this:

    Galleries
  • At the Beach
  • Work
  • My hot girlfriend

Each of those items being a gallery. This way you wouldn't have to go to the in-between gallery page (click: Galleries menu item, then the gallery) just go straight to the gallery you want. This idea becomes way more useful when you are using nicemenus, or one of the DHTML menu systems.

There are alot of places for this sort of thing, once you start using CCK/Views alot. Another example would be a view created to list all "News" (a CCK type, that you could create) nodes, directly in the menu, or list just new News (if the view is set up that way.) From what I understand generating this on every page load is sort of expensive, but it seems to me that view caching should help with this. As far as I can tell, it shouldn't be any more expensive then using taxonomy. I'm still working on it. I am so busy...

jfall’s picture

This is an old thread - but perhaps this will help someone...

To do what knosumer want, you simply choose an "Argument" for the View. This will essentially build a set of views, one for each value of the argument AND provide a summary page that lists all possible values of the argument with a link to that view.

For example, if you wanted a per-user photo album - easy. Simply set up the View for a generic photo gallery (say a grid view, showing image thumbnail and title with links or Lightbox, or whatever) and then add the Argument - Node:UID is Author. Select "Summary, sorted ..." and put "%1's Photo Album" for the Title (%1 is the first argument, which will be the Author's ID!)
You could create a set of galleries based on a Taxonomy the same way - simply use the Taxonomy Term as the Argument, and select Summary. Again, the summary page will list all the taxonomy terms with links to each "gallery".

I think this is actually the most flexible and easiest method of creating image galleries, as the images reside independently from the gallery, and can thus be organized and displayed in a variety of different ways (e.g., by user, by subject, by date, etc.)
For more info, see Views Arguments: http://drupal.org/node/54455

The problem I am having, and I'd REALLY appreciate some advice on this, is that the summary page is very plain and ugly. I want a summary page that is formatted like the old Image Gallery module summary page. But I haven't found a nice, flexible way to do this yet.... still searching....
good luck.

doc2@drupalfr.org’s picture

Thank you, this will help me and other drupalers a lot. Come back if you get your answer :)

jfall’s picture

Here it is - as usual, someone else has already done all the heavy lifting:
Example: How to Display a Summary View as a Mock Menu http://drupal.org/node/42605

Now I want to pull the latest image and taxonomy descriptions for my gallery listing page... hmmmm.

artis’s picture

If you get the 'latest image' part worked out I will forever be in your debt!

jfall’s picture

A summary view won't actually help with knosumer's method, because the whole gallery is only one node - the gallery node. A summary is useful for summarizing over taxonomy terms or over users, or whatever - does not apply here.

Konsumer's gallery is VERY simple to configure and get working. But it is important to understand the potential drawbacks of this method too.

Here's why Konsumer's method won't work for me:

  1. Images are stored directly in the Gallery node - they do not have a node presence of their own. Thus, no title, description, or other fields - my images have lots of meta-data. Some implications:
  2. No way to "slice and dice" - the Gallery view is just one way for my users to see the photos, they also appear in other contexts (like random image blocks, per-user albums, etc.)
  3. No way to sort images. The first image you enter will always be the first image, unless you delete it and re-add it at the bottom. You can't re-order images for display, and you can't add images anywhere but at the end. This is really a deal killer for me.
  4. No migration path - you are stuck with this structure, there is no way to change the way your galleries work or to re-use the image data in them without re-uploading it into a new structure.

    You might find a recent post of mine of interest: http://drupal.org/node/176252#comment-741225

konsumer’s picture

It's just one way to do it, that works for alot of situations, where I need a nice-looking gallery, fast, and I don't care about any other data. It seemed like people have alot of trouble with this, so I explained how I "slap a gallery on there" in about 5 minutes. If more is needed, it's really easy to accomplish.

1. You can also make gallery by making a content-type for your image, and only allowing a single image in the image field. Use a view to create the gallery (copy the instructions I gave before, but now it's a gallery, not a "gallery summary" view.) This allows you to add any CCK fields you want to the content-type, not just title and body. This is also a fine solution, if you need the other data.

2. There are lots of ways to slice and dice, you can use view blocks, tiny bit's of PHP in the block messing with the field data, or whatever. I'm not sure I understand how there is an alternative, or what other methods have to offer over this approach. You have as many options as you do with any other solution, and more then some.

3. #1 also solves this problem, if this is a problem.

4. This is true for every other gallery system that I have seen. Using the method I describe in 1 allows the use of standard node import/export, though, so it's actually better for me then using the image module method still, because If I am migrating, I already have file-table and node-content imports worked out (using imagefield, CCK, and views in everything has definite advantages over custom modules and disjointed content-types for everything, even if just to modularize data-migration.)

I'm not sure I understand what you are proposing instead of this, as taxonomy-based solutions, and custom-module based solutions have all the same drawbacks that you speak of. It sounds like you simply need to think about the problem differently, and my solution might still be helpful (like try the suggestion in #1)

jfall’s picture

Believe me konsumer - I'm not knocking your method - it is so so so simple and easy to set up, and that is just what a lot of folks want - that makes it a beauty, and obviously been of value to lots of people. I was simply addressing the concerns of one user who seemed to want to do more with the images than simply display them in a gallery. I was just trying to make readers aware of the trade-offs they are making when choosing one data structure over another.

The modified solution you propose in (1) is more along the lines of the approach I'm taking. The image data now has an "independent" existence and can have its own meta-data, be sorted, searched, and tagged, can be displayed in a variety of Views, etc. And, if you ever want to use a different approach, you won't need to re-upload all your images. This nicely addresses all the issues I raised, but people need to understand that this is a totally different approach, and is exactly what I was trying to get across in my post. Your original method puts all the image data into a single gallery-type node with a multi-value image field. Your proposal in (1) puts each piece of image data into a separate image-type node and uses a View to generate the gallery. These are incompatible methods - once you choose to do one, you simply can't change your mind and switch to the other without re-uploading all your image data. That's the point, which may be obvious to you, but may not be to all.

One other requirement I had for my galleries was that they would "automatically" add new photos that were uploaded by users. I wanted both by-category and by-user galleries. The only approach I've found flexible enough to give me this is a Views-based gallery. While perfect for my needs, this may be totally overkill for some, and hard to understand for new users.
For example, the issue I'm struggling with, which led me to your post, is how to get a nice "summary" view of all the galleries that shows the last date modified and image added to each gallery, etc. (similar to the old Image module Image Gallery display) - I think I've finally resolved that one, but it required custom programming, so definitely not for everyone.

I have spent a lot of time struggling with the issue of creating a flexible approach to photo galleries. I actually really liked the taxonomy-based approach in the Image module, so I've been trying to replicate that using CCK imagefield (which really is a big improvement over the Image module, but not as well supported in terms of polished modules). There are literally dozens of approaches and custom modules out there to create CCK image galleries - each of them has strengths and weaknesses. Hopefully one day I'll get the time to write a handbook page about my trials & errors, as it seems a lot of people struggle with this issue - and many likely end up choosing an inappropriate method, creating loads of work later when their requirements change.

Anonymous’s picture

Did you find a solution to the problem of summary page looking ugly?

I did create a summary page using Panels and adding views to it, which works well enough apart from if the user clicks any of the images of the galleries, instead of going to the gallery, thickbox comes up, but only allows them to go between the images displayed. Not found a way to stop this happening or force going to the actual gallery upon the image being clicked.

jfall’s picture

I created a custom summary view to imitate the Image module's Image Gallery - it looks and works very nicely.
http://lasqueti.ca/books/design-notes/image-gallery-summary-view
Currently, Views does not support 'plug-in' summary types, so this will need to wait for Views2 to be developed into a real module... currently, you need to provide an override in template.php - detailed instructions and documentation are included with the code.
good luck.

vovavova’s picture

Uff, just thank you. This implementation has exactly the flexibility I was seeking for. Wasted few days for researching on this topic.

vovavova’s picture

However, there is a question rising, is it possible, somehow, to make thickbox.module be aware of imagecache generated presets, like its implemented with image.module, so thickbox will display let say preview800x600 rather then original 1Mb file (example)?

vovavova’s picture

Answer to myself is in this post http://www2.drupal.org/node/179386

thechraveler’s picture

thank you for posting your "answer to yourself" link for everyone else. So many times on this site people ask questions and then post that they found the answer but don't share with everyone else!!!!

horizens’s picture

Is there an easy way for the admin user to reorder images within the galleries?

tommo’s picture

See this thread http://drupal.org/node/113259 - it actually appears to go nowhere but is all about ordering multi-values within cck - Anyone know how to do this??

jfall’s picture

Passionate_Lass’s picture

Does this work in the 6.x version? :) Because I don't remember some of those modules being "out" in the 6.x version. :)

cyrilprog’s picture

(first thing : excuse my english)

On your screenshots, it seems to be the first image of the gallery which is used as thumb. (it might be set in your Gallery View > Fields > Image:Images > Show first value only)
But is there a way to choose which image have to be used as thumb for each gallery on the Gallery View ?

I worked on this for days whithout finding any solution. :/

Regards,

Anonymous’s picture

Didn't read all the comments above, but there is a great video tutorial here:
http://www.theartlab.net/files/drupalschool009.m4v
Uses, CCK Image, Views, Imagecache, and a few other things.

thomas.remington’s picture

I just posted this in drupal post installations, but this might be a more appropiate place to post. I was wondering if there was a way to add a search function to this type of views cck gallery?

thanis

Anonymous’s picture

If the galleries are created and based upon taxonomy, then searching by term would be possible.

alternatively, there is faceted search, for which also exists a cck module to expose cck fields to it. not tried it personally though.

mrgoltra’s picture

confusi0n’s picture

subscribing

Ankit22’s picture

Subscribing :)

2ndChanceTech’s picture

I didn't read through 100% of the posts, here, but I figured out a decent way to allow users to create their own galleries.

I use cck, imagefield, imagecache, views, addnode<-optional, panels2

I created 2 content types:

Image (image)
Personal Gallery (gallery)

Image has an addnode nodereference field that allows you to choose a Personal Gallery (I use the advanced setting and only allow users to select galleries they've created).

Personal Gallery has no fields, other then title and body (description).

I created a new view (user_gallery), that displays all images that reference "personal gallery".

view page url: gallery/$arg/images

Fields: Image: field_Image (chose my imagecache thumbnail preset, w/ link to node)
Node: title

Argument: Node Reference: Gallery (field_gallery)
ARGUMENT HANDLING CODE: $args[0] = arg(1);

Filters: Node: Type = Images
Node: Published = Yes

I then made a corresponding viewpane.

Once that was complete, I used panels to override the "Personal Gallery" content type.

I then loaded the view pane, and VOILA! it shows every image uploaded by a specific user that references the gallery.

Because galleries are infact just content types, it's simple to create a "gallery of galleries".

This solved a problem where I wanted users to have unlimited flexibility in created galleres and organizing their content.

Set the reference field to: Required, to make them select a gallery.
Set the reference field to: Multiple, to allow images to be in multiple galleries.

I use the addnode_beta module to allow the creation of galleries from the image creation form.

nulimitz’s picture

I got this far ... "Image has an addnode nodereference field that allows you to choose a Personal Gallery (I use the advanced setting and only allow users to select galleries they've created)" and said "what ?" I am not sure how to this. I have created both content types, and have the add niode widget enabled in modules. I am nto sure hto to add this field.

Junro’s picture

subscribe

kirilius’s picture

I have been trying to find a way to create user-managed galleries and more or less found the same solution as you. However this solution is not complete. For example what happens if a user deletes a gallery that has images in it? The site will be left in an inconsistent state - having orphaned images with no gallery. I have a requirement for enforced strict gallery-->image relationship. This means that no image should be created without specifying a gallery (this is easily done by making the nodereference mandatory) and when a gallery is deleted, all images in it should be deleted as well (with the proper warning of course). This last part I don't know how to do.

Any ideas? Thanks!

jjjames’s picture

Interesting solution, gonna play with it :)

aklouie’s picture

I've been building a CCK/Views/Imagecache photography site at http://www.alanlouie.com

Supporting modules: Thickbox, Rating, Gmap, Location, Insert_view, ImageField Import, Views Bulk

Working from the bottom up

1) I created 3 vocabularies: Image Tag (terms that describe the image, like automobiles, airplanes, etc), Event Name (a grouping term which unites multiple images under a single Event), and Major Gallery (what category does it fall under, Performing Arts, Nature, People, etc)

2) I created two content types, Gallery Image and Gallery Text. Gallery Image has all 3 vocabularies filled in (such as: Performing Arts, 20081101 Cirque Mystique Dance, Bellydancing as Major Gallery, Event Name, and Image Tag respectively) as well as a image sized for the page width with ImageCache with FiveStar rating. Gallery Text is a descriptor for a particular Event Name and therefore only requires the Event Name vocabulary. I have recently added a location CCK field to help describe where the event was.

3) For each Major Gallery I have a view built (couldn't quite figure out a good way of doing just one master view.. yet) that displays a page with an exposed filter for Event Name which shows all Event Names associated the searched for Major Gallery. It shows all images in a grid view sorted by FiveStar Rating (descending so all the best pictures are first). Clicking on an image opens a Thickbox showing the image. You can also rate it directly from the grid or click on the title to open the Gallery Image node.

4) When a Event Name is selected, the attachments will display if valid. The two attachments are pulling Node.Teaser (because of insert_view, usage described later) and the location CCK from the Gallery Text which has the same Event Name term. The location CCK is translated into a Gmap for display (and the info on the tag is the Gallery Text teaser with a direct link to the Gallery Text node)

5) To also find images I have 3 search methods (all currently being worked on now)

5a) Search by Tag, basically a list of Image Tags that will pull up all images associated with that tag

5b) Search by Event, displays all events, clicking on an event will pull up those images

5c) Search by Map, displays a Gmap with all Gallery Text nodes with location CCK information attached. Clicking on a marker will show the teaser and a link to the node

6) The Gallery Text nodes have to also show the associated images when directly called (from 5c's Search by Map for example), therefore I used Insert_view to reuse the grid view described above with an arguement to display all the associated images on the page

7) For a summary Portfolio I have a view that shows all images tagged with the term Portfolio. Simple and quick with Thickbox

8) For mass importing images I use ImageField Import, tagging them against an Event Name and Major Gallery, then using Views Bulk to help me look up that Event Name and tag the images appropriately (I have a nice condensed table with a thumbnail (thickbox if clicked), image name, and can mass attach tags to selected images)

Things to do

- Finish importing all of my gallery texts and locations from my previous gallery
- Clean up Search by Tag and Search by Event to look cleaner
- I have some crosslinking (you'll see that I have the same images under both Nature and Man-Made) because I put a bit too much under some events (like week long photography trips that took a variety of shots). I'll have to break them apart a bit more.
- Put together an RSS feed for latest events added

Feedback welcome, if you would like a copy of my view that I put together I can get that to you.. once I finish cleaning it up

jjjames’s picture

That's almost exactly what I needed :) Thx

luisfeng’s picture

Good for me!

aac’s picture

Subscribing!!

---~~~***~~~---
aac