226 lines
7.3 KiB
PHP
226 lines
7.3 KiB
PHP
<?php
|
|
# This file was automatically generated by the MediaWiki 1.30.0
|
|
# 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.
|
|
#
|
|
# Further documentation for configuration settings may be found at:
|
|
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
|
|
|
|
# Protect against web entry
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
exit;
|
|
}
|
|
|
|
# store passwords/sensitive data here
|
|
$secrets = require('secrets.php');
|
|
|
|
## Uncomment this to disable output compression
|
|
# $wgDisableOutputCompression = true;
|
|
|
|
$wgSitename = "Claremont MakerSpace";
|
|
$wgMetaNamespace = "Claremont_MakerSpace";
|
|
|
|
## The URL base path to the directory containing the wiki;
|
|
## defaults for all runtime URL paths are based off of this.
|
|
## For more information on customizing the URLs
|
|
## (like /w/index.php/Page_title to /wiki/Page_title) please see:
|
|
## https://www.mediawiki.org/wiki/Manual:Short_URL
|
|
$wgScriptPath = "";
|
|
$wgScriptExtension = ".php";
|
|
$wgArticlePath = "/wiki/$1";
|
|
$wgUsePathInfo = true;
|
|
|
|
## The protocol and server name to use in fully-qualified URLs
|
|
$wgServer = "http://localhost:8080";
|
|
|
|
## The URL path to static resources (images, scripts, etc.)
|
|
$wgResourceBasePath = $wgScriptPath;
|
|
|
|
## The URL path to the logo. Make sure you change this from the default,
|
|
## or else you'll overwrite your logo when you upgrade!
|
|
$wgLogo = "images/CMS-Logo-BY-v4_alt-small.png";
|
|
|
|
## UPO means: this is also a user preference option
|
|
|
|
$wgEnableEmail = true;
|
|
$wgEnableUserEmail = true; # UPO
|
|
|
|
$wgEmergencyContact = "apache@claremontmakerspace.org";
|
|
$wgPasswordSender = "apache@claremontmakerspace.org";
|
|
|
|
$wgEnotifUserTalk = true; # UPO
|
|
$wgEnotifWatchlist = false; # UPO
|
|
$wgEmailAuthentication = true;
|
|
|
|
## Database settings
|
|
$wgDBtype = "mysql";
|
|
$wgDBserver = "database";
|
|
$wgDBname = "mediawiki";
|
|
$wgDBuser = "mediawiki";
|
|
$wgDBpassword = $secrets['wgDBpassword'];
|
|
|
|
# MySQL specific settings
|
|
$wgDBprefix = "";
|
|
|
|
# MySQL table options to use during installation or update
|
|
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
|
|
|
|
# Experimental charset support for MySQL 5.0.
|
|
$wgDBmysql5 = false;
|
|
|
|
## Shared memory settings
|
|
$wgMainCacheType = CACHE_NONE;
|
|
$wgMemCachedServers = [];
|
|
|
|
## To enable image uploads, make sure the 'images' directory
|
|
## is writable, then set this to true:
|
|
$wgEnableUploads = true;
|
|
$wgFileExtensions = array_merge( $wgFileExtensions, array( 'pdf', 'svg' ));
|
|
$wgUseImageMagick = true;
|
|
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
|
$wgGenerateThumbnailOnParse = false;
|
|
|
|
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
|
|
$wgUseInstantCommons = false;
|
|
|
|
# Periodically send a pingback to https://www.mediawiki.org/ with basic data
|
|
# about this MediaWiki instance. The Wikimedia Foundation shares this data
|
|
# with MediaWiki developers to help guide future development efforts.
|
|
$wgPingback = false;
|
|
|
|
## If you use ImageMagick (or any other shell command) on a
|
|
## Linux server, this will need to be set to the name of an
|
|
## available UTF-8 locale
|
|
$wgShellLocale = "en_US.utf8";
|
|
|
|
## Set $wgCacheDirectory to a writable directory on the web server
|
|
## to make your wiki go slightly faster. The directory should not
|
|
## be publically accessible from the web.
|
|
#$wgCacheDirectory = "$IP/cache";
|
|
|
|
# Site language code, should be one of the list in ./languages/data/Names.php
|
|
$wgLanguageCode = "en";
|
|
|
|
$wgSecretKey = $secrets['wgSecretKey'];
|
|
|
|
# Changing this will log out all existing sessions.
|
|
$wgAuthenticationTokenVersion = "1";
|
|
|
|
# Site upgrade key. Must be set to a string (default provided) to turn on the
|
|
# web installer while LocalSettings.php is in place
|
|
$wgUpgradeKey = $secrets['wgUpgradeKey'];
|
|
|
|
## 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.
|
|
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
|
|
$wgRightsUrl = "https://creativecommons.org/licenses/by-sa/4.0/";
|
|
$wgRightsText = "Creative Commons Attribution-ShareAlike";
|
|
$wgRightsIcon = "$wgResourceBasePath/resources/assets/licenses/cc-by-sa.png";
|
|
|
|
# Path to the GNU diff3 utility. Used for conflict resolution.
|
|
$wgDiff3 = "/usr/bin/diff3";
|
|
|
|
# Global Permissions
|
|
$wgGroupPermissions['*']['createaccount'] = false;
|
|
$wgGroupPermissions['*']['autocreateaccount'] = true;
|
|
$wgGroupPermissions['*']['edit'] = false;
|
|
|
|
## Default skin: you can change the default skin. Use the internal symbolic
|
|
## names, ie 'vector', 'monobook':
|
|
$wgDefaultSkin = "Timeless";
|
|
|
|
# Enabled skins.
|
|
# The following skins were automatically enabled:
|
|
wfLoadSkin( 'MonoBook' );
|
|
wfLoadSkin( 'Vector' );
|
|
wfLoadSkin( 'Timeless' );
|
|
|
|
# End of automatically generated settings.
|
|
# Add more configuration options below.
|
|
|
|
# Semantic MediaWiki Extension
|
|
# require_once "$IP/extensions/SemanticMediaWiki/SemanticMediaWiki.php";
|
|
enableSemantics( 'claremontmakerspace.org' );
|
|
$smwgPDefaultType = '_txt';
|
|
$smwgEnabledQueryDependencyLinksStore = true;
|
|
|
|
wfLoadExtension( 'SemanticACL' );
|
|
|
|
wfLoadExtension( 'WikiEditor' );
|
|
wfLoadExtension( 'CodeEditor' );
|
|
$wgDefaultUserOptions['usebetatoolbar'] = 1; // user option provided by WikiEditor extension
|
|
|
|
wfLoadExtension( 'CodeMirror' );
|
|
|
|
wfLoadExtension( 'ReplaceText' );
|
|
|
|
#wfLoadExtension( 'UserMerge' );
|
|
#$wgGroupPermissions['bureaucrat']['usermerge'] = true;
|
|
|
|
require_once "$IP/extensions/NativeSvgHandler/NativeSvgHandler.php";
|
|
|
|
wfLoadExtension( 'Scribunto' );
|
|
$wgScribuntoDefaultEngine = 'luastandalone';
|
|
$wgScribuntoUseCodeEditor = "true";
|
|
|
|
# LDAP
|
|
wfLoadExtension( 'PluggableAuth' );
|
|
wfLoadExtension( 'LDAPProvider' );
|
|
wfLoadExtension( 'LDAPUserInfo' );
|
|
wfLoadExtension( 'LDAPAuthentication2' );
|
|
$LDAPProviderDomainConfigProvider = function() use ($secrets) {
|
|
$config = [
|
|
'CMS' => [
|
|
"connection" => [
|
|
"server" => "self-service.claremontmakerspace.org",
|
|
"port" => 7389,
|
|
"enctype" => "clear",
|
|
"user" => "uid=LDAPSearch,cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
"pass" => $secrets['LDAPPass'],
|
|
"options" => [
|
|
"LDAP_OPT_DEREF" => 1,
|
|
],
|
|
"basedn" => "cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
"groupbasedn" => "dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
"userbasedn" => "dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
"searchattribute" => "uid",
|
|
"searchstring" => "uid=USER-NAME,cn=users,dc=sawtooth,dc=claremontmakerspace,dc=org",
|
|
"usernameattribute" => "uid",
|
|
"realnameattribute" => "cn",
|
|
"emailattribute" => "mail"
|
|
],
|
|
"authentication" => [
|
|
"usernameattribute" => "uid",
|
|
"realnameattribute" => "cn",
|
|
"emailattribute" => "mail"
|
|
],
|
|
"userinfo" => [
|
|
"email" => "mail",
|
|
"realname" => "cn",
|
|
"properties.gender" => "gender"
|
|
]
|
|
]
|
|
];
|
|
|
|
return new \MediaWiki\Extension\LDAPProvider\DomainConfigProvider\InlinePHPArray( $config );
|
|
};
|
|
|
|
wfLoadExtension( 'VisualEditor' );
|
|
$wgDefaultUserOptions['visualeditor-enable'] = 1;
|
|
$wgDefaultUserOptions['visualeditor-editor'] = "visualeditor";
|
|
# Don't allow users to disable it
|
|
//$wgHiddenPrefs[] = 'visualeditor-enable';
|
|
# OPTIONAL: Enable VisualEditor's experimental code features
|
|
#$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
|
|
$wgVirtualRestConfig['modules']['parsoid'] = array(
|
|
'url' => 'http://parsoid:8000',
|
|
'domain' => 'claremontmakerspace',
|
|
);
|
|
|
|
require_once "$IP/extensions/Widgets/Widgets.php";
|