Come together with the global Drupal community in Rotterdam, 28 Sept – 1 Oct 2026. Sessions, contribution, connection, and Early Bird savings until 8 June.
Lightbox requires that rel="lightbox" or rel="lightbox[some grp name]" be added to each link that you require lightbox to open for. Alternatively, you can enable automatic image handling, specify a class name in the textarea and assign that class name to the img itself. If the image is an image node, you can just enable automatic image handling for image nodes.
There's no way for lightbox to work without the rel="lightbox" link bit or the image class name configuration.
I added a Custom image trigger class of lightbox and i can add that to images and links in FCK editor.
It works on images, but i just get the same image in the lightbox.
How can i get the larger image from the link that is wrapped around the img tag?
the code looks like
a href='path/to/largerimage.jpeg' class='lightbox'
img src='path/to/thumbnail.jpeg'
/a
if i do the same thing with rel='lightbox' it works. i was hoping that the class='lightbox' could be swapped for that
a href='path/to/largerimage.jpeg' rel='lightbox'
img src='path/to/thumbnail.jpeg'
/a
However, the feature were the image displayed is that from the link rather than the one specified by the img tag, only works when (a) using rel="lightbox" (as you mentioned above) or (b) where the class name specified is one of the "image node" trigger sizes. For example, if you had automatic handling for image nodes enabled and had configured the "thumbnail" size as one of the trigger image sizes and set class="thumbnail" on the img tag, then it should work.
Comments
Comment #1
mapi68 commentedcutted because I wrote with tags...
img align="left" src="/files/u1/pippo.jpg" alt=""
Comment #2
stella commentedLightbox requires that
rel="lightbox"orrel="lightbox[some grp name]"be added to each link that you require lightbox to open for. Alternatively, you can enable automatic image handling, specify a class name in the textarea and assign that class name to the img itself. If the image is an image node, you can just enable automatic image handling for image nodes.There's no way for lightbox to work without the
rel="lightbox"link bit or the image class name configuration.Cheers,
Stella
Comment #3
edhaber commentedI added a Custom image trigger class of
lightboxand i can add that to images and links in FCK editor.It works on images, but i just get the same image in the lightbox.
How can i get the larger image from the link that is wrapped around the img tag?
the code looks like
a href='path/to/largerimage.jpeg' class='lightbox'
img src='path/to/thumbnail.jpeg'
/a
if i do the same thing with rel='lightbox' it works. i was hoping that the class='lightbox' could be swapped for that
a href='path/to/largerimage.jpeg' rel='lightbox'
img src='path/to/thumbnail.jpeg'
/a
-Ed
Comment #4
stella commentedOk, the
class='lightbox'bit should really be set on theimgtag rather than on the linkatag. So your code would look like:However, the feature were the image displayed is that from the link rather than the one specified by the img tag, only works when (a) using
rel="lightbox"(as you mentioned above) or (b) where the class name specified is one of the "image node" trigger sizes. For example, if you had automatic handling for image nodes enabled and had configured the "thumbnail" size as one of the trigger image sizes and setclass="thumbnail"on the img tag, then it should work.Cheers,
Stella
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
Demphest commentedSimple way of integration :)
http://asten.ru/blog/programming/fckeditor-lightbox-eng
Comment #7
hebhansen commentedcould this make a change in FCKeditor:
if (variable_get('inline_link_img', '1')) {
$attributes = array(
'class' => 'inline-image-link',
'title' => t("View") .': '. $title,
- 'rel' => 'lightbox[gp_inline]'
);
$html = l($image, $file->filepath, $attributes, NULL, NULL, FALSE, TRUE);
}
else {
$html = $image;
}
Comment #8
ludrao commentedI did another small and easy integration of lightbox into FCKeditor. There is a quick howto here: http://www.ludrao.net/home/node/8.