I am trying to use the example:
a href="images/image-1.jpg" rel="lightbox[][<a href=\"http://www.yourlink.com\">Clicky Visit Link</a>'>image #1

To use image caption into a Link...however Drupal keeps reformating the HTML code and breaks it. I've turned off all the filter in the Full HTML input format area in the admin.
Any ideas? Is there any other elegant way of doing this?

Comments

stella’s picture

What's the re-formatted HTML? If you're using full html input, it should do anything to your input text. Please place your code within <code> tags when pasting it in here.

Cheers,
Stella

gumdrop’s picture

<p><a visit="" http:="" rel="lightbox[][&lt;a href=\" href="/sites/default/files/images/image17.JPG">  <img height="90" width="90" alt="" src="/sites/default/files/images/small_image17.JPG" /></a>Nashville</p>

Unless it's the editor doing it. But when I enter the text I switch off the rich text editor. I am using FCKeditor.

stella’s picture

Can you send me a link to your site? My contact form is enabled if you wish to do so privately. Can you also paste in the code as exactly as you enter it in the node body?

Cheers,
Stella

gumdrop’s picture

I've added the code almost identically as your example except for the image names and locations.
I kept it simple. However, Drupal adds the extra html bits like "visit" and lops off the rest after I post it. I look at the code and it's re-formated according to how I posted above.
My site is off line at the moment and under development.

stella’s picture

If that's the case, then you must have an input filter enabled. Check admin/settings/filters. If that's not it, then maybe it's one of the other contributed modules you have enabled on your site. I can't help any further without seeing the site itself, sorry.

Cheers,
Stella

gumdrop’s picture

Yeah it seems to be the FCKeditor that's doing the re-formating but now I can seem to get the caption to show up.
Thanks for your help.

stella’s picture

Status: Active » Fixed

See http://drupal.org/node/252153 for help on getting it to work with FCKeditor.

Cheers,
Stella

gumdrop’s picture

Thank-you thank-you...that worked perfect.

sylv3st3r’s picture

It still fixed, but I want to point out things that I found recently. If you follow the example on the documentation, it's not gonna work. I've post correction on documentation comment.

Thanks stella for the great module.

stella’s picture

Fixed, thanks.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

badlydrawnben’s picture

Hello,

It would have saved me hours of searching and experimenting with different code if I had have read this suggestion, so I'm offering it here in case it might help someone else in the future:

The example html in the current documentation is this:

<a href="images/image-1.jpg" rel="lightbox[][&lt;a href=\"http://www.yourlink.com\"&gt;Clicky Visit Link&lt;/a&gt;'>image #1

It doesn't work for me (or for anyone I think. First of all the last ' should be a ]
Also, when i converted the " to its HTML code as well as the < and > then that fixed it.

Try something like this instead

<a href="images/image-1.jpg" rel="lightbox[][&lt;a href=&quot;http://www.yourlink.com&quot;&gt;Clicky Visit Link&lt;/a&gt;]>image #1

Hope that might help some hapless googler like me to fix their links inside lightbox captions.

Great module by the way.

Ben

jvdurme’s picture

badlydrawnben, you're a life saver. Thanks a million!