Item9183: Plugin is adding a empty first image when using lightbox as frontend
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
When i use %IMAGEGALLERY{frontend="lightbox" size="small" include=".(png|jpg|jpeg|bmp)$" skip="0"}% then click the thumbnail, the overlay appears and showme N+1 images, where the first is an empty image.
Checking the code, i found that when the frontend parameter is set to lightbox and no custom header parameter, the plugin set the header parameter to:
$this->{header} = "<noautolink><div class=\"igp jqSlimbox {itemSelector:'.igpThumbNail', singleMode:true}\" id='igp$this->{id}'>\n<a name='igp$this->{id}'></a>\n";
And the Slimbox
JQueryPlugin take the
"<a name='igp$this->{id}'></a>\n"
as the first image to show in the overlay.
To fix that problem you have access to the foswiki server, go to the
foswiki-root/lib/Foswiki/Plugins/ImageGalleryPlugin/Core.pm line 290:
$this->{header} = "<noautolink><div class=\"igp jqSlimbox {itemSelector:'.igpThumbNail', singleMode:true}\" id='igp$this->{id}'>\n<a name='igp$this->{id}'></a>\n";
and change it for:
> $this->{header} = "<noautolink><div class=\"igp jqSlimbox {itemSelector:'.igpThumbNail', singleMode:true}\" id='igp$this->{id}'>\n";
the diff:
diff Core.pm.org Core.pm
290c290
< $this->{header} = "<noautolink><div class=\"igp jqSlimbox {itemSelector:'.igpThumbNail', singleMode:true}\" id='igp$this->{id}'>\n<a name='igp$this->{id}'></a>\n";
---
> $this->{header} = "<noautolink><div class=\"igp jqSlimbox {itemSelector:'.igpThumbNail', singleMode:true}\" id='igp$this->{id}'>\n";
--
JuanPabloGaviria - 22 Jun 2010
Does not apply anymore.
--
Main.MichaelDaum - 27 Jul 2017 - 11:47