Extension talk:SmoothGallery/LQT Archive 1

Examples
Any examples of this in use, please? 128.250.80.15 01:42, 10 January 2007 (UTC)


 * Sorry, I don't have a publicly accessible website available (yet). The best I can say right now is to visit the SmoothGallery site and look at examples of SmoothGallery in action. --Ryan lane 21:30, 11 January 2007 (UTC)


 * I have one now, it is at my sandbox (currently view only). --Ryan lane 06:56, 3 March 2007 (UTC)

PHP Bug
Hey I keep getting the: Call to a member function getThumbnail on a non-object From this line (and probably more along the way): $full_thumb_obj = $img_obj->getThumbnail( $width, $height ); I been googling a lot and it seems to be a new 'feature' in the newer versions of php5.+ Concerning passing non-objects to functionszzzz. blablabla. Im using PHP Version 5.0.5-2 Zend Engine v2.0.5 Apache20 Has anyone found a solution for this?? Thx a lot! Rune.


 * I've tried it using PHP 4.3, and MediaWiki 1.6; and PHP 5.1, and MediaWiki 1.8. $img_obj is being created through an object factory function, and $img_obj->getThumbnail($width,$height) is being passed two strings. It is possible that Image::newFromName is returning a null value... How are you using the extension? Image:Image.png or Image.png ; Notice you need the latter of the two. --Ryan lane 19:28, 16 January 2007 (UTC)


 * Looks like this is exactly the issue. I wasn't checking to make sure the image object wasn't null when it was returned, which of course is a bug because Image::newFromName can return null values... Try the new version. --Ryan lane 19:59, 16 January 2007 (UTC)
 * YES! Tried the new version and it returned an error about not being able to find the files. great! So I found out that its because im uploading the images via sshfs and using the $wgUseSharedUploads = true; setting in LocalSettings.php. When I upload files via the upload feature in the wiki it works great. Only thing is that I had to change line 97 to $name = "myGallery" . mt_rand;. Because gmp_strval( gmp_random(1) gave me an error. Will try to make it support the $wgUseSharedUploads = true; and let you know if I succeed. Thankyou so much for your help!!!!! Rune.

Remark to "Installation"
A phantastic extension, A++++. One little remark. I installed the extension on the 1.9.1 version, running on an Fedora Core 6 Linux in a separate directory outside the document root with a symlink. In LocalSettings.php, I had to change the specific configuration as follows to make the extension work. Change the filename of SmoothGallery to whatever your name is.

require_once("extensions/SmoothGallery.php"); $wgSmoothGalleryExtensionPath = "$wgScriptPath/extensions/SmoothGallery"; $wgSmoothGalleryDelimiter = "\n"

The extension worked immediately - only trap is that you have to use the upload function within the Wiki to get the images displayed.

dutchfrog 2007-02-01

I'm a newbie, but to get this to work on 1.9.3, I had to add a semicolon to the end of the third line, otherwise I kept getting "Parse error: syntax error, unexpected T_VARIABLE" Now that I have this extension working, I'M SO HAPPY! This is such a kick-a** extension.

$wgSmoothGalleryDelimiter = "\n";

Looks very broken with JS disabled
Hm, nice - but if you view the page with JavaScript disabled, it looks completely broken. It would be nice if it would degrade gracefully. This could be achived by simply setting all images to display:none per default, for example. It would be ideal to provide a completely separate view, like mediawikis build-in galleries, which is hidden if JS is enabled - this should be simple, ImageGallery.php can be used to create it. -- Duesentrieb ⇌ 17:24, 3 March 2007 (UTC)


 * Agreed. There are a few things I need to work out before I even mark this as beta. If you can send me some patches, or help fix it in svn I wouldn't mind ;). --Ryan lane 14:17, 13 March 2007 (UTC)