Nieks LocalSettings

From KBwiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
<?php

#
# ERROR Reporting: 
# uncomment this part to report all 
# PHP errors to the web browser.  
#
# error_reporting(E_ALL);
# ini_set("display_errors", 1);
# $wgShowExceptionDetails = true;

# This file was automatically generated by the MediaWiki installer.
# If you make manual changes, please keep track in case you need to
# recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.

# If you customize your file layout, set $IP to the directory that contains
# the other MediaWiki files. It will be used as a base to locate files.
if( defined( 'MW_INSTALL_PATH' ) ) {
	$IP = MW_INSTALL_PATH;
} else {
	$IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
	if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
		die( "This script must be run from the command line\n" );
	}
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename         = "QNET";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
$wgScriptPath       = "";
$wgScriptExtension  = ".php";

## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;

$wgEmergencyContact = "webmaster@cfms.org.uk";
$wgPasswordSender = "webmaster@cfms.org.uk";

## For a detailed description of the following switches see
## http://www.mediawiki.org/wiki/Extension:Email_notification 
## and http://www.mediawiki.org/wiki/Extension:Email_notification
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;

$wgDBtype           = "mysql";
$wgDBserver         = "localhost";
$wgDBname           = "wikidbqnet3";
$wgDBuser           = "wikiuser";
$wgDBpassword       = "changeit";

# MySQL specific settings
$wgDBprefix         = "mw_";

# MySQL table options to use during installation or update
$wgDBTableOptions   = "TYPE=InnoDB";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

# Postgres specific settings
$wgDBport           = "5432";
$wgDBmwschema       = "mediawiki";
$wgDBts2schema      = "public";

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads       = true;
$wgUseImageMagick = true;
# $wgImageMagickConvertCommand = 'c:\program files\imagemagick-6.4.3-q16\convert.exe';
# $wgImageMagickIdentifyCommand = 'c:\program files\imagemagick-6.4.3-q16\identify.exe';
$wgImageMagickConvertCommand = 'C:\Program Files\ImageMagick-6.5.3-Q16\convert.exe';
$wgImageMagickIdentifyCommand = 'C:\Program Files\ImageMagick-6.5.3-Q16\identify.exe';

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX           = true;
$wgTexvc = 'texvc.exe';

#Tex 
$wgLaTexCommand = 'e:\\MiKTeX 2.7\\miktex\\bin\\latex.exe'; 
$wgDvipsCommand = 'e:\\MiKTeX 2.7\\miktex\\bin\\dvips.exe';

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "en";

$wgProxyKey = "3b3e958439df957d46dc6bb66669505a57d203f020998f8911ce10f14977f4bd";

## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
$wgDefaultSkin = 'monobook';

## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# $wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used

$wgDiff3 = "";

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
$wgCacheEpoch = max( $wgCacheEpoch, $configdate );

# logo
# $wgLogo = "skins/common/images/erc120.gif";
$wgLogo = "skins/common/images/brunel_suspension_bridge.jpg";
#
# MODIFICATION BY DG 18.02.09
#
# permissions
# $wgGroupPermissions['*']['edit'] = false;
# $wgGroupPermissions['user']['edit'] = true;
# $wgGroupPermissions['user']['editinterface'] = true;
#
# Now removed
# require_once("$IP/extensions/EditOwn/EditOwn.php");
# $wgGroupPermissions['Gold']['editall'] = true; // Only Gold users can edit all pages
#


# added by DG, 01/09/08: extended the list of permissable files to upload
$wgFileExtensions = array('png', 'gif', 'jpg', 'jpeg', 'doc', 'xls', 'mpp', 'pdf', 'dat');

#
# Namespace definitions
#
# Note that Semantic MediaWiki uses namespaces in the range 100-106
# Also note that any application namespaces must start at an even number
# greater than 200.
#
define('NS_SMW',100);
define('NS_GOLD',200);
define('NS_GOLD_TALK',201);
define('NS_LIBRARY',202);
define('NS_LIBRARY_TALK',203);
define('NS_SILVER',204);
define('NS_SILVER_TALK',205);
define('NS_DEVELOPER',206);
define('NS_DEVELOPER_TALK',207);
define('NS_SILVERPLUS',208);
define('NS_SILVERPLUS_TALK',209);
define('NS_EDITORIAL',210);
define('NS_EDITORIAL_TALK',211);
define('NS_ARCH',212);
define('NS_ARCH_TALK',213);
define('NS_ABSTRACT_TALK',215);

#
# dpl extention
#
include_once("$IP/extensions/intersection/DynamicPageList2.php"); 

#
# Semantic Media Wiki.
#
# THIS IS CURRENTLY DISABLED.
#
# There is an unresolved problem in the SMW extension that prevents the rest of the Wiki from functioning
# properly.  
#
# Make sure that the SMW namespace index is set (see SMW_Settings.php)
# For the time being, this is set at the default start index of 100.  This is typically
# used for the user's own namespaces but I'll reserve this range (100-106) to Semantic MediaWiki. 
# Gold, Silver  and Library namespaces will now start at 200.
#
define('NS_ABSTRACT',214);
$wgExtraNamespaces[NS_ABSTRACT] = "Abstr";

define('NS_FRED',216);
$wgExtraNamespaces[NS_FRED] = "Fred";

$smwgNamespaceIndex=100;
$smwgDefaultStore = 'SMWRAPStore2';
# $smwgIP='E:\\home\\qnet_v3\\extensions\\SemanticMediaWiki\\';
include_once("$IP/extensions/SemanticMediaWiki/includes/SMW_Settings.php");
$smwgNamespacesWithSemanticLinks[NS_ABSTRACT] = false; 
$smwgNamespacesWithSemanticLinks[NS_FRED] = true; 
enableSemantics('localhost');

# SMW: SPARQL Endpoint configuration.  This relies on RAP (RDF API for PHP)
# $smwgRAPPath = 'E:\\home\\qnet_v3\\extensions\\SemanticMediaWiki\\libs\\rdfapi-php\\api\\';

# $smwgDefaultStore = SMW_STORE_RAP;
# $smwgRapDBserver       = 'localhost';
# $smwgRapDBname         = 'smw_rap';
# $smwgRapDBuser         = 'smw_rapuser';
# $smwgRapDBpassword     = 'changeit';

#
# Permissions
#
# ERCOFTAC editors, ERCOFTAC subscribers, ERCOFTAC Public Relations (PR)
#   temporary group for submitting new content 'Submitters'
#
$wgGroupPermissions['*']['read'] = true;
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['*']['editinterface'] = true;

# DG: 14.07.09: new
$wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED;
$wgImplicitGroups = array('emailconfirmed');


$wgGroupPermissions['emailconfirmed']['edit'] = true;

$wgGroupPermissions['user']['read'] = true;
# DG: 14.07.09: remove   $wgGroupPermissions['user']['edit'] = true;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['user']['editinterface'] = true;

$wgGroupPermissions['Users']['read'] = true;
# DG: 14.07.09: remove   $wgGroupPermissions['Users']['edit'] = true;
$wgGroupPermissions['Users']['edit'] = false;
$wgGroupPermissions['Users']['editinterface'] = true;

$wgGroupPermissions['Submitters']['read'] = true;
$wgGroupPermissions['Submitters']['edit'] = true;
$wgGroupPermissions['Submitters']['editinterface'] = true;

$wgGroupPermissions['Subscribers']['read'] = true;
$wgGroupPermissions['Subscribers']['edit'] = true;
$wgGroupPermissions['Subscribers']['editinterface'] = true;

$wgGroupPermissions['Editors']['read'] = true;
$wgGroupPermissions['Editors']['edit'] = true;
$wgGroupPermissions['Editors']['editinterface'] = true;
$wgGroupPermissions['Editors']['move'] = true;

$wgGroupPermissions['Developers']['read'] = true;
$wgGroupPermissions['Developers']['edit'] = true;
$wgGroupPermissions['Developers']['editinterface'] = true;

$wgGroupPermissions['Sysops']['userrights'] = true;
$wgAddGroups['Sysops'] = array('sysop','Submitters','Subscribers','Editors','Developers','Users');
$wgRemoveGroups['Sysops'] = array('sysop','Editors','Submitters','Subscribers','Developers','Users');

$wgGroupPermissions['Bureaucrat']['userrights'] = true;
$wgAddGroups['Bureaucrat'] = array('sysop','Editors','Submitters','Subscribers','Developers','Users');
$wgRemoveGroups['Bureacrat'] = array('sysop','Editors','Submitters','Subscribers','Developers','Users');

# Now execute the commands required for page lockdown
# The policy is to prevent Subscribers from editing Gold content pages but allowing
#   them to comment on them...
require_once( "$IP/extensions/Lockdown/Lockdown.php" );


$wgExtraNamespaces[NS_GOLD] = "Gold";
$wgExtraNamespaces[NS_GOLD_TALK] = "Gold_Talk";
$wgExtraNamespaces[NS_LIBRARY] = "Lib";
$wgExtraNamespaces[NS_LIBRARY_TALK] = "Lib_Talk";
$wgExtraNamespaces[NS_SILVER] = "Silver";
$wgExtraNamespaces[NS_SILVER_TALK] = "Silver_Talk";
$wgExtraNamespaces[NS_DEVELOPER] = "Dev";
$wgExtraNamespaces[NS_DEVELOPER_TALK] = "Dev_Talk";
$wgExtraNamespaces[NS_SILVERPLUS] = "SilverP";
$wgExtraNamespaces[NS_SILVERPLUS_TALK] = "SilverP_Talk";
$wgExtraNamespaces[NS_EDITORIAL] = "Ed";
$wgExtraNamespaces[NS_EDITORIAL_TALK] = "Ed_Talk";
$wgExtraNamespaces[NS_ARCH] = "Arch";
$wgExtraNamespaces[NS_ARCH_TALK] = "Arch_Talk";
$wgExtraNamespaces[NS_ABSTRACT_TALK] = "Abstr_Talk";

	
# TODO: add a namespace for Archived articles and permit only Editors to access it
#       This is the area where obsolete articles are placed and which are not permitted to the public


# niek $wgNamespacePermissionLockdown[NS_ABSTRACT]['edit'] = array('sysop', "Editors");
# niek $wgNamespacePermissionLockdown[NS_ABSTRACT]['move'] = array('sysop', "Editors");
# wgNamespacePermissionLockdown[NS_ABSTRACT]['read'] = array('sysop', "Editors", "user", "Subscribers");
# $wgNamespacePermissionLockdown[NS_ABSTRACT_TALK]['read'] = array('sysop', "Editors", "user", "Subscribers");
# DG: 14.07.09: remove   $wgNamespacePermissionLockdown[NS_ABSTRACT_TALK]['edit'] = array('sysop', "Editors", "user", "Subscribers");

# DG: 14.07.09: a new restriction that prevents ordinary users from commenting on abstracts
$wgNamespacePermissionLockdown[NS_ABSTRACT_TALK]['edit'] = array('sysop', "Editors", "emailconfirmed", "Subscribers");

$wgNamespacePermissionLockdown[NS_GOLD]['edit'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_GOLD]['move'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_GOLD]['read'] = array('sysop', "Editors", "Subscribers");
$wgNamespacePermissionLockdown[NS_GOLD_TALK]['read'] = array('sysop',"Subscribers","Editors");
$wgNamespacePermissionLockdown[NS_GOLD_TALK]['edit'] = array('sysop',"Subscribers","Editors");


$wgNamespacePermissionLockdown[NS_SILVER]['move'] = array('sysop',"Editors");
$wgNamespacePermissionLockdown[NS_SILVER]['edit'] = array('sysop',"Editors");
# wgNamespacePermissionLockdown[NS_SILVER]['read'] = array('sysop',"Editors", "Subscribers","user");
$wgNamespacePermissionLockdown[NS_SILVER_TALK]['edit'] = array('sysop', "Editors","Subscribers", "emailconfirmed");


$wgNamespacePermissionLockdown[NS_SILVERPLUS]['edit'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_SILVERPLUS]['move'] = array('sysop', "Editors");
# wgNamespacePermissionLockdown[NS_SILVERPLUS]['read'] = array('sysop', "Editors", "Subscribers","user");
$wgNamespacePermissionLockdown[NS_SILVERPLUS_TALK]['read'] = array('sysop',"Subscribers","Editors","user");
$wgNamespacePermissionLockdown[NS_SILVERPLUS_TALK]['edit'] = array('sysop',"Subscribers","Editors","emailconfirmed");


$wgNamespacePermissionLockdown[NS_DEVELOPER]['move'] = array('sysop',"Developers","Editors");
$wgNamespacePermissionLockdown[NS_DEVELOPER]['edit'] = array('sysop',"Developers","Editors");
$wgNamespacePermissionLockdown[NS_DEVELOPER]['read'] = array('sysop',"Editors", "Developers");
$wgNamespacePermissionLockdown[NS_DEVELOPER_TALK]['edit'] = array('sysop', "Editors", "Developers");


$wgNamespacePermissionLockdown[NS_LIBRARY]['read'] = array('sysop', "Subscribers", "Submitters", "Editors");
$wgNamespacePermissionLockdown[NS_LIBRARY]['edit'] = array('sysop', "Submitters", "Editors");
$wgNamespacePermissionLockdown[NS_LIBRARY_TALK]['edit'] = array('sysop', "Subscribers", "Submitters", "Editors");
$wgNamespacePermissionLockdown[NS_LIBRARY_TALK]['read'] = array('sysop', "Subscribers", "Submitters", "Editors");
$wgNamespacePermissionLockdown[NS_LIBRARY]['move'] = array('sysop', "Editors");


$wgNamespacePermissionLockdown[NS_EDITORIAL]['edit'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_EDITORIAL]['move'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_EDITORIAL]['read'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_EDITORIAL_TALK]['read'] = array('sysop',"Editors");
$wgNamespacePermissionLockdown[NS_EDITORIAL_TALK]['edit'] = array('sysop',"Editors");


$wgNamespacePermissionLockdown[NS_ARCH]['edit'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_ARCH]['move'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_ARCH]['read'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_ARCH_TALK]['read'] = array('sysop', "Editors");
$wgNamespacePermissionLockdown[NS_ARCH_TALK]['edit'] = array('sysop', "Editors");


$wgNonincludableNamespaces[] = NS_GOLD;
$wgNonincludableNamespaces[] = NS_GOLD_TALK;
$wgNonincludableNamespaces[] = NS_LIBRARY;
$wgNonincludableNamespaces[] = NS_LIBRARY_TALK;
$wgNonincludableNamespaces[] = NS_SILVER;
$wgNonincludableNamespaces[] = NS_SILVER_TALK;
$wgNonincludableNamespaces[] = NS_DEVELOPER;
$wgNonincludableNamespaces[] = NS_DEVELOPER_TALK;
$wgNonincludableNamespaces[] = NS_SILVERPLUS;
$wgNonincludableNamespaces[] = NS_SILVERPLUS_TALK;
$wgNonincludableNamespaces[] = NS_EDITORIAL;
$wgNonincludableNamsepaces[] = NS_EDITORIAL_TALK;
$wgNonincludableNamespaces[] = NS_ARCH;
$wgNonincludableNamespaces[] = NS_ARCH_TALK;


# TreeAndMenu extension
include("$IP/extensions/TreeAndMenu/TreeAndMenu.php");

# To coax the image urls to be correctly specified...
$wgTreeViewImages = "E:\\home\\qnet_v3\\extensions\\TreeAndMenu\img"; 

# Suggested code for replacing the lhs navigation menu with a dynamic menu
# This involves using the content in a special page called 'NavTree' and 
# loading it into the page at access time
$wgHooks['MonoBookTemplateToolboxEnd'][] = 'wfNavTree';
function wfNavTree() {
        global $wgUser, $wgTitle, $wgParser;
        if (is_object($wgParser)) $psr =& $wgParser; else $psr = new Parser;
        $opt = ParserOptions::newFromUser($wgUser);
        $nav = new Article(Title::newFromText('NavTree'));
        $out = $psr->parse($nav->fetchContent(0, false, false), $wgTitle, $opt, true, true);
        echo '</ul></div>'.$out->getText();
        return true;
}



# simple calendar extension
include("$IP/extensions/SimpleCalendar/SimpleCalendar.php");

# variables extension
include("$IP/extensions/MyVariables/MyVariables.php");

# form extension
include("$IP/extensions/SpecialForm/SpecialForm.setup.php");


# HTMLets extension- a safe way of adding HTML things like JavaScript or Forms to an article
require_once( "$IP/extensions/HTMLets/HTMLets.php" );
$wgHTMLetsDirectory = "$IP/htmlets";


# A very simple Logger
$qnLog = true;
$qn_logFile = "E:\\home\\logs\\wiki\\test_wiki.log";
require_once( "$IP/extensions/Logger/Logger.php" );


# ERCOFTAC article extension
require_once( "$IP/extensions/Ercoftac/Ercoftac.php" );


# User login and registration customisations
require_once( "$IP/extensions/customUserCreateForm/customUserCreateForm.php" );