== Installation ==

This extension is intented to allow to customize the wiki settings whitout
needing to edit the LocalSettings.php file. To enable it, simple include the
Configure.php file in... LocalSettings.php and call the efConfigureSetup()
function. This is required because you may want to customize some settings 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.
This security issue is caused by the register_globals feature of PHP which
allows to set global variables from parameters passed to the script via the URL
(see http://www.php.net/register_globals).
The default code you can add to your LocalSettings.php is the following:

require_once( "$IP/extensions/Configure/Configure.php" );
efConfigureSetup();

By default, only some settings are editable, if you want to be able to edit
all of them (like in version < 0.10.10), add the following line in
LocalSettings.php:

$wgConfigureEditableSettings = array();

=== Optimisation ===

The definition file for Special:Extensions (i.e. configurable extensions)
is in a plain text format and will need to be parsed when accessing e.g.
Special:Extensions or Special:ViewConfig. To speed up this operation, a PHP
extension is provided in the load_txt_def subdirectory. If you want to install
it, please read load_txt_def/INSTALL for instructions. Once installed, Configure
will automatically use it.

== Configuration ==

The extension will require to store the configuration either:
* a directory that have to be writable by the web server. The default path is
  the $IP/serialized directory, that means the "serialized" directory in the
  wiki root path. You can change it in $wgConfigureFilesPath.
* a database in which the sql/configure.sql (or sql/configure.pg.sql if you use
  PostgreSQL) patch is applied, by default the database is "config", you can
  change its name in $wgConfigureDatabase. To use this, you'll need to define
  all your database and memcached settings before calling efConfigureSetup() or
  it simply won't work. Those settings will not be editable in
  Special:Configure.
You can select file storage or database storage by changing $wgConfigureHandler
to "files" (default) to use files or "db" to use the database.
Don't forget to override all that variables between the time you include the
Configure.php file and the time you call efConfigureSetup(), otherwise your
changes won't have any effect.

Note for file storage: on a web server other than apache, the serialized
directory is publicly viewable, and users will be able to see the whole
configuration, so PLEASE MAKE IT UNREADABLE BY WEB USERS OR CHANGE IT TO A
DIRECTORY THAT ISN'T ACCESSIBLE VIA THE WEB.
YOU HAVE BEEN WARNED.

== 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-interwiki' right will also be able to change any configuration.

== Troubleshooting ==

If an admin changed the settings in a way that the wiki can't work anymore,
you can do either:
* use the manage.php command line script to revert the configuration to an
  older version
* directly update the configuration to fall back to the default configuration
  that is in LocalSettings.php:
** if you have file-based storage: drop the conf-now.ser file you'll find in
   $wgConfigureFilesPath directory.
** if you have database-based storage: set cv_is_latest field to 0 in the
   config_version table for the versions you don't want to be "active".
   Note: since data are cached, to might take a while before it produces any
   effect.

== To do ==

* Some settings are still uneditable because of their array usage, this will
  need to develop some specific method to change them.

More information available at http://www.mediawiki.org/wiki/Extension:Configure.