Configuring MediaWiki
From wiki.vincentkong.com
Main article: MediaWiki
Contents |
Go to page MediaWiki:Sidebar in search box
Example:
* LINKS ** http://www.vincentkong.com|Blog ** http://gallery.vincentkong.com|Gallery ** http://www.dragonv.com|DragonV.com
Enable file upload
Modify Localsettings.php and add
$wgEnableUpdates = true;
Change permission or ownership on images directory.
Add more file types to upload
To upload more file types, edit LocalSettings.php.
$wgFileExtensions[] = 'doc'; $wgFileExtensions[] = 'pdf';
File extensions are also overwritten by $wgFileBlacklist and $wgMimeTypeBlacklist defined in includes/DefaultSettings.php
Disable file extension checking
$wgCheckFileExtensions = false;
Disable mime type checking of uploaded files
$wgVerifyMimeType = false;
Changing logo
Modify Localsettings.php and add
$wgLogo = "image url";
The logo dimension works best with 135 x 135 pixels
Enable short URL
Modify LocalSettings.php
# Virtual path. This directory MUST be different from the one used in $wgScriptPath $wgArticlePath = "/wiki/$1"; # Enable use of pretty URLs $wgUsePathInfo = true;
Modify Apache httpd.conf
Alias /wiki /opt/mediawiki/index.php
Enable debug mode
Add to bottom of LocalSettings.php
$wgDebugComments = true; $wgDebugLogFile = "/path/to/debug.log"; $wgDebugDumpSql = true; $wgDebugRawPage = true; $wgDebugShowDebug = true; $wgShowSQLErrors = true; $wgShowExceptionDetails = true;
Reference: http://www.mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging
Set timezone
Edit LocalSettings.php and add:
$wgLocaltimezone = "America/Toronto"; $wgLocalTZoffset = "-240";
$wgLocalTZoffset is represented in minutes e.g -480 is -4 hours.
Show PHP errors
Add to the bottom of LocalSettings.php
error_reporting(E_ALL);
ini_set("display_errors", 1);