Hacking wiki

出自耶穌台灣

Source


To be able to hack the MDC wiki software, you'll need a local webserver install, which can run MediaWiki.

Checking out

First, check out the developer.mozilla.org project from SVN. For anonymous access use:

svn co http://svn.mozilla.org/projects/developer.mozilla.org/trunk/

To see the skins properly, you'll need to also check out mozilla-org/css to get the CSS files needed:

export CVSROOT=:pserver:anonymous@cvs-mirror.mozilla.org:/www
cvs login
cvs co mozilla-org/css

(when prompted to enter a password, type anonymous)

Setting up

Copy the contents of the trunk folder and the css folder (Note: the folder itself) into the www directory on your server. The contents of the trunk directory you just checked out is a slightly modified MediaWiki install, so you can follow the MediaWiki install instructions. The css folder contains files that are supposed to be in the /css directory of the site.)

To get a working install, you need to configure MediaWiki. It's done by navigating to /config/index.php in your web browser. Polvi claims that you'll have it, but in case you don't, you can copy one from the MediaWiki tarball.

Once you're done with the configuration script, copy the config/LocalSettings.php file it created to the parent directory and navigate to the location you installed MediaWiki to. A main page should appear. You can log in and switch the skin to Devmo if you like.

MDC customizations

The MDC wiki uses a few MediaWiki extensions. You can enable them by adding

include("extensions/ExampleExt.php");

to the end of your LocalSettings.php. For example:

[snip]

include("extensions/Breadcrumbs.php");
include("extensions/TitleOverride.php");
include("extensions/Abbr.php");
include("extensions/Object.php");
include("extensions/Kbd.php");
?>

TBD installing/configuring RSS and Doxygen extensions - anything special needs to be done?

The title-override / breadcrumbs extensions need an additional table created. To configure it, run update-devmo.php from the command line. The following worked for me (from the www directory):

/path/to/php -f ./maintenance/update-devmo.php

Done

You should have a working install of the MDC wiki now. If you have problems with setting up the MDC wiki (and not the web server or PHP or MediaWiki), feel free to ask in #devmo.

Random tips

You can set the file to log by putting something like this in your LocalSettings.php:

$wgDebugLogFile = 'c:\\123'; 

You can then use wfDebug() function to write to the log.