View Full Version : Beginner/Amateur Needs Help with Mediawiki LocalSettings.php

11-26-2009, 01:00 PM
When you add extensions to a MediaWiki site you usually have to edit the LocalSettings.php file.

Problem is most extensions assume you know what you're doing and the install notes aren't much comfort to the anxious beginner...

Here are the install notes that come with a really cool extension (Slimbox) to Mediawiki:

1. Specify where you've put Slimbox's css/ and js/ directories with:
$slimboxThumbsFilesDir = '/path/to/SlimboxThumbs';
(the extension will expect to find the css/ and js/ directories inside there).

2. Supply a default width for your images with:
$slimboxDefaultWidth = 680;

3. After that, add the usual line to bring in the extension:
include_once "$IP/extensions/slimbox2/SlimboxThumbs.php";

So I've added the following to my LocalSettings.php:

$slimboxThumbsFilesDir = "$IP/extensions/slimbox2";
$slimboxDefaultWidth = 680;
include_once "$IP/extensions/slimbox2/SlimboxThumbs.php";

The first two lines apparently are invalid, but so far I can't figure out why or find a working example I can copy...

Any help would be much appreciated!

11-26-2009, 05:42 PM
Well, I've never used mediawiki or slimbox, but some possibilities might be:

1) do you need a trailing slash on your urls
...( $IP/extensions/slimbox2/ instead of $IP/extensions/slimbox2 )?
2) are you sure the url is correct
...( directories $IP/extensions/slimbox2/css/ and $IP/extensions/slimbox2/js/ exist)?

3) do you need units on your image dimensions
...( 650px instead of 650 (usually not - but why not check)?

How do you know the first two variables are wrong? what error messages are you getting?