216 lines
6.9 KiB
PHP
216 lines
6.9 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;
|
|
}
|
|
|
|
error_reporting( 0 );
|
|
|
|
# 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 = "https://wiki.claremontmakerspace.org";
|
|
|
|
## 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', 'stl' ));
|
|
$wgUseImageMagick = true;
|
|
$wgImageMagickConvertCommand = "/usr/bin/convert";
|
|
$wgGenerateThumbnailOnParse = true;
|
|
|
|
# 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 = "C.UTF-8";
|
|
|
|
## 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
|
|
wfLoadExtension( 'SemanticMediaWiki' );
|
|
wfLoadExtension( 'SemanticResultFormats' );
|
|
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;
|
|
|
|
wfLoadExtension( 'NativeSvgHandler' );
|
|
|
|
wfLoadExtension( 'ParserFunctions' );
|
|
|
|
wfLoadExtension( 'Scribunto' );
|
|
$wgScribuntoDefaultEngine = 'luastandalone';
|
|
$wgScribuntoUseCodeEditor = "true";
|
|
|
|
wfLoadExtension( 'PluggableAuth' );
|
|
wfLoadExtension( 'OpenIDConnect' );
|
|
$wgOpenIDConnect_MigrateUsersByUserName = true;
|
|
$wgPluggableAuth_Config["Log in with CMS Network Resources Account"] = [
|
|
'plugin' => 'OpenIDConnect',
|
|
'data' => [
|
|
'providerURL' => 'https://ucs-sso-ng.claremontmakerspace.org/realms/ucs',
|
|
'clientID' => 'mediawiki',
|
|
'clientsecret' => $secrets['OpenIDSecret'],
|
|
]
|
|
];
|
|
|
|
wfloadextension( 'VisualEditor' );
|
|
wfLoadExtension( 'TemplateData' );
|
|
|
|
wfLoadExtension( 'Variables' );
|
|
|
|
wfLoadExtension( 'CSS' );
|
|
|
|
wfLoadExtension( 'Widgets' );
|
|
wfLoadExtension( 'ApprovedRevs' );
|
|
wfLoadExtension( 'SemanticApprovedRevs' );
|
|
wfLoadExtension( 'QRLite' );
|
|
|
|
wfloadextension( 'Diagrams' );
|
|
$wgDiagramsServiceUrl ='https://wiki.claremontmakerspace.org/diagrams';
|
|
|
|
wfLoadExtension( 'ExternalData' );
|
|
$edgStringReplacements['SNIPEIT_URL'] = 'https://inventory.claremontmakerspace.org';
|
|
$edgAllowExternalDataFrom = 'SNIPEIT_URL';
|
|
// TODO: Use ExternalDataBeforeWebCall to set the headers only for
|
|
// snipeit API calls. Only matters if other domains are added to
|
|
// the whitelist.
|
|
$edgHTTPOptions = [
|
|
'headers' => [
|
|
'Accept' => 'application/json',
|
|
'Content-Type' => 'application/json',
|
|
'Authorization' => 'Bearer '.$secrets['SnipeITAPIKey']
|
|
]
|
|
];
|