Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would very much like the ability to create containers for galleries, for instance a container named people which could contain the galleries; friends, family and others. A sort of hierarchy for galleries is what I want, so that not all galleries are sorted and shown on the same page. I want to be able to categorize galleries, separate them and put them into groups.
I hope my description is understandable.
Best regards,
Ao
Comment | File | Size | Author |
---|---|---|---|
#79 | subgalleries.view_.txt | 3.32 KB | bkat |
#73 | enable-gallery-collections-1037002-73.patch | 6.64 KB | salvis |
#51 | enable-gallery-collections-1037002-51.patch | 6.64 KB | Moloc |
#50 | enable-gallery-collections-1037002-50.patch | 6.5 KB | Moloc |
#46 | enable-gallery-collections-1037002-46.patch | 6.07 KB | Moloc |
Comments
Comment #1
JacobSingh CreditAttribution: JacobSingh commentedHi @Ao, thanks for being so active in the issue queues! We actually built it to work this way from the start, but for UX reasons, decided to limit it to one "Galleries" page. This can be undone though. The galleries themselves are nodes, and there is a "Gallery collection" vocabulary with one term, and all your galleries are currently given that term. So you could create additional terms in Gallery collection and end up with multiple collections. But you might have to code dive a bit to free up the interfaces. IT would be nice to have a switch to go between those who want just one page of galleries and those who want several.
Simplicity vs extensibility is always a tough one :)
Comment #2
Aonoa CreditAttribution: Aonoa commentedHe he, my pleasure. I'm very happy to hear this functionality has been there from the start; now to find it. :-p I agree that with some sort of switch, it would be both simple and flexible at the same time. :-)
Best regards,
Ao
Comment #3
Aonoa CreditAttribution: Aonoa commentedI have found some code related to this in media_gallery.module:
Changing the following to TRUE gives a drop down menu for selecting which gallery term any given gallery should be a child of.
Disabling the following function enables us to access the media gallery taxonomy, yay!
I found some more useful bits of code. Setting these to TRUE will let us change relations for, and delete 'Gallery collections' terms.
After making these changes, I've created a new term as a child of the original "Galleries" and attached a gallery to it, but so far the new collection is invisible.. I had hoped children terms would be displayed in some manner or other when viewing the parent page.
I would appreciate some advice, but I will keep digging around. :-)
Best regards,
Ao
Comment #4
compsyguy CreditAttribution: compsyguy commentedI was wondering something else about this... would it be possible to have nested galleries? I'm really interested in the drag and drop ordering, and I was hoping to have the ability to drag and drop images in one gallery to sub-galleries.
Not sure if this is the right place to ask, but it sounded like it was about the right place...
Anyways, I really like this module, and I'm hoping to get some use out of it!
Comment #5
wothor CreditAttribution: wothor commentedHi Ao, Media Gallery Team,
First of all - great work - loving this module!
Ao, as you said, the new child container is for the moment invisible (following your steps). Did you have a chance to have a look into this?
I'm trying to find something myslef, but tbh I am a total noob at this.... just starting my adventure. :P
Will keep you updated if anything changes.
Kind reagrds,
wothor
Comment #6
Aonoa CreditAttribution: Aonoa commentedHello!
I'm afraid I have not had time to progress on this, but it's nice to know we're more people wanting this feature. I will update as well if I come up with something. :-)
Best regards,
Ao
Comment #7
Jackinloadup CreditAttribution: Jackinloadup commentedSubscribing
Comment #8
KirstenLangholz CreditAttribution: KirstenLangholz commentedHello my fellows,
I am also in need of this feature and as my site is supposed to go live end of April, in some sort of hurry. I will look into your solution Ao on the weekend and let you all know what came out on Monday.
In case somebody comes up faster with a solution, I will not blame him/her ;)
Comment #9
Taxoman CreditAttribution: Taxoman commentedIt would be great if it was possible to alter all such true/false states directly from the admin pages.
Comment #10
anavarreSubscribing
Comment #11
elgandoz CreditAttribution: elgandoz commentedinteresting feature, subs
Comment #12
jaka CreditAttribution: jaka commentedI love the feature, since there should be a hundred galleries in no time for a community website. It is good to have personal galleries as well.
Subscribe
Comment #13
jaka CreditAttribution: jaka commentedI love the feature, since there should be a hundred galleries in no time for a community website. It is good to have personal galleries as well.
Subscribe
Comment #14
riversidekid CreditAttribution: riversidekid commentedSubscribe.
I have about 10,000 photos in approximately 230 galleries on Drupal 6 with the Image module alone. Without the ability to do nested sub galleries I'm stuck on Drupal 6 forever! Although I like to offer notification when images are uploaded to a particular gallery, and currently I do this with the subscription module on a particular taxonomy. I have just started looking at Drupal 7 and it doesn't look like it's "gallery friendly" just yet, unless I've missed something!
Comment #15
ansorg CreditAttribution: ansorg commentedsubscribe
Interesting topic, I was wondering myself what this hidden "Gallery collection" taxonomy would be useful for.
Comment #16
Aonoa CreditAttribution: Aonoa commented@riversidekid: With for example a block and a view, you can notify your users of new media that's added to the gallery when using this Media Gallery in D7. =)
Best regards,
Ao
Comment #17
riversidekid CreditAttribution: riversidekid commentedAo: Thanks for the suggestion, but I'm a bit at a loss. By "notify" I mostly email and RSS feeds. By block and view it sounds like you're plan puts new content on a page. I want to reach out to people to tell them to come back to the site when it's updated; I have many users who are all anonymous to my site, but use RSS feeds to keep up with a specified album or sub album.
Can a block and a view do RSS and/or email notifications in Drupal 7?
Comment #18
popzkg CreditAttribution: popzkg commentedSubscribing
Comment #19
tomasbedrich CreditAttribution: tomasbedrich commentedsubscribing
no progress yet?
Comment #20
Anonymous (not verified) CreditAttribution: Anonymous commentedsubscribe
Comment #21
dafederThe ideal think, it seems to me, would be to introduce a new view style of some kind that could show galleries grouped by anything one wanted.. displaying the first image thumbnail with the "stack" background.
Comment #22
dafederActually, doing a teaser view of galleries almost accomplishes this. You just don't get the cool mouse-over titles, and the images expand to the full width of their parent element... I imagine there's some way to control that in a theme function but I haven't looked into it yet.
Comment #23
juliangb CreditAttribution: juliangb commentedSubscribe
Comment #24
DdR CreditAttribution: DdR commented+1 subscribing
Would be great if we get this feature working, let's keep digging ;-)
Comment #25
SophieG CreditAttribution: SophieG commentedOk here is what i've done :
When you use Taxonomy Manager, no need to change the code to TRUE for the visibility of the vocabulary in the admin taxonomy management.
So i've added two child terms.
I have changed the possibility for the user to select a term from this vocabulary (for me photos or videos) :
And i have added two items to my menu, just as the Term Galleries has been added (Link name : Taxonomy term and path taxonomy/term/13 : path to one of my children term of Gallery)
Now, when i go to Galleries : all the types of galleries
And if i go to Photos : only photo ones...
Hope it can help somebody !!
Comment #26
b_ruben CreditAttribution: b_ruben commented@JacobSingh, is there possibility to provide requested feature as a patch for beta6?
Comment #27
thinkdrupal CreditAttribution: thinkdrupal commentedI did what AO mention in #3 and I'm able to see multiple collections. Each collection has galleries. For example.....I have an image collection and a video collection. Everything seems to work.......except you can not control the layout (# of columns or # of rows) separately for each collection. Both use the same settings. Not a big deal right now. However, i need a solution for that. Why was multiple collections disabled in the first place?
Comment #28
kifuzzy CreditAttribution: kifuzzy commentedsign
Comment #29
Bojhan CreditAttribution: Bojhan commentedIt does seem a tiny bit wierd to not have this in a media gallery, simplicity sure - but this is standard functionality for any gallery.
Upgrading to major as from the comments it seems to be a major missing feature. And my own bias, that I can't do anything with my own gallery :( now. As there is no functionality to show containers and their childs.
Comment #30
Taxoman CreditAttribution: Taxoman commented#29: second that. Standard functionality.
Comment #31
Per Jansson CreditAttribution: Per Jansson commentedThis will be my first post ever!
I am using media gallery for a quite active customer who is adding a gallery every other day. Initially I had self-made taxonomy (still live) in a new vocabulary to filter the galleries and then showing in Views - I got most things to work but not the drag and drop sorting of albums and I was puzzled about the fields in the Gallery Content Type talking about taxonomy terms but no where to find them.
So thanks to @Ao who brought this up and to @JacobSingh for explaining the hidden functionality!
I have followed the steps of #3 and had it all working pretty soon. The non showing galleries in #3 never happened to me, but I have my terms on the same level as the pre-existing term Galleries and not as children of Galleries.
Further I wanted to allow galleries to show up under more than one term and I did not want all of them to belong to the pre-existing Galleries term.
By changing the Gallery content type and managing fields I could set the Gallery Collection taxonomy term reference to take for instance 10 values instead of 1. This all works well UNTIL I try sorting galleries under the different terms. Not always, but as soon as there is one gallery belonging to more than one taxonomy term. Its worthwhile to be careful with this issue because the way the reordering is built you might end up loosing the sort order for some 100 galleries, if you have that many sorted.
The fix for this is the following:
The table holding the sorted galleries is media_gallery_weight, easy to check.
In the file
media_gallery.pages.inc line 184 to 208 approx we find the following function for reordering galleries
Line 189 :
returns a result that will vioalate the Primary key constraint of media_gallery_weight and when this happens, first your sortorder for the term you are sorting will be deleted and then when inserting the new one it does not work and you get an SQL exception (in the ajax calls), thereby leaving you with a deleted sortorder but not updated. This happens if there are galleries with more than one gallery collection taxonomy term and as soon as the primary key constraint is violated. It does not happen immediately, don't be fooled by it looking smooth.
One way to fix the SQL above is to use SELECT DISTINCT, another is to use the full primary key in media_gallery_weight, nid and tid, in the LEFT JOIN condition, rewriting the left join:
LEFT JOIN {media_gallery_weight} mgw ON (ti.nid = mgw.nid AND ti.tid = mgw.tid) WHERE ...
It works now, but I am messing with the code and that feels a bit unsafe awaiting updates. Happy for any feedback!
Comment #32
carwin CreditAttribution: carwin commentedsubscribe
Comment #33
webankit CreditAttribution: webankit commented+1
Comment #34
carwin CreditAttribution: carwin commentedWhere does the "edit all galleries" page come from?
I've got two terms in the gallery collections vocabulary, and I've uncommented the necessary section to be able to apply the different terms to galleries I create, however I want to change the settings for one of the galleries without modifying the other.
So gallery A is the default, gallery B is the new one. When I hit the "Edit all Galleries" button the settings I change there only apply to gallery A. Gallery B is left untouched.
----------------------------------edit---------------------------------------------
It turns out what I was looking for was the edit page of the taxonomy term itself. Seems like the "Edit all galleries" page just tacks that on to the form.
Furthermore, I commented out line 194 of media_gallery.module to keep that tab from being overridden. Commenting out the line makes it so that when you "Edit all galleries" you're editing the correct collection.
Comment #35
BramVanroy CreditAttribution: BramVanroy commentedDefinitely need this. Especially to make albums and albums inside albums.
Example:
2010
- activities
-- running
-- soccer
-- drumming
- concerts
-- sum41
-- blink182
2011
- activities
-- walking
-- mountaineering
-- paragliding
- concerts
-- dire straits
-- bon jovi
-- toto
This would also make it possible to make one container for movie files and one for photos.
Comment #36
bib_boy CreditAttribution: bib_boy commentedsubscribe! love to see this.
Comment #37
Taxoman CreditAttribution: Taxoman commentedComment #38
AFowleI had asked for a similar feature "Hierarchical galleries" in http://drupal.org/node/1273612, which I have now marked as a duplicate. However I want something an end-user can click to "create sub-gallery", not just something the site-designer sets up. I don't think my end users will cope with taxonomy wrangling.
I am trying to move from the Drupal 6 / Gallery 2 combination, which is very good but complex. It offers a sort of gallery breadcrumb for browsing, and ability to choose a highlight for the gallery from one of the daughter galleries or images.
Comment #39
helmo CreditAttribution: helmo commentedI'm posting a patch for ease of testing. it combines the suggestions from #3 and #34.
Comment #40
Sylense CreditAttribution: Sylense commented+1
Comment #41
Bojhan CreditAttribution: Bojhan commentedComment #42
scampbell70 CreditAttribution: scampbell70 commentedHello all I am new to drupal and have been teaching myself for about 3 weeks now, as I build a page for my boyscout troop. I am to create new gallery containers such as 2010 which would contain several albums of the photos taken at various events during 2010 and the same for 2011 and so on.
I posted another thread about this which I did not realize was a duplicate. After following the instructions on post number 3 when I add content | gallery I now see an option that says Gallery collection and has a drop down. the only thing in the drop down at the moment is galleries. I assume that additional galleries I create such as 2010 would appear here but I am unsure how to add these additional gallery collection. Would someone be able to advise me please.
Comment #43
Moloc CreditAttribution: Moloc commented#42: Adding a new "gallery collection":
- Goto Administration -> Structure -> Taxonomy
- "list terms" on vocabulary Gallery Collection
or in short: admin/structure/taxonomy/gallery_collections here you can add/edit/remove gallery collections
To make one of them default, change the default value in the specific field of the gallery - content type.
Comment #44
scampbell70 CreditAttribution: scampbell70 commentedI think I got it figured out thank you for all the rapid responses
Comment #45
helmo CreditAttribution: helmo commentedDo you have all changes from #39, maybe a cache clear...
You could also try the Taxonomy Manager mentioned in #25
Comment #46
Moloc CreditAttribution: Moloc commentedscampbell70:
Find in media_gallery.module line ~1300
and replace it with
Then you should see it.
------------------
I extended the path of helmo:
- add a variable to determine, wheter to show the "gallery collection" or not.
- replaced the admin/config/media/galleries url with a configuration page.
- added some code to catch PHP-Notice messages on deleting taxonomy terms.
Comment #47
scampbell70 CreditAttribution: scampbell70 commentedMoloc,
Thank you very much I will try this asap and let you know the results
Comment #48
scampbell70 CreditAttribution: scampbell70 commentedI have ran into another strange issue or bug I am hoping you can help me fix. I created two taxonomy terms 2010 and 2011. I created 3 galleries under 2010 and 3 under 2011. I was able to directly link to them and add them to menus and everything was looking great. I noticed however that when I select show title show below on 2010 it refuses to work and only show the title on hover, but when I select show title below on 2011 it works perfectly fine is there a way to fix this?
Comment #49
helmo CreditAttribution: helmo commentedCool, a few minor remarks...
typo: hirarchical => hierarchical
Lets use FALSE as default
to avoid confusion we'd better name it "Media Gallery module"
Typecasting wouldn't be needed if the default is changed.
Comment #50
Moloc CreditAttribution: Moloc commentedThank you for review.
Changelog:
+ added fixes recommended by helmo (i replaced the 0 to FALSE for better reading. Changing the value in the admin-settings with the checkbox will generate always an integer value of zero or one.)
+ added fixes for delete-access bypass
@scampbell70
Check the settings again. Try to clear the cache.
Have you also changed these lines?
Find in media_gallery.module
and replace it with
Otherwise you change the values always for the same gallery collection.
Comment #51
Moloc CreditAttribution: Moloc commentedPatch in #50 produces a notice on taxonomy-term creation.
This patch fixes that.
Comment #52
Bojhan CreditAttribution: Bojhan commentedIt seems to work for me! I didn't try out deeper hierarchical structures though, I wonder how well that works.
Comment #53
scampbell70 CreditAttribution: scampbell70 commenteddisregard this post I thought I was patching wrong it turns out there was something else I was missing
Comment #54
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedOne remaining limitation is that there is no main listing of all gallery containers.
But it can be easily solved by adding an image field to each gallery container and then creating a taxonomy view to display the image and title for each gallery container.
I did this in a test site I'm helping build for a friend:
http://dream.relief20.com/workshops
Comment #55
von_stirliz CreditAttribution: von_stirliz commentedHi guys,
can someone send me the patched media_gallery.admin.inc file? I have issues with patch command.
Would be greatly appreciated. info(at)da.mg
Comment #56
helmo CreditAttribution: helmo commented@von_stirliz: http://drupal.org/node/1399218 might be a good starting point for you.
Comment #57
von_stirliz CreditAttribution: von_stirliz commentedHI,
I have patched it manually, but thanks.
P.S. I have no access to command line with my hosting :( So no git, no patch, no drush....
Comment #58
milos.kroulik CreditAttribution: milos.kroulik commentedYou can always patch it on you localhost and upload it. I'm on the same boat.
Comment #59
Aonoa CreditAttribution: Aonoa commentedIt is very nice to see that my feature request got this much support, and with the patches people have made I'm hoping we can see this functionality added to Media Gallery soon. How about it, Jacob? Clearly the community wants this added and enabled by default.
Best regards,
Ao
Comment #60
triple5 CreditAttribution: triple5 commented@ riversidekid #17 on April 25, 2011 at 8:47pm
I would say yes to that, a view can definitely be a RSS feed at least. To get emails from there would be either with views_send module (see also http://drupal.org/node/1323918) or something similar.
Yep, I would love to see this functionality for my video galleries as well, I would like to even dynamically tag the videos and create galleries on the fly from that, so far other things are not working for this...
Comment #61
fabrizioprocopio CreditAttribution: fabrizioprocopio commented+1
Comment #62
lsolesen CreditAttribution: lsolesen commented@fabrizioprocopio Please do not make "subscribe comments". Use the big green button in the upper right corner instead.
Comment #63
rajeevkHello All,
I read much comments here and thought it's matching my requirement.
Let me explain my need -
I want to create a gallery and import any folder from local file to map that with my created gallery. If it can't be done then I want to give a term for all the photos which I am importing from local folder, so that I can shortlist them when I go "ADD MEDIA"...
Is it possible in some way as when I am trying to add media now...all photos are getting listed & it's making me confuse that which I have imported in last and is not appeared in some other gallery..
If any body can help then it will be great help..
Thanks,
RajeevK
Comment #64
lsolesen CreditAttribution: lsolesen commented@Rajeevkr You should create a new support issue and not hijack an existing, unrelated issue.
Comment #65
rajeevkSorry...
I thought it's relevant to my issue...
extremely sorry..
Comment #66
borfast CreditAttribution: borfast commentedI applied the patch from comment #51 and it does let me add containers but if a container is inside an existing gallery (i.e., the gallery is the container's parent), it isn't shown. I would expect it to be shown just like any other gallery. Am I missing something or is it not implemented?
Comment #67
Moloc CreditAttribution: Moloc commented#66 borfast: Your wish is not implemented. So feel free to open a new "feature request" issue.
Comment #68
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedI applied patch #51 manually to 7.x-1.0-beta8 Jul 6 2012 and it works. :-)
Comment #69
flowbyte CreditAttribution: flowbyte commentedI'd would be very interested in this. It does seem to be the only thing missing from the module.
Comment #70
Rob C CreditAttribution: Rob C commentedWhen i test this patch on the current dev i get:
media_gallery# patch -p1 --dry-run < enable-gallery-collections-1037002-51.patch
patching file media_gallery.admin.inc
patching file media_gallery.install
Hunk #1 succeeded at 965 (offset -3 lines).
patching file media_gallery.module
Hunk #2 succeeded at 189 (offset -4 lines).
Hunk #3 succeeded at 882 (offset 34 lines).
Hunk #4 succeeded at 1317 (offset 44 lines).
Hunk #5 succeeded at 1337 (offset 44 lines).
Hunk #6 succeeded at 1358 (offset 44 lines).
Hunk #7 FAILED at 1350.
Comment #71
fox_01 CreditAttribution: fox_01 commentedMaybe an idea to extend the new container feature.
Wouldn't it be nice to have the settings like allowed file types etc. configurable per container / taxonomy, so a container personal pictures can have only pictures and public videos only videos and so on?
Comment #72
Carlos Miranda Levy CreditAttribution: Carlos Miranda Levy commentedPatch 51 by Moloc also works on the 7.x-2.x-dev version except for last hunk.
Just remove that last hunk from patch, apply and then manually remove the lines manually from media_gallery.module.
They are now further down, but they are exactly the same code and you can remove them safely and without doubts.
Once you do this, you have to flush your caches or you will get an error.
Once you flush it, the option for enabling Gallery containers will show at "admin/config/media/galleries".
Comment #73
salvisHere's a reroll of patch #51 without any changes.
I haven't actually looked at whether it works yet, just rerolled it for 7.x-2.x-dev.
Comment #74
Hetta CreditAttribution: Hetta commentedThe patch applies nicely.
(Note, the edit gallery page still says "The following settings affect the "All galleries" page, which shows a thumbnail of every gallery created.")
I'm on D7.22 with Media 7.x-2.0-unstable7+38-dev and media_gallery 7.x-2.x-dev.
Comment #75
Hetta CreditAttribution: Hetta commentedComment #76
bkat CreditAttribution: bkat commentedI've applied the patch in #74 to 7.x-2.x-dev and it applied with no errors. I've enabled Use multiple gallery collections. I then went to the "Configure gallery collections page" and added a new term as a child of galleries. Let's call it "2013"
I then to some galleries and set them to be in the collection 2013.
When I go back to the galleries page, I don't see any indication of there being a container named 2013 as a child of the main galleries page. The description of "use multiple gallery collections" option says that it enables hierarchicical galleries but I'm at a loss on how to set up a hierarchy of galleries.
Comment #77
Hetta CreditAttribution: Hetta commentedbkat: That's actually a taxonomy problem. It should be possible to get taxonomy to display child terms, but alas, I haven't found out how to do that yet. It's certainly a major bug for D7 ... as it worked out of the box for D6.
Comment #78
bkat CreditAttribution: bkat commentedI'm back at this after a hiatus. I've applied the patch to the current 7.x-2.x-dev and it was clean. In "Configure Gallery Collections" I added 4 collections under galleries and added galleries to each.
While in the gallery collections config, I can click on one of these and see the galleries that I've added to it. However, when I go to the toplevel Gallery, I only see the galleries added to it and not any of the collections that I've added to it.
In #77, Hetta mentioned something about a taxonomy problem. I'm not entirely sure what is meant. Can someone enlighten me on how to browse the gallery hierarchy from the top level?
Comment #79
bkat CreditAttribution: bkat commentedI just tried something that will work for now. I created a view named subgalleries that takes "Taxonomy term: Parent term" as an argument with the default value coming from the URL.
It filters the vocabulary to be gallery collections and sorts by taxonomy weight. The one and only field is term name (linked) and I display as a grid.
I created a block and configured it to display in the content section for pages "taxonomy/term/*"
So now when I go to my top level gallery, I get a list of its gallery collections. Not perfect but sufficient for now. I'd like the sub galleries to display the number of galleries and pick one of them as an image to display.
I'm attaching an export of my view in case anyone is interested.
Of course I'm still interested to hear if there is a native way to get a gallery collection to display all its child collections in addition to the galleries.
Comment #80
Fogg CreditAttribution: Fogg commented+1
Comment #81
fabrizioprocopio CreditAttribution: fabrizioprocopio commented+1
Comment #82
fabrizioprocopio CreditAttribution: fabrizioprocopio commentedI just found this module
https://www.drupal.org/project/media_browser_plus
I'm going to try it. It seems to do what we looking for
Comment #83
fabrizioprocopio CreditAttribution: fabrizioprocopio commentedlsolesen sorry. I did 2 times +1. I really didn't see the following green button. Sorry very much.
Comment #84
Lion.creek CreditAttribution: Lion.creek as a volunteer commentedHello, is currently a way to sort the gallery into folders? Create subgalerie?
Gallery
-2015
--Home
-2016
--Work
--School
Thank you for answer.
I use 7.x-2.x-dev tar.gz (301.27 KB) | zip (307.41 KB) 2015-Oct-17
Comment #85
ivnish CreditAttribution: ivnish commented