From ESWStanford
LocalSettings.php is the main file to edit to change the configuration of the wiki, from the skins and standard icons to user permissions to adding extensions, it's the one-stop-shop for all your tweaking needs. Check out the Mediawiki configuration settings manual for an idea of all the wonderfull customizations you can make.
Changing LocalSettings.php
Since LocalSettings.php is such an important file, it is also under version control. This can be kind of annoying if you've not used such a system before, but can be a lifesaver if something gets messed up and changes to the file have to be rolled back. The main thing about the system we're using is that you must remember to check in changes you make to the file after you edit the file and test the changes. Otherwise the file remains locked and noone else can edit it.
To edit LocalSettings.php (assumes some knowledge of the Stanford UNIX/Linux environment)
- Log on to a *NIX computer mounting the Stanford AFS file system.
- Change to the ESW mediawiki directory:
/afs/ir.stanford.edu/group/esw/cgi-bin/mediawiki/ - Issue the RCS command
co -l LocalSettings.phpto check out and lock the file. Do not forget to check the file back in after you're done. - Edit the file in your favorite text editor.
- Test the changes by loading pages in your web browser.
- Check in and unlock the file with the RCS command
ci -u LocalSetting.php. It asks you for a brief description of the changes you made to log with the change history. DO NOT FORGET THIS STEP!!!! People are going to be steaming mad when they go to edit the file in six months and you've left it locked and are now trotting about in Timbuktu somewhere.
Changes made to default
These are the changes that have been made to the default, auto-generated LocalSettings.php to make Mediawiki work at Stanford in the way we want.
- Site name
$wgSitename = "ESWStanford";
- URL path to script
$wgScriptPath = "/group/esw/cgi-bin/mediawiki";
- URL path to articles (makes use of rewrite rule defined in
.htaccess)
$wgArticlePath = "/group/esw/wiki/$1";
- URL path to our logo
$wgLogo = "/group/esw/Logo/Chapter_3D.NoText/Logo_135x135.png";
- URL path and file directory for uploaded images
$wgUploadPath = "$wgScriptPath/images"; $wgUploadDirectory = "$IP/images";
- Allow the site to send emails to users, but not users to send to each other
$wgEnableEmail = true; $wgEnableUserEmail = false;
- Contact info
$wgEmergencyContact = "xxxx@stanford.edu"; $wgPasswordSender = "xxxx@stanford.edu";
- MySQL database info, provided by ITSS when we asked to set up the database
$wgDBtype = "mysql"; $wgDBserver = "xxxx.stanford.edu"; $wgDBname = "xxxx"; $wgDBuser = "xxxx"; $wgDBpassword = "xxxx"; $wgDBport = "xxxx"; $wgDBprefix = "";
- Acutally enable uploading of images by users, and provide command to allow image resizing
$wgEnableUploads = true; $wgUseImageResize = true; $wgUseImageMagick = true; $wgImageMagickConvertCommand = "/usr/pubsw/bin/convert";

