NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item11383 for general documentation changes for release 1.1.5. Use Item9693 for docu changes for release 2.0.

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

 

ItemTemplate edit

Summary Plugin is adding a empty first image when using lightbox as frontend
ReportedBy JuanPabloGaviria
Codebase 1.0.9, 1.0.8
SVN Range
AppliesTo Extension
Component ImageGalleryPlugin
Priority Normal
CurrentState New
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn
Topic revision: r1 - 22 Jun 2010 - 06:49:02 - JuanPabloGaviria
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads