Closed (fixed)
Project:
Cloud Zoom
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2011 at 06:27 UTC
Updated:
13 Dec 2017 at 16:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
radimklaskaI'm changing version because original request is really old and main focus should be on D7 now.
Also I should point out, that http://drupal.org/project/vtcommerce_image has similar functionality, but makes lots of assumptions.
Comment #2
anybodyI have the same requirements and will try to create a patch right now. Anyway this is not major, but it's sad that there has not been an answer for over a year.
Comment #3
anybodyThis is simple and robust to add.
Here are my changes:
js/cloud_zoom.js:
cloud_zoom.module
Append to function cloud_zoom_settings_info():
If the module maintainer is interested, I can provide a patch.
The change is tested and works great.
Comment #4
anybodyI've attached the patched module to have a look and test it quickly.
Comment #5
romazh commentedafter last div in body.tpl.php
(function ($, Drupal) { $(".cloud-zoom-container").click(function() { $(this).find("a").colorbox({open: true, rel:'cloud-zoom-gallery'}); }); })(jQuery, Drupal);Comment #6
anybodyWell that's not a clean idea (from my point of view) to add this to body.tpl. At lease you should create a module for that.
Anyway it may work. The main question is: Should the colorbox integration become a feature of this module or not?
My solution provides a clean checkbox for each cloudzoom field.
Comment #7
vensiresActually, I don't believe there is a "should" or "must" here, though I believe that an integration with a *box module would be very handy and wouldn't add a lot of extra weight to Drupal.
What I can see from my point of view as a web developer though is that - at least in Greece - more and more clients building their e-shop are asking for both a CloudZoom and a Lightbox/Colorbox integration. Taking into account that Colorbox at this time of writing has 237,725 sites actively using it, whereas Lightbox2 has 134,288 sites actively using it, I think that Colorbox module is the way to go and stick to it. Besides, Colorbox has already an on-going Drupal 8.x version.
Comment #8
vinmassaro commentedHere is a patch of Anybody's work in #4. I had to change $
attributes['classes']to$attributes['class']for it to add the 'colorbox' class properly. I've tested this simple patch and it works well.I removed all of the syntax changes so that this patch isolates just the changes to add colorbox support. The syntax changes could be introduced in a separate patch in another issue. Please test, thanks!
Comment #9
tarasikarius commented#5 worked for me well, the only thing is I add it to my theme's js file.
Comment #10
mstiIt looks like this feature is not a priority for the maintainer.
Here is the patched module using the patch from #8 plus another improvement (colorbox for cloud zoom gallery).
https://github.com/msti/cloud-zoom-drupal
Comment #11
anybodyConfirming Patch from #8 is RTBC. @msti, can you also confirm that?
This may help the maintainer to take this forward.
Comment #12
mstiI thought the patch was already confirmed.
#8 is confirmed.
And this patch also adds colorbox support to the gallery cloud zoom.
Comment #13
charlysole commentedAfter applying the patch i'm getting this notice
Notice: Undefined index: colorbox en cloud_zoom_field_formatter_view() (line 449 at .../cloud_zoom/cloud_zoom.module).
No zoom effect anymore, but clicking the image, colorbox opens
Any ideas?
Comment #15
dakku commentedComment #17
vinmassaro commentedThe committed patch breaks the non-gallery version of Cloud Zoom because the default
$attributesarray was dropped. I've posted a patch to fix this here #2930549: Recent colorbox integration breaks Cloud Zoom.