docker-mediawiki/LocalSettings.php

216 lines
6.9 KiB
PHP
Raw Normal View History

<?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;
}
2021-10-21 01:45:59 -04:00
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
2020-06-16 12:25:59 -04:00
$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;
2020-11-12 15:18:00 -05:00
$wgFileExtensions = array_merge( $wgFileExtensions, array( 'pdf', 'svg', 'stl' ));
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
2020-06-16 12:27:11 -04:00
$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
2021-10-21 01:45:59 -04:00
$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
2022-03-18 23:12:59 -04:00
wfLoadExtension( 'SemanticMediaWiki' );
wfLoadExtension( 'SemanticResultFormats' );
enableSemantics( 'claremontmakerspace.org' );
$smwgPDefaultType = '_txt';
$smwgEnabledQueryDependencyLinksStore = true;
2020-04-26 17:02:30 -04:00
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' );
2020-07-05 01:49:42 -04:00
wfLoadExtension( 'ParserFunctions' );
wfLoadExtension( 'Scribunto' );
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoUseCodeEditor = "true";
2020-01-08 21:12:29 -05:00
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'],
]
];
2019-09-27 16:11:33 -04:00
wfloadextension( 'VisualEditor' );
2020-06-25 03:25:03 -04:00
wfLoadExtension( 'TemplateData' );
2020-07-24 15:28:22 -04:00
wfLoadExtension( 'Variables' );
2020-07-24 15:26:16 -04:00
wfLoadExtension( 'CSS' );
wfLoadExtension( 'Widgets' );
2021-10-27 20:22:23 -04:00
wfLoadExtension( 'ApprovedRevs' );
2022-03-18 23:16:33 -04:00
wfLoadExtension( 'SemanticApprovedRevs' );
wfLoadExtension( 'QRLite' );
wfloadextension( 'Diagrams' );
2022-03-18 23:15:25 -04:00
$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']
]
];