Extension talk:SlimboxThumbs

From MediaWiki.org
Jump to: navigation, search

Contents

[edit] Howto use Gallery?

I have hust 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:

$out->clearHTML();
$out->addHTML( $thumbnailsDone );
//$out->addHTML( $allDone );
return true;

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:

 . 'href="' . $image->getURL() . '" class="image" rel="lightbox" title="'

to

 . 'href="' . $image->getURL() . '" class="image" rel="lightbox[gallery]" title="'

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)

[edit] 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)


[edit] 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)

[edit] Archive

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:

//regex for thumbnails
$pattern =    '~(<a[^>]+?)'. // $1 start of opening <a> tag through start of href attribute in <a> tag
                                '\s*href="([^"]*)'. // $2 link
                                '"\s*class="image"\s*title="([^"]+)'. // $3 title
                                '"\s*([^>]*>)'.   //$4 end of <a>
                                '\s*(<img[^>]+?class="thumbimage"[^>]*>)' // $5 img tag
                                .'(.*</*a>)~xsU'; // $6 anything else
        $thumbnailsDone = preg_replace_callback($pattern, 'efRewriteThumbImage', $out->getHTML());

and

function efRewriteThumbImage($matches){
    global $wgOut, $slimboxThumbsDebug;
    if ($slimboxThumbsDebug) { global $wgContLang; }
 
    $tmp = explode(':', $matches[2]);
 
    $titleObj = Title::newFromText(rawurldecode($tmp[1]));
    $image = wfFindFile($titleObj,false,false,true); ## wfFindFile($titleObj,false,false,true) to bypass cache
      
        $output = $matches[1]
                .' href="'.$image->getURL().'" class="image" rel="lightbox" title="'.$matches[3].'" 
                '.$matches[4].$matches[5]   //url, hashpath,/w/thumb.php?f=FoodHacker_01.jpg&amp;width=800
                .($slimboxThumbsDebug?efDebugVar('$matches',$matches)
                        .efDebugVar('$titleObj',$titleObj)
                        .efDebugVar('$image',$image)
                        .efDebugVar('$wgContLang->namespaceNames',$wgContLang->namespaceNames):'')
                .$matches[6];
 
        return $output;
}

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:

         if (trim($thumbnailsDone) == '') {
                $thumbnailsDone = $out->getHTML();
        }

and

if (trim($allDone) == '') {
        $allDone = $out->getHTML();
    }

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

[edit] 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 [[1]]--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. [[2]]

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

[edit] 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)


[edit] 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)
Personal tools
Namespaces
Variants
Actions
Site
Support
Download
Development
Communication
Print/export
Toolbox