Jump to: navigation, search


This wiki runs on MediaWiki software with extensions. Special:Version is the best place to discover which extensions are installed and enabled. We also make the site's LocalSettings.php file available for viewing.

Submitting extensions and customisations

If you wish to work on improvements to the Wiki software, then please submit them through this page's discussion page.

To have a complete copy of the site for testing you need a backup of the database. Database backups can be provided to responsible people on request to the server administrator.

Configuration notes

Most noteworthy

  • Editing permissions: pages are not editable by anonymous users - account creation and log in is required. Sysops can restrict editing for an individual page to sysops-only - this is through a standard MediaWiki function: the 'protect' action appearing on the actions tab to those with a sysop account. Those in the sysop group can unblock anonymous edits on a per-page basis at MediaWiki:Unlockedpages.
  • File upload permissions: as for pages, files (images) may only be uploaded by logged-in users.
  • Syntax highlighting: source code in several languages, most importantly C, can be highlighted with automatic insertion of reference links to keyword/function descriptions: for C code these links point to clc-wiki articles, many of which are as-yet uncreated. This is via the custom GeSHiWrapper extension.
  • Treeview skin: this is installed as the default skin; it is a custom extension.
  • Caching: APC is used to cache messages, parsed page content and other data such as logged-in user details. File caching is used to cache full page html for anonymous views.


  • Renaming of users is available to those in the 'bureaucrat' group.
  • Passwords can be reset by those in the 'sysop' group.
  • Control over table of contents (TOC) numbering: to suppress TOC numbers, add <div class="noautonum">__TOC__</div> to the top of a page - this is supported by the CSS in MediaWiki:Common.css.


This extension hides accounts marked as spambots or testing from the main user listing at Special:Listusers (they can still be listed by choosing either group from the dropdown; the names of the hidden groups are specified via the $wgHiddenGroups setting).

This allows us to hide the (growing) collection of spambots by adding them to the 'spambot' group (through Special:Userrights, accessible to users in the 'bureaucrat' group) without having to delete them: account deletion is discouraged by MediaWiki developers, who suggest that it is fraught.

The extension is named ExcludeHiddenGroups.php and its code is as follows:


$wgExtensionCredits['parserhook'][] = array(
	'name' => 'ExcludeHiddenGroups',
	'url' => 'http://clc-wiki.net/wiki/clc-wiki:Config:Wiki#ExcludeHiddenGroups',
	'version' => '1.3',
	'author' => 'Laird Shaw',
        'description' => 'Hides users that are in one of the $wgHiddenGroups from display in the user listing.',
$wgHooks['SpecialListusersQueryInfo'][] = 'SpecialListusersQueryInfo_ExcludeHiddenGroups';

function SpecialListusersQueryInfo_ExcludeHiddenGroups($pager, &$query) {
	global $wgHiddenGroups;

	if (!$wgHiddenGroups || isset($query['conds']['ug_group'])) return false;

	$dbr = wfGetDB( DB_SLAVE );
	$user_groups = $dbr->tableName('user_groups');

	$query['conds'][] = "(SELECT count(*) FROM $user_groups WHERE user_id=ug_user AND ug_group in ('".implode("', '", $wgHiddenGroups)."')) <= 0";

	return true; // early return possible


Additional configuration files

Two call-out configuration files based in /var/clc-wiki/clcwikiconf/ are included from LocalSettings.php to allow mirror sites to easily override settings to match their configuration, and to keep passwords and usernames private when LocalSettings.php is displayed.

A template for PrivateSetting.php

This file should be customised and placed in /var/clc-wiki/PrivateSetting.php:


$wgDBname           = "clcwiki";
$wgDBuser           = "<username>";
$wgDBpassword       = "<pw>";


A template for LocalOverrides.php

This file should be created as /var/clc-wiki/LocalOverrides.php and customised; it can be empty if your settings match those of the live install:


# If other mediawiki installations are present, /mediawiki may already
# be used.
$wgScriptPath       = "/<webserver_root_for_mediawiki>";
# Reset this variable since it depends on $wgScriptPath
$wgScript           = "$wgScriptPath/index.php";
# Don't use '/wiki' as Flash's server is set up with an apache rewrite rule to do;
# instead use MediaWiki's default path
$wgArticlePath      = "$wgScript/$1";

# Set $wgCaptchaQuestions here


Logo and icon

The original site logo is visible when using a skin other than Treeview. It was put together as an interim solution but stayed for a while; it's not versioned and hasn't changed.

The site icon documented in the Treeview skin's readme.

Personal tools