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.
Hi think you should use the Colorbox Module settings instead of going directly to the librairies. This way the Media Gallery will look like the rest of the Website if colorbox is use at other places.
Maybe add a dependency on Colorbox Module !
Comment | File | Size | Author |
---|---|---|---|
#79 | integrate_with_colorbox_module-1053674-79.patch | 18.82 KB | mrfelton |
#76 | integrate_with_colorbox_module-1053674-76.patch | 15.45 KB | camdarley |
#44 | media_gallery-integrate_with_colorbox_module-1053674-44.patch | 13.88 KB | scorchio |
#37 | integrate_with_colorbox_module-1053674-37.patch | 12.37 KB | Thomas Bosviel |
#30 | screen.png | 348.56 KB | segi |
Comments
Comment #1
camdarley CreditAttribution: camdarley commentedI agree with that feature!
Subscribing...
Comment #2
KirstenLangholz CreditAttribution: KirstenLangholz commentedI second that. At least it should be possible to choose the layout.
Comment #3
BarwonHack CreditAttribution: BarwonHack commentedAgreed.
Often various modules utilised in a site each using different instances of Colorbox can cause each other to malfunction.
Comment #4
BenK CreditAttribution: BenK commentedSubscribing
Comment #5
sw3b CreditAttribution: sw3b commentedComment #6
Thomas Bosviel CreditAttribution: Thomas Bosviel commentedSubscribe
Comment #7
anavarreSubscribing
Comment #8
gerrit.k CreditAttribution: gerrit.k commentedI created a patch that should make it possible to use most of the ColorBox module settings. It is based on media_gallery beta 4 and you need to install the latest version of the ColorBox module (http://drupal.org/project/colorbox).
There are still problems with the styles that are shipped along the ColorBox library, especially example3 (e.g. wrong background color). I'm still working on a better way to get the description displayed in the overlay. For now, I set a fixed height in the CSS file (scrollbar is shown if the description is too long), however you should still be able to override these settings in your theme if needed.
Please test it and let me know if you run into other issues.
Comment #9
jamc17 CreditAttribution: jamc17 commentedHello, I'm new in Drupal and I need just it, gerrit.k youcan say me in wich file/module the patch is apply.
Thanks a lot.
Disculpen por el idioma,es que no domino el ingles
Comment #10
gerrit.k CreditAttribution: gerrit.k commentedPut the patch in your drupal/sites/all/modules/media_gallery/ directory and apply it. http://drupal.org/patch/apply has some more information on how to do this (I only used git to test it).
Comment #11
gerrit.k CreditAttribution: gerrit.k commentedI made some smaller changes to the patch and tested it with the ColorBox example1-5 styles. Compared to the original beta 4 I moved the description away from the right side because example3 looks horrible. Example3 has the navigation buttons on top of the image and not above or below, so it would be rendered on top of the text otherwise. However when loading flash videos (e.g. media_youtube), the buttons are unusable with that theme.
Maybe some CSS wizard can have a look at the stylesheet and figure out a way to make all styles work equally good by default, without "fixing" them manually.
Comment #12
gerrit.k CreditAttribution: gerrit.k commentedI've updated the patch to have fewer changes in the PHP files but many more in the CSS and JavaScript ones.
According to the selected style in the ColorBox module settings a class is added to the body tag on creation of the ColorBox (e.g. example2 is selected, .cbox-example2 is added). Obviously this allows you to have completely different CSS code for each ColorBox style. I included somewhat OK-looking ones for all styles shipping with the ColorBox library and module. Example1 is mostly unchanged compared to the original, all other styles have the description field moved below the image / video.
Feedback would be really appreciated.
Comment #13
sw3b CreditAttribution: sw3b commentedThanks its looking good !
Comment #14
gerrit.k CreditAttribution: gerrit.k commentedSame as patch 3 (comment #12) with fixes for whitespaces and new line at end of file.
Comment #15
chaloum CreditAttribution: chaloum commentedwhen will this be committed as I have not hope of applying patches.
Comment #16
JimmyAx CreditAttribution: JimmyAx commentedRenaming to hopefully better describe the issue.
Patch at #14 is looking great. I've found the following problems though with Firefox 3.6.17:
Other browsers have not been tested.
Comment #17
gerrit.k CreditAttribution: gerrit.k commentedGood points you made there and I can confirm most of them. However I'm not so sure that these issues are specific to this patch:
I created a custom content type with a multiple image upload field that is displayed in a ColorBox (and therefore not using media_gallery at all) and the problem still exists while having a bunch of other issues like creating inline scroll bars for the image etc.. This could probably still be fixed inside this patch, but it might be better if this is fixed in the ColorBox style itself in the ColorBox module.
Comment #18
JimmyAx CreditAttribution: JimmyAx commentedAttaching a screenshot to better describe the extra whitespace issue.
Comment #19
gerrit.k CreditAttribution: gerrit.k commentedI guess you have enabled "Show title and description" for your gallery but didn't enter a description for the image? If that is the case then your screenshot would look the same as if you used media_gallery beta 4 without the patch. I tested it on my installation with both versions and "Show title and description" enabled and they both reserve that extra white space even if a description for that particular image is missing. However that would mean that it isn't a regression of the patch, right?
Comment #20
brenes CreditAttribution: brenes commentedThank you for the patch, with it the colorbox display is well structured. I have two questions regarding the output:
First: Is it possible to change the order of fields, so that I can display the title (cboxTitle) before the Textfield (mg-lightbox-description)?
Second: I have seen, that the div of the textfield is apperaring in the code of the displayed colorbox even if it is empty. So it is showing the following:
<div class="mg-lightbox-description"></div>
Would it be possible to leave it from being printed when its empty?
Best Regards,
Comment #21
Thomas Bosviel CreditAttribution: Thomas Bosviel commentedUpdate patch for 1.0-beta5 release.
Comment #22
kirilius CreditAttribution: kirilius commentedAny hope that the patch will be rolled into a release soon?
Thanks!
Comment #23
good_man CreditAttribution: good_man commentedsubscribe
Comment #24
mrfelton CreditAttribution: mrfelton commented+1. patch in #21 seems to be working well for me. Thanks.
Comment #25
mrfelton CreditAttribution: mrfelton commentedpatch in #23 fails to apply through drush make due to a file permissions issue.
Attached patch resolves.
Comment #26
glass.dimly CreditAttribution: glass.dimly commentedThis patch (#25) is failing on beta6.
bash-$ git apply ../../hacks/1053674-Use_colorbox_module_setting-4_0_0.patch
error: patch failed: media_gallery.info:3
error: media_gallery.info: patch does not apply
bash-$
I think this is a pretty important feature and I'd like to see this go into the dev branch if possible. This module should really be using the colorbox module, colorbox is pretty stable at this point.
Also I think the small css bugs are not important, given that the current media_gallery module's colorbox looks more messed up, and you can't configure it.
Media Gallery is a great module and a great way forward.
Comment #27
glass.dimly CreditAttribution: glass.dimly commentedFYI this is a related thread: http://drupal.org/node/1088738
Comment #28
Thomas Bosviel CreditAttribution: Thomas Bosviel commentedUpdate patch for 1.0-beta6 release.
Comment #29
jczuo CreditAttribution: jczuo commentedsubscribe.
Thanks for your great work
Comment #30
segi CreditAttribution: segi commentedI installed media_gallery beta-6 and I use patch in #25 but the whitespace problem not resolved by patch!
What I did i do wrong?
Comment #31
segi CreditAttribution: segi commentedThis was my fault, I tried it again, I did it.
Comment #32
Joenet-dupe CreditAttribution: Joenet-dupe commentedI use the patch in #28 (media_gallery beta-6) but I see no difference. Colorbox which always has the same size independent of the screen resolution.
Comment #33
Joenet-dupe CreditAttribution: Joenet-dupe commentedNow I see the difference. Thanks!
Just a pity that the Colorbox the screen resolution does not adapt.
Comment #34
axe312 CreditAttribution: axe312 commentedPatch from #28 works perfectly on 1.x-dev :)
Pls submit it to core!!!
Comment #35
bkosbornesubscribe
Comment #36
Joenet-dupe CreditAttribution: Joenet-dupe commentedHello,
Will there be a patch for 7.x-1.0-beta7?
Comment #37
Thomas Bosviel CreditAttribution: Thomas Bosviel commentedUpdate patch for 1.x-dev (works on 1.0-beta7)
Comment #38
Joenet-dupe CreditAttribution: Joenet-dupe commentedYes, it works. Thank you!
Comment #39
franzkewd CreditAttribution: franzkewd commentedSubscribe
Comment #40
chules CreditAttribution: chules commentedI am running version 7.x-1.0beta7 and just applied patch integrate_with_colorbox_module-1053674-37.patch. I am using the Colorbox default style and everything seems to work fine. I have tested a few of the Colorbox styles as well.
The one issue I see on my site is that I am now missing the slideshow feature that was present before the patch where a site visitor can click it and watch the slideshow.
Is there something I missed in configuration? Does anyone know how I can activate this feature.
Thank you - chules
Comment #41
cjgriffin CreditAttribution: cjgriffin commentedHi chules,
You can re-activate it through the Colorbox configuration (admin/config/media/colorbox). Under Options, click Custom, and navigate down to Slideshow Settings.
Comment #42
marktheshark CreditAttribution: marktheshark commentedThis appears to be in stable enough state to be committed. Is it expected to be checked in soon? Thanks
Comment #43
Moloc CreditAttribution: Moloc commentedNotes to patch in #37:
1. If you add a dependency to colorbox, you should also change the README.txt file (the installation guide - requirements).
2. Coding Standards: Always use a space between the dot and the concatenated parts to improve readability.
+ '<div class="mg-lightbox-wrapper clearfix '.$media_desc_class.'">' .
replace with
+ '<div class="mg-lightbox-wrapper clearfix ' . $media_desc_class . '">' .
Comment #44
scorchio CreditAttribution: scorchio commentedHere's my try to improve the patch in #37 based on the suggestions of Moloc in the previous comment - it just fixes the coding style in the mentioned line and adds the necessary information to the README.
I've tested this patch with the 1.3.19 version of the Colorbox plugin, hence the "tested" line in the README. Please modify it as necessary.
Comment #45
midmood CreditAttribution: midmood commentedsubscribe
Comment #46
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedI've set patch #44 and got rid of all the white space on the sides, but there is still a large white space at the bottom, where a description might be. I tried hiding the description field in the content type, but still have the white space. Any ideas?
Thanks
Sharon
Comment #47
dimitriseng CreditAttribution: dimitriseng commentedHi. I have applied patch #44 to Media Gallery 7.x-1.0-beta7 + colorbox 7.x-1.2 and it all seems to be working as expected, great work, thanks! I am not getting the large white space at the bottom mentioned in #46.
This is a very useful feature and it looks like many people have got this working, any plans for this to be commited soon?
Comment #48
dimitriseng CreditAttribution: dimitriseng commentedI had another look at this. When I applied patch #44 on Media Gallery 7.x-1.0-beta7, the patch applied successfully but the following change did not apply for some reason:
- '<div class="mg-lightbox-wrapper clearfix">' . "
+ '<div class="mg-lightbox-wrapper clearfix ' . $media_desc_class . '">' .
Without this change applied, everything worked fine. When I made this change manually to the media_gallery.theme.inc, I was getting the large white space at the bottom, as also reported by Sharon in #46. I guess that this is where the description is supposed to be, but even if I have setup descriptions for the images these are not shown and there is this white space which should be removed, does anybody know how to show the descriptions if required?
Apart from this problem, which I think that should be resolved, everything else seems to be working ok so far.
Comment #49
SharonD214@aol.com CreditAttribution: SharonD214@aol.com commentedMy patch made the change as mentioned was missing in #48 and my descriptions show up, but still a large white space underneath.
Sharon
Comment #50
dimitriseng CreditAttribution: dimitriseng commentedAs per #47 and #48, the integration with colorbox seems to be working ok with patch #44, apart from the large white space underneath. Does anybody have any idea on how to fix this? Assuming this is resolved, are you happy to get this functionality commited? Thank you.
Comment #51
dimitriseng CreditAttribution: dimitriseng commentedHi all, does anybody have any thoughts on #50? I hope this can be progressed and commited, thank you!
Comment #52
flightrisk CreditAttribution: flightrisk commentedWill someone please commit this?
Comment #53
Babich CreditAttribution: Babich commentedHello, I applied the patch # 44, but the problem persists, what could be the reason?
Comment #54
dimitriseng CreditAttribution: dimitriseng commentedAs per my post at #50, the only thing that is stopping #44 from being RTBC is the large white space underneath. Can somebody please review so that we can get this commited?
@Babic, please do not assign to yourslef unless you are planning to work on this :)
Comment #55
Babich CreditAttribution: Babich commentedI just wanted to clarify why the patch may not work #44
Comment #56
von_stirliz CreditAttribution: von_stirliz commentedI second that!
Subscribe - that should go into the main code.
Comment #57
lsolesen CreditAttribution: lsolesen commentedCould any of you make a recap of this issue and modify the patch, so we can get this to RTBC? The issue queue in media_gallery is moving again, and things are getting committed now.
Comment #58
selinav CreditAttribution: selinav commented+1
Comment #59
lsolesen CreditAttribution: lsolesen commentedplease use the green button to follow instead of subscribe comments
Comment #60
dimitriseng CreditAttribution: dimitriseng commented@lsolesen - it is great to see that finally things are moving again with this project. I think that patch at #44 is almost providing all the functionality required, but please see the outstaning issue described in #48 and #49, hopefully somebody can identify what the problem is and update the patch appropriately.
Comment #61
scorchio CreditAttribution: scorchio commentedIf someone could give me a hint on what to test exactly I would be happy to help with this issue.
Comment #62
lsolesen CreditAttribution: lsolesen commentedwrite a recap of the issue
Comment #63
Moloc CreditAttribution: Moloc commentedIn the current release, we assume, that the colorbox-library is available. As there is also another feature request (#1311568: Integration with other lightbox alternatives), to use alternative lightboxes, it would be a bad idea to make the colorbox-module a dependency. We should make that optional. If there is a lightbox module, the user should be able to select a installed lightbox.
Comment #64
lsolesen CreditAttribution: lsolesen commentedagreed. so remove existing integration and make it optional to have a lightbox module.
Comment #65
lsolesen CreditAttribution: lsolesen commentedWe should be working on this one instead: #1311568: Integration with other lightbox alternatives
Comment #66
Moloc CreditAttribution: Moloc commentedFor me, integration with other lightboxes means, that we provied some way (hook, api,...) to use other lightboxes. This does not exclude the core of this patch - using colorbox settings. If we do not provide colorbox support, a lot of sites may get broken. So i think this patch is usefull.
Comment #67
webadpro CreditAttribution: webadpro commentedPersonally, I think patch number 44 should get commited since its already there rather than waiting for the whole lightbox alternative integration.
Thats my 2 cents.
Comment #68
scorchio CreditAttribution: scorchio commentedAs far as I can see #1311568: Integration with other lightbox alternatives will take some time to deliver a somewhat complete lightbox solution - IMHO more than implementing this properly would. Still, it would be useful to have support for different lightboxes of course.
Comment #69
lsolesen CreditAttribution: lsolesen commented@Moloc. We need to come to a conclusion here.
a) Some people do not like us to force a dependency on the colorbox module. However, they are already forced to use the colorbox library.
b) We need to add more settings, making it easy to just use the colorbox module.
We have two options:
1) Integrate the colorbox module if it is available. Otherwise use the existing functionality.
2) Ditch the existing functionality and only use the colorbox module.
Seems to me that we should go with option 2, but make sure to write good documentation with the upgrade where this happens. Your thoughts?
Comment #70
webadpro CreditAttribution: webadpro commentedMove on to Option 2.
Any thoughts about this?
Comment #71
kenheim CreditAttribution: kenheim commentedMove to option 2! Patch#44 worked great for me, using media_gallery 7.x-1.0-beta8. Please commit.
Comment #72
MrPaulDriver CreditAttribution: MrPaulDriver commentedI'm late to this thread.
Will this fix the problem of Media Galleries colorbox windows being fixed in size?
I find that it doesn't work well for mobile, yet where I use colorbox elsewhere, the modal windows scale nicely to the available screen size.
Comment #73
sahaj CreditAttribution: sahaj commentedIs a version of the patch #44 available for Media Gallery 7.2 ?
Comment #74
dimitriseng CreditAttribution: dimitriseng commentedI would also suggest that #44 is committed to 1.x and also implemented for 2.x (for D7) until and when #1311568: Integration with other lightbox alternatives is completed. Many thanks for the great work.
Comment #75
jrreid CreditAttribution: jrreid commentedI've installed and tested the patch in #44 quite a bit, and don't see the white space issue mentioned above.
Colorbox: 7.x-2.4
Colorbox Library: 1.4.21
Media Gallery Version : 7.x-1.0-beta8
Comment #76
camdarley CreditAttribution: camdarley commentedHere is a version of the patch working with 7.2
Comment #77
saltednutCan we move all the colorbox related css into its own file?
This is from another patch and was already committed.
This I love to see :)
Rather than making this a hard dependency, it would be best to just leave it available as an option. There will be no harm to sites that choose not to use colorbox.
Comment #78
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI am getting this error:
colorbox 7.x-2.6
media_gallery 7.x.dev https://drupal.org/node/1855276 from 2/26/14
colorbox library 1.5.9
But I am getting 'Cannot call method 'toString' of undefined:
Here is the line:
var cboxTheme = (Drupal.settings.colorbox.__drupal_alter_by_ref).toString();
thanks for this. I like being able to use the colorbox module since I already have it installed.
Comment #79
mrfelton CreditAttribution: mrfelton commentedI have similar issues as @SocialNicheGuru in #77. I wasn't able to find much reference to this __drupal_alter_by_ref property and it was breaking things, so I removed it from the patch.
Additionally, in previous patches colorbox settings for maxWidth and maxHeight were not carried over from colorbox module, so I have added those.
Also, media_gallery_update_7012 has nothing todo with this patch and already exists in media_gallery, so I've removed that too.
Comment #80
mrfelton CreditAttribution: mrfelton commentedFor reference, I'm using this with the following and things seem to be working okish
Comment #81
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedI think #79 also incorporates this patch: enable-gallery-collections-1037002-73.patch
http://drupal.org/node/1037002
Comment #82
brenes2 CreditAttribution: brenes2 commentedHello I'am trying to insert the title content in the cboxTitle div. I assume that the following Jquery of the patched colorbox-display.js should be responsible for this:
But there is no effect at all. Please have a look at the website
http://itg-bau.de/leistungen
Any Ideas how I am able to get it running?
I am using colorbox library 1.3.16, media gallery 7.x-1.0-beta7, colorbox module 7.x-2.9
Comment #83
ivnish CreditAttribution: ivnish commented