Mediawiki Image Gallery Extension – WikiGallery

I was working with MediaWiki Gallery extension named “Smooth Gallery” which is based on JonDesign’s SmoothGallery . It was almost the thing i was looking for but not the exact one for my purpose. As a result I had to hack the code and modify it to fit my needs. You can download the extension and install it for your purpose. I have named it as WikiGallery as lots of things has been changed in this extension. This extension supports external images as well and hence give you more options to create a nice gallery.

A very special thanks to Ryan Lane & Jon

Details of the extension is given below:

Screenshot:

smoothgallery1.jpg

 

smoothgallery2.jpg

 

Requirements: Mediawiki 1.9.0  and above [ I have not tested with earlier versions. ]

Steps:

  1. Download the wikigallery files from here.
  2. unzip it to your extensions directory
  3. download wikigallery extension file from here
  4. unzip it and drop it into your extensions directory
  5. make sure $wgUseImageResize is enabled in your LocalSettings.php file
  6. add the following lines to your LocalSettings.php file and save

include(“extensions/WikiGallery.php”);
$wgWikiGalleryExtensionPath = “/mediawiki/extensions/wikigallery”;
$wgWikiGalleryDelimiter = “\n”;

Now the extension is ready and we can use it to our wiki pages. Edit a wiki page and add the following tag with image names delimited by the wikigallery delimiter as mentioned on LocalSettings.php file (in this case its \n , but it can be , # etc). For local files (uploaded in the wiki), we do not have to put anything. but for external images the http:// must be there.

<wikigallery>

myhome.gif
</wikigallery>

Now save and check your page , you will see the gallery is there.

Note:

  •     I will try to keep the code updated with smooth gallery. But can not promise that.
  •     If you have any download issue, please inform me with your email address. I will send you the scripts in email.
About these ads

9 thoughts on “Mediawiki Image Gallery Extension – WikiGallery

  1. I’ll take a look at your changes and see if I can work them into my plugin. Having the ability to use external images would be nice. I can make an option for admins to enable/disable it.

    Btw, your changes are based upon the current stable version of the SmoothGallery plugin. The current (beta) version has most of the SmoothGallery 2.0 options available.

  2. I’ve worked your changes into my code.

    If you set:

    $wgSmoothGalleryAllowExternal = true;

    in LocalSettings.php, the plugin will allow you to use http:// and https:// external images.

    It is important to realize that it could be potentially dangerous to allow external images though. I’ve set the default for that option to be false for this reason.

  3. Hi Ryan

    Yes I completely agree with you that it is potentially dangerous to allow external images. but you know situation can demand that. i think it is safe to use when edit right is protected to a particular group and hence chance of misuse can be reduced. many many thanks for your suggestion and time to look at my changes. I really appreciate that.

    regards
    Mizan

  4. So this looks really good, and I need something like this:
    but it doesn’t seem to work for me.
    Following your instructions ,what I get is the image, twice,
    vertically. Nothing more.
    Any ideas what might be wrong?

  5. (13)Permission denied: access to /extensions/wikigallery/scripts/mootools.uncompressed.js denied, referer: http://initq.com/index.php/Streams%2C_Redirection%2C_and_Pipes
    [Mon May 26 12:08:54 2008] [error] [client 71.164.213.42] (13)Permission denied: access to /extensions/wikigallery/scripts/jd.gallery.js denied, referer: http://initq.com/index.php/Streams%2C_Redirection%2C_and_Pipes
    [Mon May 26 12:08:54 2008] [error] [client 71.164.213.42] (13)Permission denied: access to /extensions/wikigallery/css/jd.gallery.css denied, referer: http://initq.com/index.php/Streams%2C_Redirection%2C_and_Pipes

    i get two vertical pics also with headers.

  6. Hi, Mizan,
    From your book, I can do two things seperately, say, imgage gallery by pair, or template that enable user-defined metadata. Can I combined them together, i.e. making a image gallery in which each images can has its user-defined metadata based on a template?

    Thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s