Item9183: Plugin is adding a empty first image when using lightbox as frontend
| Priority: |
CurrentState: |
AppliesTo: |
Component: |
WaitingFor: |
| Normal |
New |
Extension |
ImageGalleryPlugin |
|
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