Closed (fixed)
Project:
Lightbox2
Version:
5.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Feb 2008 at 20:16 UTC
Updated:
21 Mar 2008 at 14:42 UTC
Jump to comment: Most recent file
Thanks so much for adding this functionality, snpower. An issue I'm having, is that after specifying for Lightbox to be triggered for images of the class "image-img_assist_custom," when the image is one that is too small for a 'preview' size image to have been generated, the Lightbox shows the image's custom size (the one embedded in the page), rather than the largest available, which is the original.
Lightbox quite correctly shows the original image when there isn't a larger 'preview' size one available (this is awesome!), but it seems that for images that were custom sized in TinyMCE via Image Assist, this doesn't work.
Can this be fixed?
Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | lightbox2_222273.patch | 1.64 KB | stella |
Comments
Comment #1
stella commentedCan you show me the page source or give me a url? I have tinyMCE and image assist installed but I can't get the two to work together. I'm not that familiar with TinyMCE, could you perhaps provide more details on how you add the image to the page and the settings you use.
Cheers,
Stella
Comment #2
akahn commentedHey Stella. Yes, getting TinyMCE and Image Assist working together can be a bit tricky, mostly because of poor documentation, I think. You need to install the module for Drupal, and also install a TinyMCE plugin called 'drupalimage' that it comes with the module.
Here's the HTML for the image that loads the custom size (the size that's already being displayed on the page) rather than its original size.
<span class="inline inline-left"><a href="/drupal/en/files/images/youth.jpg" onclick="launch_popup(30, 480, 640); return false;" target="_blank"><img src="/drupal/files/images/youth.img_assist_custom.jpg" alt="" title="" class="image image-img_assist_custom" width="194" height="259" /></a></span>In Image Assist, the image is set to pop-up in a new window (same setting as for images set to the 'thumbnail' size, which work fine), and then once the image is embedded in TinyMCE, I dragged its corner handle to make it a custom size (this can also be done in in the Image Assist popup.
Let me know if you need any additional info. Thanks for helping with this!
-Alex
Comment #3
stella commentedThis should now work in the latest dev release, which will be available later today.
Cheers,
Stella
Comment #4
akahn commentedThanks a lot. You're helping my site come along!
Comment #5
akahn commentedHey Stella, I've given the new dev release a try, and now when I click on a thumbnail that has been custom-sized, Lightbox brings up its 'image not found' image.
Below is the HTML code on the page. The file the
<a>links to actually does not exist, because the file is in/drupal/files/images/youth.jpgnot/drupal/en/files/images/youth.jpg. (I think the i18n module, and maybe pathauto, is putting in the "en." Is that right, do you think?)However, another image embedded in this node (set to display in thumbnail size, not custom) that also links to a file that doesn't exist in its
<a>tag, but the image still displays its larger version in Lightbox correctly. I guess the Lightbox script uses some other data to determine what image it opens.Anyways, do you have any idea why this is happening? Can it be fixed?
Many thanks,
Alex
Comment #6
stella commentedLightbox2 (latest version) should handle the "/en" bit of the path if it appears at the beginning of the path, e.g.
<a href="/en/files/images/DSCF0500.preview.JPG" ..... What's your file system path set to (admin/settings/file-system)?The second scenario works because it's an image node, and for image nodes it uses the img src path to determine the image.
Cheers,
Stella
Comment #7
akahn commentedGlad to hear the "en" part is no problem. My filesystem path is
files.Note: both of these images are image nodes, just one is set to a preset size and one is set to a custom size.
Let me know if you need any other info.
Thanks,
Alex
Comment #8
stella commentedHmmm but you have
/drupalbefore the/en/files/..... Where is that coming from do you know?Comment #9
akahn commentedYeah, my Drupal installation is in a directory called
drupal, so my Drupal site's root is athttp://localhost:8888/drupal/.Comment #10
akahn commentedHi again. Any word on this issue? Is it fixable? Is it reproduce-able? Do you need more info from me?
Thanks much,
Alex
Comment #11
stella commentedTry the attached patch.
Comment #12
akahn commentedThis patch does the trick. Thanks again. :)
Comment #13
stella commentedFixed in 5.x and 6.x versions (will be available in next dev release).
Cheers,
Stella
Comment #14
stella commentedReleased in lightbox 2 5.x-2.5 and lightbox 2 6.x-1.5.
Cheers,
Stella
Comment #15
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.