Is there a way to use Lightbox with FCKEditor, without type rel="lightbox"?
FCKEditor writes Only local images are allowed.

THANKS

Comments

mapi68’s picture

cutted because I wrote with tags...

img align="left" src="/files/u1/pippo.jpg" alt=""

stella’s picture

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.

Cheers,
Stella

edhaber’s picture

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

-Ed

stella’s picture

Status: Active » Fixed

Ok, the class='lightbox' bit should really be set on the img tag rather than on the link a tag. So your code would look like:

<a href='path/to/largerimage.jpeg'>
<img src='path/to/thumbnail.jpeg' class='lightbox'/>
</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.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

Demphest’s picture

hebhansen’s picture

could 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;
}

ludrao’s picture

I did another small and easy integration of lightbox into FCKeditor. There is a quick howto here: http://www.ludrao.net/home/node/8.