Closed (fixed)
Project:
Node Gallery
Version:
6.x-3.x-dev
Component:
Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Apr 2009 at 16:32 UTC
Updated:
5 Jan 2011 at 20:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
redsky commentedComment #2
kmontyGood 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!
Comment #3
kmontyStill a good idea.
Comment #4
kmontyBumping this one to critical. As the module grows, I'm discovering how people just assume this functionality should be in place.
Comment #5
Rik commentedThis 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?
Comment #6
kmontyUnsure.
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.
Comment #7
Rik commentedI'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.
Comment #8
colemanw commented@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).
Comment #9
justintime commented@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.
Comment #10
Last commentedI'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?
Comment #11
colemanw commentedWell, 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.
Comment #12
dddave commentedLet's move it officially to NG3.
@justin
Take note of your comment #9.
Comment #13
justintime commentedThis feature makes great sense as a submodule, It shouldn't take too much code either. Here's how it could work:
Comment #14
justintime commentedAttaching 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!
Comment #15
justintime commentedmarking as needs review.
Comment #16
scroogie commentedNice one. Will this land as a submodule in NG3 core, or as a seperate module? Will try to test out later.
Comment #17
justintime commentedLikely 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.
Comment #18
groovehunter commentedsubscribing...
I tried the module from #14 but with current dev version it won't work, nothing happens
How is progress with alpha2?
Comment #19
justintime commentedAfter 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.
Comment #20
groovehunter commentedhey 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
Comment #21
justintime commentedShoot.
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).
Comment #22
dddave commentedSeems 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.
Comment #23
justintime commentedhttp://drupal.org/project/node_gallery_taxonomy