JonDesign's SmoothGallery 2.0 !

JonDesign's SmoothGallery Forums

You are not logged in.

#1 2007-03-14 07:00:55

PeteBest
New member
Registered: 2007-03-14
Posts: 1

Single Image Bug

Hi,

Going to have a quick look at the source code in a bit and see if I can figure this one out, but smoothgallery seems to have a bug if you only have one image in a gallery. The full image appears to be empty, if you click on it you still get the correct image and that seems fine, and if there's more than one image it's also ok. No js errors or any other obvious problems are apparant, tested with the demo.htm file and just removed all but one image

Cheers for any input!

Offline

 

#2 2007-03-31 15:33:46

alanlit
New member
Registered: 2007-03-31
Posts: 1

Re: Single Image Bug

I was able to fix this by moving line 115 (in 1.0.1) of jd.gallery.js (this.galleryElement.addClass(this.options.withArrowsClass);

to _after_ the enclosing brackets.

Alan

Offline

 

#3 2007-06-04 00:28:18

heathd
New member
Registered: 2007-06-04
Posts: 1

Re: Single Image Bug

I also got this bug. In fact the problem is not in the javascript code, which seems to make logical sense to me (only adding the 'withArrows' class if there is more than one image). IMHO the problem is in the CSS code. I include below a patch to fix it.

David

Code:

--- original/css/jd.gallery.css        2007-05-23 18:53:28.000000000 +0200
+++ fixed/css/jd.gallery.css  2007-06-04 09:21:16.000000000 +0200
@@ -211,14 +211,6 @@

 .jdGallery a.open
 {
-       left: 0;
-       top: 0;
-       width: 100%;
-       height: 100%;
-}
-
-.withArrows a.open
-{
        position: absolute;
        top: 0;
        left: 25%;
@@ -232,8 +224,8 @@
        opacity: 0.8;
 }

-.withArrows a.open:hover { background: url('img/open.png') no-repeat center center; }
+.jdGallery a.open:hover { background: url('img/open.png') no-repeat center center; }

-* html .withArrows a.open:hover { background: url('img/open.gif') no-repeat center center;
+* html .jdGallery a.open:hover { background: url('img/open.gif') no-repeat center center;
        filter:alpha(opacity=80); }

Last edited by heathd (2007-06-04 00:29:22)

Offline

 

#4 2007-07-08 13:22:40

KaLeM
New member
Registered: 2007-07-04
Posts: 2

Re: Single Image Bug

heathd i use your patch but now embedLinks doesn't work.  how can i show single image with out lost my embedlinks.

Offline

 

#5 2007-09-17 11:44:17

kappaknight
New member
Registered: 2007-02-03
Posts: 6

Re: Single Image Bug

Does this bug still exist in the new 2.0 version?

Offline

 

#6 2007-10-10 06:44:51

karl19
New member
Registered: 2007-06-19
Posts: 6

Re: Single Image Bug

Yes, the bug seems to exist, but the fix above by alanlit solves it. Little thing to note - there is no closing bracket in front of the code listed above and the line is #114 instead.

Karl

Offline

 

#7 2007-10-24 16:43:41

StevenBullen
New member
Registered: 2007-10-22
Posts: 1

Re: Single Image Bug

Thanks for the fix guys. big_smile

Offline

 

#8 2007-12-20 08:44:48

waynobweno
New member
Registered: 2007-12-20
Posts: 1

Re: Single Image Bug

Hey guys, I implemented the Javascript bug fix and it worked, but now my left and right arrows disappear if I have more that one image. I tried to use the CSS code provided but that just broke everything. Does anyone have a solid work around for this nagging bug. Thanks a lot for anyones help. I am desperate to get this fixed!!!

Offline

 

#9 2007-12-28 08:33:08

bata
New member
Registered: 2007-12-28
Posts: 1

Re: Single Image Bug

Hi, thx for helping me resolve the bug.
Solution is simple in file jd.gallery.js
line 128 this.galleryElement.addClass(this.options.withArrowsClass); you need to copy (not move) to  after  the enclosing brackets.
code will now look like
if ((this.galleryData.length>1)&&(this.options.showArrows))
        {
            var leftArrow = new Element('a').addClass('left').addEvent(
                'click',
                this.prevItem.bind(this)
            ).injectInside(element);
            var rightArrow = new Element('a').addClass('right').addEvent(
                'click',
                this.nextItem.bind(this)
            ).injectInside(element);
            this.galleryElement.addClass(this.options.withArrowsClass);
        }
        this.galleryElement.addClass(this.options.withArrowsClass);
and evrything will work.
Thx again for guidance,
Bata

Offline

 

#10 2008-11-05 02:25:43

derric8016
New member
Registered: 2008-11-05
Posts: 1

Re: Single Image Bug

thx,  it works correctly

Offline

 

#11 2009-02-05 08:59:56

toycollector
New member
Registered: 2009-02-05
Posts: 1

Re: Single Image Bug

Hi Guys.

Anyone here using SmoothGallery as part of the Mediawiki SmoothGallery extension? I tried applying the fix listed above but it didn't appear to work.

Just to make sure we're talking about the same bug: This is the bug where if only one image is in the gallery, the thumbnail appears in the carousel but the gallery image itself does not?

Last edited by toycollector (2009-02-05 10:00:56)

Offline

 

#12 2009-03-24 05:10:54

CarnivalTime
New member
Registered: 2009-03-24
Posts: 1

Re: Single Image Bug

Hi there,

First off, fantastic gallery Jonathan.  My hat is off.  I've applied alanlit's fix for this bug but I am still unable to display single image galleries in FireFox and chrome.  The fix seems to have worked in IE.  Has anyone else had a similar problem?

Regards,

Adam

Offline

 

Board footer