Is there anyway to propagate Taxonomy Terms from the Gallery node to the Image nodes upon upload? For example in the Boy Scouts site I maintain I've split up my site using a Vocabulary called "Section" (Beavers, Cubs, Scouts) all the content is organized this way. It'd be really handy if my users only had to select the section at the Gallery level and the image nodes were set the same automatically.

Any ideas? If not, consider this a feature request :)

Btw, Great module folks! I look forward to swfupload integration.

Comments

redsky’s picture

Version: 6.x-1.0-alpha6 » 6.x-1.0-alpha8
Category: support » feature
kmonty’s picture

Assigned: Unassigned » kmonty

Good idea. I'll definitely work this into a release at some point, however it is going to be lower on my list. I would happily accept any patches for this issue, though!

kmonty’s picture

Version: 6.x-1.0-alpha8 » 6.x-2.x-dev
Assigned: kmonty » Unassigned

Still a good idea.

kmonty’s picture

Priority: Normal » Critical

Bumping this one to critical. As the module grows, I'm discovering how people just assume this functionality should be in place.

Rik’s picture

This would indeed really usefull. Also for views. Now there is no way to create a view of only one gallery because there no way to make a filter on the fields. With taxonomy terms automatically inheritted from the parent gallery this makes it easily possible. (It can be done by individually adding terms to the images but when having a lot of images in a gallery this task is very unpleasant.)

Any idea when we can expect this to be added?

kmonty’s picture

Unsure.

This is a very difficult feature to figure out logically. There are a few options that I can easily think of, each with their pros/cons:
1) Gallery nodes are directly tied to their image nodes (via nodeapi insert/update). Pros: your galleries and images are directly tied together. Cons: your images cannot have have additional tags (since they are synced together)
2) When an image is created, it imports the tags from the gallery. Pros: You get the tags initially and can customize the images to have the tags that are most appropriate for them. Cons: If you change the gallery's taxonomy, it would not change the image taxonomy. If you want to add or remove a tag, you would have to do it from each individual image.

Any other ideas?

Once I figure out how I would like to handle it, it is pretty easy to code.

Rik’s picture

I'm still learning how it all works in drupal, but I think from a user perspective that the following is logical.
- Gallery and Image should be separate and can have individual tags.
- The Image should be aware of the Gallery it belongs too. (it's parent node?)
- When uploading images they should inherit the tags from the Gallery which are displayed in the upload screen. Here you can add or remove tags just like you can change the title and caption.
- When updating the Gallery tags there should be an option that can initiate the update of the tags for all the images in that gallery.

colemanw’s picture

@kmonty: neither solution sounds ideal. What about implementing it directly in Views... in theory you could create a small views plugin that would add a new relationship type: gallery->image.
That way the solution is not limited to taxonomy. For example if you added a CCK date field to your gallery node type (but not to the image node type -- who wants to go through 200 images assigning the same date to each one?), and then wanted to make a view that would show images by date, that relationship in views ought to do the trick! (as well as doing the trick for taxonomy or any other field you care to inherit).

justintime’s picture

Issue tags: +ng3

@colemanw: While I haven't implemented it specifically, 3.x has a complete views integration, with exactly the relationship you're describing. I'm tagging this as ng3, and will revisit it once we hit alpha.

Last’s picture

I'm pretty sure this is not functionality that can afford to wait for the 3x release. It's the one thing which prevents Node Gallery from being fully user friendly at this stage. When I tell a client that the images she uploads into a gallery aren't actually associated with it's parent gallery, at least as far as Views is concerned, there's always blank stares of confusion. It's so logical that it seems impossible it's not there. Unless I'm missing something insanely obvious, the user has to go in and tag every image with the correct taxonomy term before Views recognizes it. I realize the developers are aware of this, but isn't there some quick and painless patch that automatically assigns the gallery taxo to the child image when you upload the image? I don't know much about the backend, but I can't imagine it'd be more than one or two lines of code. Anyone?

colemanw’s picture

Well, if any views api savvy coders want to step in at this point with a patch for #8, awesome. Otherwise @Last, my answer (for you as well as myself, since I need this functionality too) is that it IS possible, but not with Views. You'll want to write a SELECT that performs a JOIN between the parent gallery and the image node, and filters based on your criteria. Probably a subquery to filter the parents down to just the galleries you want would be most efficient, and then pull your images from that subset.

dddave’s picture

Version: 6.x-2.x-dev » 6.x-3.x-dev
Priority: Critical » Major

Let's move it officially to NG3.

@justin
Take note of your comment #9.

justintime’s picture

Title: Taxonomy Propagation from the Gallery node to the Image node? » Create a node_gallery_taxonomy submodule
Issue tags: -ng3

This feature makes great sense as a submodule, It shouldn't take too much code either. Here's how it could work:

  • When a image is uploaded or assigned to a new gallery, the gallery's taxonomy is copied down to the image.
  • When the gallery's taxo data changes, we use batch api to merge the changes on the child images using batch API.
  • Any changes made directly on an image's taxo data is "legal". Since we'd be merging terms, any additional terms added to the individual image would stay put. The only sticky point is if I wanted one image to *not* have a term assigned to it that it's parent gallery did, it would get added back if you modified the parent gallery's taxo terms. I think that's pretty edge-case though
justintime’s picture

StatusFileSize
new1.69 KB

Attaching a proof of concept module - it works nicely for me. Extract it, enable the module, make sure that your gallery content type and image content type have the same vocabularies available. Then, go into the relationships settings (link provided upon module installation), and check the box next to taxonomy cascade. Finally, go change the terms on a gallery, and watch it use Batch API to cascade your changes to all images in the gallery.

It requires changes made to node_gallery on Nov 29th, so you need a build snapshot dated Nov 30 or later. The necessary changes are *NOT* in alpha1, but will be included in alpha2 and up. I'll create a separate module page for it once we hit alpha2 in node gallery.

If you use this, please leave feedback!

justintime’s picture

Status: Active » Needs review

marking as needs review.

scroogie’s picture

Nice one. Will this land as a submodule in NG3 core, or as a seperate module? Will try to test out later.

justintime’s picture

Likely a separate module -- biggest reason being that I can release a version of ng_taxonomy with a critical bugfix or new feature without bothering all the NG users who don't use ng_taxonomy with update status notifications. I've never really understood the whole submodule under a core module approach. If you go to the trouble of making a different module, why not just make a separate project?

I can certainly be persuaded though if anyone feels differently.

groovehunter’s picture

subscribing...
I tried the module from #14 but with current dev version it won't work, nothing happens
How is progress with alpha2?

justintime’s picture

After enabling the module, it should message you to go turn it on in your relationships and provides a link to do so. Once you check the box to enable it, you can save the settings and revisit them to hit the big button that says "cascade" on it. That will sync all images to their galleries. After that, any time you change taxonomy on a parent gallery, it should use batch API to cascade those changes down to the images.

groovehunter’s picture

hey thx for quick answer! I guess i saw the message and went to main settings page manually. I also saw the new checkbock at the bottom and checked it.
That's where i am stuck atm. Where ist the big button "cascade"??

now gonna disable and reenable module

justintime’s picture

StatusFileSize
new2.02 KB

Shoot.

Sorry about that. The button is in my local build, not in the tar.gz file :) I'll upload what I have, but note that this version requires 3.x-dev or alpha2 (which isn't released at the time of this post).

dddave’s picture

Seems to be working fine. Granted, I only tested with one vocab with not so advanced settings. I am going to play around much more and report back.

justintime’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.