Closed (fixed)
Project:
Lightbox2
Version:
5.x-2.5
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Apr 2008 at 19:39 UTC
Updated:
11 Nov 2008 at 19:42 UTC
In Firefox 2, Safari 3 and Opera 9, placing text containing html into the title of the <a> tag works fine when viewing the image within Lightbox2, but also shows raw code when the cursor hovers over the smaller image in the node.
I realize this is probably more of an html issue than a Lightbox2 issue, but it would be good to have a way to get around this because when working with images that have longer captions, the visible code ends up compromising an otherwise nice site design.
Example from the readme, for reference:<a href="images/image-1.jpg" rel="lightbox" title='<a href="http://www.yourlink.com">Clicky Visit Link</a>'>image #1</a>
Comments
Comment #1
silurius commentedComment #2
stella commentedI've just committed a fix for this to CVS. It should fix the majority of cases. If you want to test this out, please try out the next dev release (available later today). I haven't supplied a patch as there are a number of other changes already made to the code and the patch may not apply cleanly.
Cheers,
Stella
Comment #3
silurius commentedThanks! Will try to make some time to test the dev release later today or tomorrow.
Comment #4
Mark Linden commentedstill showing up under the latest Dev
Comment #5
stella commentedSetup your link like:
and it should work.
IE browsers use the image 'alt' text to display the hover tooltip, whereas Firefox uses the "title" attribute of the image. If this attribute isn't set, it will use the anchor's title attribute (which will contain html). So by setting the 'title' attribute on the
imgtag you shouldn't see the html when hovering over the link/image.Cheers,
Stella
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #7
stella commentedReleased in Lightbox2 6.x-1.6 and 5.x-2.6.
Cheers,
Stella
Comment #8
jrefano commentedi am still having this issue:
still shows visible html in the hover tooltip -
<h2>Auto Finance</h2>Auto Finance Caption.however, I need to include that HTML to properly format the text in the videobox that pops up.i dont understand your alt/title tag post. i tried setting the alt tag to something else and i dont see any results.
thanks
Comment #9
stella commentedThe alt/title referred to
imgtags that may appear within the anchor link - i.e. in place of your "Show Video" text. There's no way to avoid it in your example unless you use an image instead of the text.(By the way, you're missing a
[in the rel attribute in your example, but i presume that's just a typo.).Cheers,
Stella
Comment #10
jrefano commentedhi stella, thanks for your quick response.
maybe this should be a feature request, as i feel that there needs to be a way to handle this situation. my example was simplified (and yes, contained a typo), but im working on a view template where it displays one of the text fields as a link to a lightbox.
perhaps adding arguments to the rel attribute similarly to how the width and height are specified might help, for example:
while we're at it, adding a group to that list of arguments probably would be a good idea. (this is not as important to me but seemed along the same lines)
i dont think I'm experienced enough to patch it myself but this seems possible, right?
Comment #11
stella commentedGrouping for videos is not something I plan on adding at the moment.
Regarding your idea of adding the caption text to the rel attribute, well I'm still undecided on this, but you should probably open a new feature request for this rather than continuing the discussion here.
Also, please upgrade to the latest release before opening a feature request: Lightbox2 5.x-2.7.
Cheers,
Stella
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
cota commentedI am running 6.x-1.x-dev (2008-Sep-05) in a standard Drupal Image photo
gallery at http://cotaford6.com/image.
I am using the Automatic image handling but the rel="lightbox" is not being set automatically. These gallery pages are built dynamically and I can not set it manually.
Hope you can help.
-cota
Comment #14
stella commentedcota: please open a new issue for your request. Please also provide information on what is happening that is incorrect. I just tried viewing your site in FF3 on a Mac and it looks fine. So please also provide details on the browsers and platforms it happens in, in your new ticket.
Cheers,
Stella
Comment #15
kmi commentedI think I've got the same problem - didn't change anything in the module (no captions in title - not sure what it is) and in FF and Safari on a Mac everything is fine but IE displays weird HTML when the mouse is over an opened image.
please see here: www.sklony.ru
press a thumbnail and on bigger image there will be something like
I'm using Lightbox2 5.x-2.8
what can be done about that?
thank you in advance!
Comment #16
stella commentedkmi: see #311766: HTML code for next and previous link is showing when hovering over photos
Comment #17
kmi commentedhi stella! thanks for the reply - that was not quite what I needed, but still this link gave me an idea - I solved my problem by hacking line 1748 of lightbox2.module :
/* $caption = $image_title . $node_link; */ $caption = "";