Support for standalone images not working ??
]]>I have 4 undefined index notices by your plugin. You can test it if yo activate Debug Modus of WordPress.
]]>Hi Stefan,
nice working plugin, especial because it works with my favorite Thema.
But there where a interesting behavior, some captions show up only at a second click. ˉ\_(ツ)_/ˉ
Do you have a hint because why?
Regards
Birger
Hi,
I’m using the Lightbox plugin to generate a lightbox for a built-in WordPress gallery of site screenshots. I am using the image captions as links to the external sites by wrapping each image’s caption with an a tag on the Attachment Details page in the Media Gallery. I encountered a couple of issues using links in this way.
The first issue is this: a couple of the website names had an apostrophe in them, which caused the data-title attribute of the a tag wrapping the image to terminate early. I solved that by wrapping the $title variable on line 117 of mpcx-lightbox.php with htmlspecialchars like so: htmlspecialchars( $title, ENT_QUOTES ). I don’t know if that’s the best way to escape html for use in an attribute, but I think it needs doing and it took care of the single quote (apostrophe) closing the attribute.
The second issue is this: the lightbox.js script looks for any a tags with the data-lightbox attribute and the WordPress Lightbox Plugin adds that attribute to any a tag within the gallery. In my case, that includes the a tag in the figcaption element. That leads to broken previous/next functionality as the script tries to load the target of the previous/next caption link rather than the previous/next image. A little bit of jQuery to remove that data attribute from any descendant a tags of a figcaption element fixed that for me. Here’s what I used: $( “figcaption a” ).removeAttr( “data-lightbox” );
I don’t know if this plugin supports html in captions, but seeing as how you can choose to use the description as your caption as well it would seem like it has to. It works for me now and creates a very attractive lightbox.
]]>Hi Tronsha,
Thanks for making this plugin. I am a fan of Lokesh’s LightBox2. I have a question regarding the image caption. I already entered the caption of the image but it wont show in the lightbox. Not sure if this is a bug or intentional. If so, is there a way to change it via the Gallery/admin panel? I know that you would have to include the data-title attribute to do this in the anchor tag.
Thanks again for this great plugin.
]]>