Is there any way to have images inserted with IMCE popup in the lightbox?
As far as I know, IMCE does not insert the a tag. I could go around it by modifying the IMCE code, but what to insert into the a tag to trigger the lightbox?
Is there any way to have images inserted with IMCE popup in the lightbox?
As far as I know, IMCE does not insert the a tag. I could go around it by modifying the IMCE code, but what to insert into the a tag to trigger the lightbox?
Comments
Comment #1
stella commentedDo you have a site setup which contains images uploaded by IMCE which I could take a look at?
When uploading images via IMCE, is it possible to (a) give the image a class name or (b) give the surrounding anchor a "rel" attribute (assuming not)? Or does IMCE assign a class name to the uploaded image when you view it?
Cheers,
Stella
Comment #2
softtouch commentedAfter checking what imce creates, it does simply insert the img tag, nothing else:
<img src="/files/u1/100_4373_0.jpg" width="120" height="90" alt="100_4373_0.jpg" />Which would mean, I would have to modify the module itself to let it add the a tag with rel="lightbox" etc.
If thumbnail is enabled in imce, it create 2 files:
100_4373_0.jpg - The thumbnail
100_4373.jpg - The full size image
I believe, it was a stupid idea to use IMCE and I better switch back to image_assist, even it is annoying that it add the image to the gallery...
Comment #3
stella commentedThe
rel="lightbox"does not need to be added to theimgbut rather to the surrounding anchoratag, if one exists. The anchor tag is vital for lightbox to work.Re-assigning this issue to the IMCE list so they can tell you how to add either (a)
rel="lightbox"to the anchor tag, or (b) how to assign a class name to the image tag.Cheers,
Stella
Comment #4
ass45sin commentedOn the example below I have lefty set as an image trigger class on Lightbox2 5.x-2.5, but for some reason even after giving a special class to the image tag lightbox only shows the image of the img tag instead of displaying the image on the anchor tag. The class was given by IMCE version 5.x-1.2 which is set to use CSS classes from the theme.
<a href="/durpfile/u1/great_whiteshark_0.jpg"><img src="/durpfile/u1/great_whiteshark_1.jpg" class="lefty" alt="A great white shark swimming" title="White Shark" align="left" height="142" width="200" /></a>On the other hand giving rel=lightbox on the surrounding anchor text works.
Have I missed something here? Or is this a lightbox issue.
Comment #5
merilainen commentedSo is there anyway to assign rel="lightbox" to picture links with IMCE? Or classify images automatically to use lightbox?
Comment #6
ufku commentedit depends on the interface adding the image link. tinymce? fckeditor? bueditor? imce inline?
IMCE does not interfere with the code added. It just sends the file path to editors.
Comment #7
merilainen commentedI'm using FCKeditor at the moment. It is a possible to add class="lightbox" to img manually, but it would be nice to have it inserted automatically.
Comment #8
superflyman commentedI am trying to get Lightbox2 to work using TinyMCE and IMCE. Lightbox works when images are inserted with the image upload function in a story. However, when I add inline images using IMCE (insert main image and secondarily create link to url) the picture opens in a separate node. I have configured the lightbox automatic handler for inline images but no lightbox launches. Any thoughts? Should i be doing something different with IMCE when creating inline images?
Comment #9
stella commented"inline" images refer to ones created with the Inline module. For TinyMCE integration, see http://drupal.org/node/252153
Comment #10
superflyman commentedStella, thanks soo much! Solved the problem...
Comment #11
stella commentedsuperflyman: that's unrelated to the lightbox2 question raised here, please open a separate issue. Thanks.
Comment #12
sicarius-1 commentedYou can take a look at this http://drupal.org/node/314566
This is how I got IMCE + FCKEditor + Lightbox all to work together nicely, and there's a section there on how to make images added with FCKEditor to be associated with lightbox automatically.
Be aware that you need to make modification to the code to make it work, but it's relatively simple change.
Comment #13
encho commentedNice. Anyone has TinyMCE solution?
Comment #14
eagereyes commentedI just did this with the TinyTinyMCE module: on its admin page, find "TinyMCE init script for advanced mode," and under "extended_valid_elements" at the very end, add "rel" to the list under the a tag (it's the first element listed). Then edit a posting, and in a link to the image you want to see in Lightbox, click on the advanced tab in the link popup and select "Lightbox" from the "Relationship" drop-down box. This needs to be done in advanced mode, I don't think you can do it in simple mode.
Comment #15
Cohassetsteve commentedA big thanks for #14 from a relative Drupal newbie. It worked like a champ. It now preserves the rel="lightframe" tag as well - now to be able to add lightframe from the advanced tab...
Comment #16
rajmataj commentedLightbox, CKEditor, WYSIWYG and IMCE living together:
http://drupal.org/node/1002110#comment-4112474
Comment #17
ufku commentedClosing 6.x-1.x issues as this branch is no more supported.