I've noticed a few threads now on taxonomy support for Gallery2. I wanted to consolidate the info here (as a gallery.module feature requested) in a dedicated thread so the discussion can continue. Maybe there was a better way to do this, but anyway...
From: http://drupal.org/node/32393
#24 submitted by gautam_chandna on October 18, 2005 - 03:56
Category: tasks » feature requests
Hi,
I wanted to add taxonomies (and node type display) of images in Gallery. For that I have this as a basic plan :
This is how the Taxonomy is created [using multiple hierarchy]
GalleryVocabulary
-MainAlbumOneTerm
-MainAlbumTwoTerm
--SubAlbumOne
---SubSubAlbumOne
and so on..
One main Vocabulary for the whole gallery
Multiple Terms "AlbumOne" "AlbumTwo" and so on for the Albums in that particular level.
Each album having multiple "albumOne" "albumTwo" etc.. terms for more sub albums..
Each picture can be given more that one taxonomy term, hence linking of pictures in different albums is also possible.
Hope I'm getting through to all of you..
This is the functionality required for the Module that needs to be implemented.
On Installation -
1. Create a taxonomy Vocabulary for the gallery when installed.
On Addition of an Album or Photo
1. Creation of a Taxonomy Term in a theGalleryVocabulary, each time someone creates an album.
2. All photos contained in 'album' are listed under the term 'album'
3. The Item created also initiates the creation of a node type (could be page or story or anything for that matter) with the Title = Title in gallery, Body = Description in Gallery + the 'picture' (with a hyperlink to its gallery counterpart).
this way searches will lead you to picturesnodes and albumnodes, which when clicked on lead you to their respective albums within gallery. thus no duplication, presence within drupal as simple nodes and improved searching for the whole site.
(not sure what to do with the keywords stored in gallery for each pic - need help on that too.. is there any invisible node type? or some such?)
--------------------------
I'm quite new to making modules for drupal, so am not quite sure what exactly I should do now. Could you please recommend some modules that I could look at for this functionality (so that I can take'em apart and put'em back together?):
1. Creation of simple node with a title and body (guessing page.module should do this)
2. Creation of Taxonomy terms on the fly (guessing aggregator_otf.module)
Thanks for all the help!
[this was earlier a forum discussion located at this place. Let me know if I can help in any way.]
-Gautam Chandna
#25 submitted by toddcortez on October 19, 2005 - 14:00
Gautam, I also really need Drupal taxomomy linkage with Gallery. But limiting it to a single "Gallery" vocabulary would not work for me at all. I need full access to all defined vocabularies. Also a Drupal "gallery2" node type would be really nice. I've been considering tackling this myself, but don't want to duplicate work that others may have already started (and I'm still quite new to Drupal coding). I'd love to participate in making this enhancement happen.
Todd
Also see http://drupal.org/node/34253
getting the taxonomy term from drupal is childs play
paddy_deburca - October 17, 2005 - 05:51
Getting the taxonomy term from drupal is childs play - the interesting bit would be to connect to the gallery, search for related photos and albums and display the information accordingly.
I can have a look at the gallery2 code and see how the search functions.
Should the result be displayed inline with the nodes like taxonomy_image?
Should the results be only displayed inline when the actual node is displayed?
Also,
If there is one match for a particular node, the match (be it photo or album) could be displayed hyperlinking it to the actual gallery item?
If there is one hunderd and one matches, what should be displayed - just the hyperlink ?
Paddy.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | galleryIdea.gif | 30.18 KB | gautam_chandna |
Comments
Comment #1
kiz_0987 commentedA few comments on this:
- MichelleC has a g2_filter module (http://gallery.menalto.com/node/24126?from=100&comments_per_page=50) which allows you to use pictures from G2 in your Drupal nodes. You can then assign taxonomy to this node as normal. This is probably how I personally would use taxonomy in G2 as I would include photos from G2 in a blog for example, rather than just have one photo=one node.
- MichelleC has also suggested an img_assist module to ease bringing photos into Drupal.
- One of the top G2 feature requests according to the votes is for flickr tags. I would think that these could be used to provide a single-layer taxonomy. Even without this I can imagine that it would be possible to use keywords in G2 and link them to Drupal taxonomy, but the user-interface for this is a challenge.
- Is a Drupal node for every photo really needed? The G2 integration was not really designed with this in mind. Let's say that a node is defined for a G2 item. The node info will be stored in the Drupal database and I suppose it is possible that you could hook it so that if the node was deleted, the photo would be deleted. But, the reverse is more difficult -- if someone deletes the photo from G2 (even embedded in Drupal), how is Drupal informed?
- I can see the value of seeing a taxonomy link, clicking it and seeing the associated photos as suggested by paddy. This can I think be done without needing full node support. The info could be stored in the G2 database and just searched as needed. I think the user interface will be challenging to hook up Drupal taxonomies with a photo (an individual photo or album may be OK as a gallery_taxonomy block or something could be displayed in the sidebar to aid taxonomy selection, but for an album page of photos it's more challenging -- no way to use the standard G2 photo select box I don't think).
- gautam_chandna, you mention that taxonomy will aid searches. The gallery.module already has a search that may do some of what you want. I'll admit, not all.
- Todd, can you please provide some examples of your thoughts on needing full taxonomy support. What is the application? How would it be used in practice?
Comment #2
toddcortez commentedIdeally a gallery item would be treated as a Drupal node. What I had considered doing was creating "g2_item" and "g2_gallery" node types in Drupal, and then extending Gallery to create a "create Drupal link" action. The link should be 2 way, with the Drupal node properly updated or disposed of when the matching Gallery item is modified or deleted.
Todd
Comment #3
toddcortez commentedOne of the components of the app that I am prototyping with Drupal involves extensive, multi-vocabulary cataloging and annotating of images, video, audio and documents in a scientific research environment. Drupal's integral taxonomy system was ideal for this (in fact it sold me on Drupal). Right now I am prototyping the system in Drupal, but of course Drupal's media management abilities are very limited. What I really need in the long term is much better media management in Drupal itself. However Gallery's extensive image handling abilities are very attractive and actively developed, and I'm already using Gallery on other sites, so from my point of view a tighter integration might be the way to go.
As to the 2 way integration, I really don't see that as a problem. It could be as easy as having Gallery use POST to a Drupal module URL to tell Drupal to modify the node. And, as I said, I think the node creation could be manual ("Link to Drupal"). I had considered prototyping this ability with FlexiNode.
I have been looking at the g2_filter module, and it is precisely what prompted this line of thought.
Thanks for the thoughts on this!
Todd
Comment #4
gautam_chandna commentedOk.
I've been through all the posts I could find and have come up with a solution, very similar to my earlier suggestion - but with more reasons to support it.
I apologize if I've failed to understand your logic, or if I was unable to explain my motives last time.
g2_filter Module
This module is great help to add photo's from G2 in a blog.- navigating to an album in g2
- add Item
- set attributes
- save Item
- navigate to add blog/post
- add the post with the image
The problem is such for a user:
Step 1: Add image to G2
Step 2: Write about the image in a blog with the help of g2_filter or img_assist.
[expanding on the number of steps :
This leaves much to be done for a user who just wanted to talk about a beautiful sunrise!]
[My target audience is from India where many people are still discovering how to type a letter in MSWord:-( ]
A node for every Gallery Item
This one is a tough cookie.. is there some way to do this using SQL relations between rows of data in two different tables? Like add a foreign key in the drupalGalleryNode and have a cascade effect on deletion?
Not sure of what I'm saying, but I've heard of something like this in many places..
Taxonomy Aids Searches
Sorry about this one.. what I meant was "Taxonomy will aid drupal in searching and sorting site content when using modules like collimator, etc."
Todd's Idea of 'linking' selected images/albums
I love the idea of being able to select what to include. (Why not let all Gallery Items be Drupal Nodes until excluded?)- I may want to add in bulk 20 photos of a place I visited , but having 20 different nodes pop-up in the Recent posts menu would not be preferred.
- I may want to add in bulk the side-profiles of 10 people, and need them to be published separately for each one is important.
Examples:
The idea I have, and would love to see implemented [will work too!]
[Since I'm not too great with words.. I made this: http://www.ahste.com/uploads/galleryIdea.gif ]
Reasons/Motives:- Adds support to modules related to all site content - Collimator, E-Publish, Indexpage, Node Filter, Site menu, etc.
- Tracker can track images posted by users and display them in user profile pages.
- The look and feel of drupal can be maintained as a wrapper on G2 instead of displaying G2. Hence theming wouldnt necessarily mean theming G2 and Drupal separately.
- This way, various image.module related modules can also be helped (especially for people well acquainted with image.module)
- I'm unable to use mod_rewrite support on Gallery2 on my site (IE gives some trouble) so search engine placement is out the window. This way, each node can be indexed by search engines for those who cant use mod_rewrite on G2
---
Hope that helped. Do let me know if I've gone astray or have missed out on something. I would seriously like to help, even if u scrap all the ideas i just suggested.
--
ps. something funny happened:-)
Google indexed one of my pages for the name "Tirthankar Chakravarty" while the random image block was displaying his picture. Now when his name is googled it shows that particular page, but obviously the random image has changed!.
Any way to stop this? I've had a few people come over looking for peoples photos only to find pages with random pics.
--
Thanks for reading thus far!
-Gautam
Comment #5
gautam_chandna commentedThis feature can be added to the nodes created by using http://drupal.org/project/folksonomy and http://drupal.org/project/tagadelic together.
--
Though this is possible even without having each item as a node, but it would certainly be easier if instead of coding folksonomy support into G2 we simply make G2 support Nodes (which already support folksonomy and tagadelic) :-)
-Gautam
Comment #6
michellegautam_chandna:
Since the g2_filter is mine, I want to comment on that part. The filter was meant as a sort of "bridge" between having to hard code links in blogs and the full features of an img_assist type module. It's not the best solution for end users, but it's what I could do, right now, to get something at least usable for power users. My plan is eventually to write a module that will let users pick an image from their hard drive or from the web, select what album they want it to go in, and have it automatically upload and add the filter to the blog entry. I have somewhat of a UI in mind but my coding skills are not yet up to the task. A very rough guess would be Decemberish for me to be able to do this so if there's someone out there who is able to do it faster, have at it. :)
Michelle
Comment #7
ShavenYak commentedMichelleC -
Ideally, it should also be possible for a user to create a new post, and be able to choose to link to an already-existing image in a G2 album, rather than uploading it into G2 at the time of writing. For example, I come back from a trip and upload an entire album of images from iPhoto into my Gallery... then, I'd like to be able to easily write a blog entry or a story about this particular trip with a link to the album or some of the photos in it.
Comment #8
michelleShavenYak - That's how it works already. What I was talking about in my post was adding on to that to make it easier for users to upload and link in one shot rather than having to upload first like they do now.
Michelle
Comment #9
Bèrto ëd Sèra commentedDoes 2 years long silence mean that everyone has quit thinking about taxonomy in Gallery2?
Comment #10
profix898 commentedNot necessarily, I am working on a new version of the gallery module. It will appear as Drupal-5--2 branch in the near future. One item on the (long) list of features is basic taxonomy support, but actually its quite difficult to imlement. So dont expect to much and it will take a while ...
Comment #11
majortom commentedHas Gallery 2.2's image tagging and dynamic album support helped here at all?
/carmi
Comment #12
canadrian commentedI may be way off course here - I'm not exactly a Drupal Guru, just an enthusiast - but I've got a nagging feeling that the Views module should be of some use/help with this. I mean, if it was possible to have Views understand and display images tags alongside node taxonomy terms, wouldn't that be 3/4 of the way to what is being aimed at here? The other thing that hits me is that Gallery 2 now has built-in RSS support, and this could be configured alongside the core Aggregator module (if you just want links to images/albums) or the Leech module (if you want images/albums associated with actual nodes), and again it could all be cleanly presented with Views. If Leech still works the way the (now dead) Aggregator2 module used to, you could even have nodes removed automatically when the images (and hence the RSS feed items) were removed.
Comment #13
profix898 commentedThe views module is basically a query builder/cache. You can tell it how the database is structured and it builds a query, executes it and displays the result. But it isnt that easy for Gallery2 tables ...
1. Gallery2 provides an API to interface with other scripts like Drupal. Bypassing it opens potential security leaks and removes the coverage of underlying changes, so immediate adaption of the module would be required as well, what makes it quite difficult to maintain.
2. Drupal does not (necessarily) have permission to access Gallery2 tables directly.
3. Even if you can access the tables and assemble the required information, there are still problems to be solved. For example: Gallery2 dynamically generates derivatives of the images when a certain image size is requested. You cant trigger the mechanism externally, what means only the original size images (and existing thumbnails) are available to Drupal.
This is not of much use either. There are many ways to configure RSS feeds in Gallery2. You would need to add feeds for all photos and all albums (classified as 'slower' and limited to x images by default), which in the end adds about 100% overhead to the Gallery installation and another extra load for parsing, ... on the Drupal site.
Comment #14
pinxi commentedI had started a similiar issue for the Gallery Module. My idea was to use taxonomy_menu and keywords/tagging to create albums based on Drupal taxonomy. Please see:
http://drupal.org/node/142442
Comment #15
profix898 commentedMarking this a duplicate of the 'Tighter integration' issue (http://drupal.org/node/138400). I will post an update to that thread about taxonomy shortly. However the gallery_content module described there will also provide support for taxonomy terms. It will actually import/map G2 albums to taxonomy terms of a dedicated vocabulary.