Extension:Configure

From MediaWiki.org

Jump to: navigation, search
Manual on MediaWiki Extensions
List of MediaWiki Extensions
Configure

Release status: experimental

Implementation Special page
Description Allow authorised users to configure the wiki by a web-based interface
Author(s) IAlex Talk
Version 0.3.0 (12 May 2008)
MediaWiki 1.7.0 or greater
License GPLv2 or higher
Download SVN (browse)
README
CHANGELOG
Parameters $wgConfigureFilesPath
Added rights configure, configure-all

The Configure extension allows bureucrats (by default) to modify configuration settings of the wiki with a special page named Special:Configure.

Contents

[edit] Installation

  • Download files from this directory and put them in extensions/Configure directory of your MediaWiki installation, if you have sub version installed you can run the following command while being in extensions dir of your MediaWiki install:
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/Configure
  • Edit LocalSettings.php and add the following lines:
require_once( "$IP/extensions/Configure/Configure.php" );
efConfigureSetup();

Note Note: as mentioned, you have to call efConfigureSetup() function in LocalSettings.php because you may want to customize some settings of the extension and to prevent an attack, the settings have to be always defined (this is done by including the Configure.php file), even if they won't be changed because they can arbitrary be set if the register_globals feature of PHP is turned on.

[edit] Configuration

The extension will require a directory to store the configuration and this directory have to be writable by the web server. The default path is the $IP/serialized directory. You can change it in $wgConfigureFilesPath. Don't forget to override this variable between the time you include the Configure.php file and the time you call efConfigureSetup(), otherwise your changes won't be used.

Warning Warning: on MediaWiki < 1.13, serialized directory is publicly viewable, and users will be able to see the whole configuration, so please make it unreadable by web interface or change it to a directory that isn't accessible via the web.

Users need to have 'configure' right to access Special:Configure. By default this is only assigned to bureaucrats. You can change this by granting the 'configure' right to any group. This right allow to change only "common" settings. If you want to be able to change all settings, you will need to have the 'configure-all' right. This right allow to change some specific settings, like paths, database settings (all what need also "external" changes, i.e. server rewrite rules, squid configuration, ...) but also $wgGroupPermission.

[edit] Hints

Although this extension allows you to configure all settings, it's recommended to keep the original LocalSettings.php file. You can simply add the extension after the default settings. If you don't want a setting to be modified, simply redeclare it after calling efConfigureSetup(), it will still be customizable in Special:Configure but changes won't have any effect.

This extension uses an extended class of SiteConfiguration, for "normal" installation, it isn't useful, but for some wiki farms, it will allow to multiple with only one copy of the software. To change the configuration you want to load, pass an argument to efConfigureSetup(). A user with 'configure-all' right will also be able to change any configuration.

[edit] Troubleshooting

If an admin changed the settings in a way that the wiki can't work anymore, you can simply drop the conf-now.ser file you'll find in $wgConfigureFilesPath directory. Then it will fall back to the default configuration that is in LocalSettings.php. It's why it's important to keep that file.

[edit] To do

  • Some settings are still uneditable because of their array usage, this will need to develop some specific method to change them.
  • It is already possible to rollback to an earlier version of the configuration by editing and saving, but I think a diff possibility would be nice to see which changes were made between versions.
  • Support extensions
Personal tools