MediaWiki and image gallery columns – mini-tutorial

Posted on March 16, 2009

I’m mainly noting this for posterity, because I couldn’t find a quick answer online and finally figured it out after a day or two.

Last year I setup a MediaWiki site for work to take the place of a site one of the resident’s had setup. The site’s overall look-and-feel has to comply with standards from the School of Medicine, and this year they’ve redesigned everything. I like the school’s new design concept, since the old one was starting to feel dated. Still, it takes work to convert a site from one theme to another.

The previous design took up almost the entire width of the browser window, which means MediaWiki could easily accommodate 6 columns of image thumbnails. The downside is it’s hard coded into the MediaWiki code. It’s a variable, but not one that’s documented. Normally, variables that are meant to be changed in MediaWiki are meant to be included in the LocalSettings.php file or the includes/DefaultSettings.php file. However, in the includes/ImageGallery.php file is $mPerRow = x; near the beginning of the file, where x is the number of columns. It can be set to whatever is appropriate, so I set it to 4 for the new layout.

The moral of the tutorial is that it pays to look in unusual places if you are hunting for some hidden variable.

Related posts:

  1. A Confederacy of …
  2. Senile computing
  3. New design
  4. Updated Gallery
  5. PHP 5 and WP 2.2.2

Filed Under: Code, LAMP, MediaWiki, Net, Open Source, Work | Comments Off
Tagged with: , , , ,

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)

Website

Comments

Spam protection by WP Captcha-Free

Comments are closed.

© Copyright gottahavacuppamocha • Powered by WordpressCoffee Candy is based on the Eye Candy theme.