Extension talk:SlimboxThumbs

Small Problem
Hi, I really like your extension and the fact that thumbnails size adapt to the size of the window. But I think it could cause lots of problem. Each time you open your browser with a different size of window you obtain thumbnails of different size. By looking in the images/thumbs folder. I can see that if 100 people use 100 different window sizes, you will get at the end 100 different thumb files ! It could be a good idea to have the option to limit the number of possible thumb sizes. What do you think of that ?

Thank you


 * VitaliyFilippov (talk) 22:29, 28 September 2012 (UTC) Hm :-) I think you're right, yet instead of 100 there would probably be a relatively small amount of "typical" widths, as related to users' display resolutions... The fix for this is easy, I've just committed it - auto-fitted thumnail widths will be limited to multiples of 80 (I think it's a reasonable number...)

Hey ! Thanks for the update ! I have changed the 80 to 160 to have less thumbs Thank you !

Non existing images crashes page
Hi, this extension is really cool and i like it. But i have a little trouble. Im using MW 1.18.4. When i put a link to non existing image, Slimbox crashes this page and the page is not accesible. I must shut off this extension, then i can go to this page. MW works with non existing files. Where's the trouble? Thank you much. --31.186.189.226 13:32, 27 July 2012 (UTC)
 * I suggest changing line 58 to read:

--89.160.21.47 08:52, 16 August 2012 (UTC)

It works perfect, thank you! --31.186.189.226 07:30, 5 September 2012 (UTC)


 * -- Fixed in new version (2012-09-17). VitaliyFilippov (talk) 10:19, 27 September 2012 (UTC)

[OLD] Howto use Gallery?
I have just installed it with Mediawiki version 1.18.1 - it works fine. It is possible to use the gallery feature? Gallery works fine (using the gallery tag) - but when i click a picture i get no "left" or "right" arrows and no counter how many pictures there are.

I can see in the SlimboxThumbs.php a efRewriteGalleryImage Function - but it did not work or i am using the wrong tags. Thx for help --BLinz 23:49, 26 January 2012 (UTC) Edit: --> Found the Reason: in the SlimboxThumbs.php at the last lines:

The $allDone will not use - the efRewriteGalleryImage function did not work right. So no gallerys are possible. I changed the code at line 118 from: to so the gallery feature will always used. Now all pictures at one Site will used in only one Gallery, even if i don't use the gallery tag - but i like it so. --BLinz 20:51, 29 January 2012 (UTC)

[OLD] Announcement
Sorry for not replying to any of your complaints. I'll pick back up the development of this extension soon and will look after the issues. --Clausekwis 02:53, 25 September 2010 (UTC)

[OLD] Full Size Image with 1.18.1
Hi, I just upgraded to mediawiki 1.18.1. I download SVN version 109611 of SlimboxThumbs. When I clicked a picture in a Gallery, The picture popup by taking all the space in the window and it is impossible to resize it. The next fonction seems to work, but the image is not scale to the size of the window.

Thank you

I have the same problem --ZelChief 17:50, 21 January 2012 (UTC)

[OLD]
Hi, thanks for the extension!

The gallery code worked without any problems, except I changed your hardlink from /w/thumb.php to '.$wgScriptPath.'/thumb.php

The single image code did not work, it seems to be some sort of problem with the way the regex interprets greediness on different servers. I played with it a bit and ended up using the following pattern and rewriting the callback a little:

and

I had one further problem, that the Edit page was not shown, but I can't reproduce it now; it had something to do with the callback - no content was returned. As a security measure I built the following couple of lines in: and

--Cm 11:24, 29 October 2009 (UTC)

[OLD] No slimbox effekt
After clicking on image, it just openin in new page in full-size by link lokking like that: http://www.turystyka-powiat-nowosolski.info.pl/thumb.php?f=Siedlisko_%28zamek%29-02.jpg&width=299

Site

How can i fix it?--Skarabeusz 11:17, 31 January 2010 (UTC)


 * It seems the javascript isn't loaded. There might be a problem with the jQuery library having a conflict with some other library your mediawiki installation is using. Can you please post the link to the page where your gallery is? --Clausekwis 13:13, 3 March 2010 (UTC)
 * See here []--Skarabeusz 15:01, 9 March 2010 (UTC)

I HAVE THE SAME PROBLEM. I tried LightboxThumbs, SlimboxThumbs, but nothing happens. Installed: ajax.js,ajaxwatch.js, mwsuggest.js,google analytics js, AND jquery.js,slimbox.js My site is in Russian, maybe its important? But i think its because of JS Conflict. PLEASE HELP. http://abcplanet.co.cc/
 * Hey, on my wiki I have the same problem, no slimbox effects, I can't figure out how it works - sometimes I get forwarded to the file's description page, sometimes it just shows the image... - the example page though works fine. --Fxk2

No slimbox effect
I have a page that has the same problem. It has 9 images on the page of which 5 work with slimboxthumbs. Slimboxthumbs will scroll through the 5 images that work fine, the others don't call the JS, they function just as links to the inbuilt mediawiki image with metadata page. Update: Paths on non-working images seem slightly different: /images/thumb/8/8f/600px-filename.jpg works, /images/8/8f/filename.jpg doesn't?

Update 2: Found a workaround. By commenting out line 42 and 48 of slimboxthumbs.js (removing the if statement) it now adds the zoom function to all 9 images on my page. Ralph


 * VitaliyFilippov (talk) 20:23, 23 October 2012 (UTC) It was thought to be a feature :))) SlimboxThumbs only shows lightboxes for image thumbnails, not for all images on the page. I.e. just Image.jpg]] won't show up in the lightbox, and [[File:Image.jpg will. Also, commenting out the if statement isn't correct as it will probably break on external images.

Ah ok, I didn't realise it was designed to only trigger on thumbnails. Thanks for your replies and a very useful plugin :-) Ralph

[OLD] See source code of the plugin instead of my own wiki
When I include this plugin (or lightbox for that matter) my wiki suddenly turns into a Extension:SlimboxThumbs/SlimboxThumbs.php page, in which I see the sourcecode of the extension, which is clearly not the idea. It is really the only thing I can see, also my own menu items aren't there anymore: it is all basic mediawiki. This is probably me doing something wrong with this plugin (though all other plugins I installed work fine), but has anyone any idea why this is?

Thanks a lot in advance, --FrankLeone 21:26, 16 March 2010 (UTC)

[OLD] Problem with 1.16.1, Gallery and SlimboxThumbs
After an upgrade from 1.15.4 to 1.16.1 mediawki I have problems with galleries. If on my page I have 18 or less pictures, SlimboxThumb does not work. If I have more than 18 pictures, I can not see the pictures table on the page. Everything else is visible. I also try to use HighslideThumbs but exactly same effect. So I think there is an incompatibility with 1.16 and 1.16.1 and one component of HighslideThumbs and SlimboxThumb.

Thank you, 13:47, 06 January 2011


 * You are correct in your assessment. I'll try to get the extension working with 1.16 but I'd be happy for any kind of help of course. --Clausekwis 18:45, 12 February 2011 (UTC)

Problem with 1.16 and SlimboxThumbs
I was getting an error in my console .parseJSON is not a function, it appears the version of jquery.min.js that gets pulled in by the script with a low mediawiki version is 1.3.2, this is too old to include that function so I fixed it by including the latest jquery.min.js (1.8.2 at time of writing). Seems to work now. Ralph


 * VitaliyFilippov (talk) 20:10, 18 October 2012 (UTC) Thanks for the report, I've just fixed that incompatibility in the repository. Now it uses $.ajax instead of the deprecated sajax_do_call and doesn't use $.parseJSON at all.

Issue with firefox
First i wanted to say, fantastic extension. small light and does what it's supposed to.

however i do have one issue. it seems that random images will not work in firefox or chrome however IE the images work fine, i can't seem to find any pattern in it. There doesn't seem to be any pattern to it, the image resolution does not seem to affect it, size of the image doesn't, nor does the file name. it seems to have something to do with image mapping according to google searches. however nothing i do seems to resolve it. I am running mediawiki 1.20.0 and the latest version of slimboxthmbs from the git master snapshot. Any help with this would be greatly appreciated.


 * VitaliyFilippov (talk) 04:12, 28 December 2012 (UTC) Maybe you can post the URL of your wiki with an example of failure here, and I'll check it?
 * Unfortunately i forgot to mention that my wiki is hosted on an internal company network so i wouldn't be able send you a link, but screenshots might be an option. In addition i have tried running firebug to see what the issue might be, firebug lists no errors for anything when opening these pages.
 * VitaliyFilippov (talk) 05:20, 29 December 2012 (UTC) Maybe it just doesn't show images that are included in the article full-size, not as the thumbnails? I.e. SlimboxThumbs doesn't make lightboxes for just Image.jpg]] (not [[File:Image.jpg ). If this is your case, I think I'll change that behavior, because it would be the second report of this issue :-) Or this isn't your case?
 * No It doesn't seem to matter if the image is set to a thumb or not, it seems to just not load the image at all either way. Interestingly enough when i set an image that was doing this to "thumb" it then showed up as a gallery in lightbox even though there was only one image on the page. of course the image was not loaded in any of these. it almost feels like it might be more of an issue with imagemajick not rendering correctly.
 * VitaliyFilippov (talk) 10:24, 10 January 2013 (UTC) Actually, there is another condition of displaying a lightbox :-) the thumbnail should be linked to the image page. The idea is to show the image which would be shown anyway on the click, and do not show anything if the user didn't want to show something on the click. If the thumbnail is linked to some random URL, there will be no lightbox. Is this your case?
 * Okay if i'm understanding you correctly the thumbnail should link to an actual image page, which they all do in this case. one thing i've noticed and i don't know if this is a legitimate factor or not is that it seems to be affected by the resolution of the computer accessing it. but i can't seem to figure out what the correlation is between the two. Thank you again for the help.
 * VitaliyFilippov (talk) 19:47, 15 January 2013 (UTC) ...uhhh, so that's something strange. OK, I think you have to try debugging the extension with Firebug or chrome debugger. You need to look at the script 'slimboxthumbs.js' and try to find out A) if the offending images get in 'names' during the first loop and B) if they are returned in response to the efSBTGetImageSizes ajax call.

Not working on 1.15.1 installation
I've installed this, and initially the example page in the slimbox directory didn't work; replacing slimbox2.js with the one from the slimbox site fixed that. However, it's still not working on actual wiki pages. The scripts are entered into the head as they should be, and the debugger in Firefox suggests the image names are being pulled into the $names array, but none of the images seems to get a lightbox. The image links also don't get a rel="lightbox" link -- should they, in this context? I understand the script isn't supposed to make boxes for images at their normal size or which aren't linked to something, but in this case linked thumbnails in and outside of galleries aren't getting it either. Poking through the scripts, nothing seems obviously wrong, and it sounds like it works great for other people, so any suggestions? (Aside from 'upgrade the wiki version' -- that's unfortunately out of my hands.)

C.C. Principalis (talk) 00:32, 21 February 2013 (UTC)


 * VitaliyFilippov (talk) 08:36, 21 February 2013 (UTC) Example page doesn't need to be working for the extension itself to work. Slimbox2 consists of slimbox2 itself and autoload.js. The usually expected behavior with lightboxes popping up for images with rel="lightbox" is achieved by including autoload.js, but SlimboxThumbs doesn't use it. And the example page assumes autoload is included in slimbox2.js.
 * I think your issue is related to $wgArticlePath in some way - what it is equal to on your wiki?


 * C.C. Principalis (talk) 13:14, 21 February 2013 (UTC): Oh, good to know! I didn't realise it didn't use the 'rel="lightbox"' at all -- that explains why I couldn't figure out where the scripts were setting it! It looks like $wgArticlePath = "/index.php/$1"; does that need to be changed somehow/somewhere?  pathRegexp comes out as "/index\.php/[^:]+:(.*)", and it does grab the names; rsargs[0] seems to come out as image1.jpg:image2.gif:image3.jpeg:imageN.jpg, etc, and get passed to efSBTGetImageSizes like it should, but I think perhaps nothing is coming back?  I can't quite tell for certain.  Thanks for the help.


 * VitaliyFilippov (talk) 20:38, 22 February 2013 (UTC) No, it's totally ok, I have the same article path on some of my wikis. Sooo, maybe nothing is coming back? What XHR response do you see on the Net panel of Firebug?


 * C.C. Principalis (talk) 21:25, 22 February 2013 (UTC) Status is 200 OK, but size is 0B -- I suspect it shouldn't be.


 * VitaliyFilippov (talk) 22:56, 22 February 2013 (UTC) Yeah, that shouldn't be :-)) do you have display_errors turned off in php? If yes, maybe there are any errors in the error log? Also do you have $wgUseAjax = true in LocalSettings.php?


 * C.C. Principalis (talk) 23:50, 22 February 2013 (UTC) The server did have it off (and apparently they haven't set it up to make an error_log, either) so I turned it on and reloaded a couple pages. No php errors got reported, though.  $wgUseAjax appears to be true by default in 1.15.1, but I added it to LocalSettings.php anyway, just in case.  Sadly, didn't fix things.  I think ajax itself is more or less okay, though, because ajaxwatch.js seems to be behaving properly.  I realise this isn't particularly helpful in narrowing things down -- sorry about that!  In case it will help, here's the entire response headers I'm getting:
 * Connection:close
 * Content-Length:0
 * Content-Type:text/html; charset=UTF-8
 * Date:Fri, 22 Feb 2013 23:40:05 GMT
 * Server:Apache/2.2.3 (CentOS)
 * Set-Cookie:bb2_screener_=1361576405+[IP]; path=//
 * X-Powered-By:PHP/5.1.6
 * Everything in the other sections of the XHR seems to match with your demo site, except that in the request headers mine has "Cache-Control:max-age=0" and "Content-Type:application/x-www-form-urlencoded; charset=UTF-8" (yours doesn't seem to have the '; charset=UTF-8' portion in Content-Type).


 * VitaliyFilippov (talk) 21:55, 24 February 2013 (UTC) Oh! You're still running PHP 5.1 - it has no support for json_encode method used in SlimboxThumbs. I could use Services_JSON as the fallback, but I think it's not worth it - PHP 5.1 is almost 7 years old, and I recommend you to just upgrade to PHP 5.3 (unlike 5.4, it should be OK for MW 1.15). So your answer was finally helpful, yet it seems the "undefined function" error is still not displayed on your server :-)
 * Also I've added the minimum requirement of PHP 5.2 to the extension page.


 * C.C. Principalis (talk) 02:19, 25 February 2013 (UTC) Upgrading to 5.3.2 didn't make it work... but I did finally manage to get permission to upgrade the wiki (ugh, bigger undertaking than I'd thought) and now that 1.20.2's running, this extension's working just fine. Thank you for all your help -- I really appreciate you taking all that time and effort!


 * VitaliyFilippov (talk) 07:44, 25 February 2013 (UTC) Hm, you're right. I was using FileRepo::isLocal method which is available only on 1.17+. But there's no need to use it - just $file->isLocal is shorter and is supported beginning with 1.11. So just committed the change and now the extension should be compatible back again.

Exclude images
Hi! How to exclude some images in page from this extension? e.g. images in templates
 * VitaliyFilippov (talk) 09:03, 17 May 2013 (UTC) I think I've already answered you in VK :) but I'll duplicate the answer here: SlimboxThumbs doesn't show lightboxes for pictures that are already full-size, and doesn't show lightboxes for pictures not linked to the image page.
 * UksusoFF (talk) 07:39, 8 June 2013 (UTC) Yep, thx!

Captions do not show up in viewer
According to the extension description if the file thumbnail has a caption it should show up in the viewer but it does not for me. Is this a bug or have I misread this description? Running MW 1.20.5.

Edit: After checking out a few other sites that are on 1.20.* that use this extension captions do not seem to work for any of them. 31.185.193.103 02:19, 8 June 2013 (UTC)


 * VitaliyFilippov (talk) 11:49, 17 June 2013 (UTC) Yes, by now there is only the file's caption shown, not the one specified as as |thumb|... parameter. Do you think it's important to show it?


 * Thank for you for your response. On our wiki none of the captions, on thumbnail images or gallery images, show up. Instead we get just the filename. You can see this here for thumbnails and galleries. We would like to show those captions in the viewer. Thanks for your help. 87.83.250.98 12:37, 17 June 2013 (UTC)


 * VitaliyFilippov (talk) 11:43, 20 June 2013 (UTC) OK, I've just implemented it. Please test.


 * Thank you very much, this works great :) 91.125.252.238 22:42, 20 June 2013 (UTC)

No Slimbox effect if $wgScriptPath not empty (work-around)
After about two hours (!) of trouble shooting I discovered that the extension worked only if I set  in my Localsettings.php. Before that there was no Lightbox effect at all.

My wiki resides in the root of the www-directory. (Don't tell me I should not do that because it is too late now...) For the Collection extension to work I have to set  which SlimboxThumbs does not like.

So if you get no reaction out of this extension you may want to check the following (probably obvious for most other people but still I managed to get some of them wrong initially):
 * Is libjs-jquery installed on the server?
 * Is your directory structure 'extensions/SlimboxThumbs/slimbox/' with 'SlimboxThumbs.php' residing in 'extensions/SlimboxThumbs/'?
 * Does setting the value of $wgScriptPath to an alternative (but equivalent) value make a difference?

I am sure the developer knows the true reasons for the encountered behavior but I managed to work around this issue by some dirty hack (hard-coding the paths in the extension):
 * 1) In 'SlimboxThumbs.php' find the line
 * 2) The next line reads
 * 3) Change it to
 * 4) Add the following new lines (which you will have to adapt to your specific settings):

Hopefully this can save some time and energy from fellow mediawikarians! Many thanks to the developer for this excellent extension. I am liking it even better now every time it works :)

Sm8ps (talk) 20:03, 14 August 2013 (UTC)


 * Hi! First of all I think if you need to set $wgScriptPath = "/./"; for Extension:Collection to work - you should patch it, not SlimboxThumbs. :-))) /./ is a far more strange setting. Also I don't understand what do you mean by 'libjs-jquery'? Debian package? How is it related to MediaWiki at all??? And about having wiki pages in the server's root location - I don't think it's something bad, I do it on several wikis with $wgScriptPath = ""; and it's OK (although yeah, it needs some more webserver configuration). VitaliyFilippov (talk) 15:41, 16 August 2013 (UTC)

Not working after update mediawiki to 1.22.0
After updating mediawiki to 1.22.0 slimboxthumbs not working. --89.222.167.6 08:07, 9 December 2013 (UTC)


 * VitaliyFilippov (talk) 15:00, 10 December 2013 (UTC) I've just pushed a fix - it replaces addHandler which was removed in 1.22 with jQuery code. It should work now.


 * Thank you, Vitaliy. Now it works! --89.222.167.6 07:40, 11 December 2013 (UTC)

Would be nice to be able to configure the animation effects
If anyone is interested in doing this (I wanted my thumbnails to load quicker) you can edit the below line in slimboxthumbs.js

Options are given in https://code.google.com/p/slimbox/wiki/jQueryManual

Problem with the image/lightbox
Hi! I have a problem. When i use a special skin. It can happen that the Lightbox (which shows the big image) opens everytime on the end of the page. Please help! Thanks.

Does not always work
I've found that some images cannot be loaded with this extension. The wheel simply spins forever, possibly because the file size is too large or the resolution too high. Are there are any special requirements we should bear in mind to prevent this? Cavila (MW 1.22, MySQL 5.5.37-0, Php 5.4.4-14 squeeze, SMW 1.9.2, SF 2.7) 12:18, 17 September 2014 (UTC)

Shadow overlay is shown OVER the image
The shadow overlay, which should obscure the page, casts on everything, including the pop-up image.

How do I put it under the image? I tried to change the z-index of #lbOverlay in css, but it didn't help.

Using MediaWiki: 1.24.1, PHP: 5.3.27, SQLite: 3.6.20


 * I ran into the same problem myself (using mediawiki 1.25), the problem is that the jQuery version is bumped which causes slimbox to stop working. Luckily slimbox 2.05 fixes this (extension bundles 2.04) so just download the latest slimbox and replace the bundled copy. --Ext (talk) 17:41, 17 August 2015 (UTC)


 * Thank you for the solution. Now it's works for me too. --89.222.167.6 09:15, 26 October 2015 (UTC)

Not working anymore on MW1.23
Upon selecting an image, I see the spinning circle but nothing else happens. Anybody with more luck?

MediaWiki: 1.23.9, PHP: 5.5.9-1ubuntu4.11 --Sm8ps (talk) 19:23, 31 July 2015 (UTC)

Does not work with German mediawiki Version 1.25
Does not work with German mediawiki Version 1.25 --&#91;&#91;User:Bmrberlin&#124; Bernd M.&#93;&#93; (talk) 12:47, 13 November 2015 (UTC)