$_SERVER[ 'AUTHENTICATE_DISPLAYNAME' ], 'language' => 'en', 'disablemail' => 0 ]; // Users email address should not be changed inside MediaWiki. $wgAuthRemoteuserUserPrefsForced = [ 'email' => $_SERVER[ 'AUTHENTICATE_MAIL' ] ]; } ## Default skin: you can change the default skin. Use the internal symbolic ## names, ie 'vector', 'monobook': $wgDefaultSkin = "vector"; # Enabled skins. #wfLoadSkin( 'MonoBook' ); #wfLoadSkin( 'Timeless' ); wfLoadSkin( 'Vector' ); # Enabled extensions. Most of the extensions are enabled by adding # wfLoadExtensions('ExtensionName'); # to LocalSettings.php. Check specific extension documentation for more details. # The following extensions were automatically enabled: wfLoadExtension( 'CategoryTree' ); wfLoadExtension( 'Cite' ); wfLoadExtension( 'CiteThisPage' ); wfLoadExtension( 'CodeEditor' ); wfLoadExtension( 'ConfirmEdit' ); wfLoadExtension( 'Gadgets' ); wfLoadExtension( 'Graph' ); wfLoadExtension( 'ImageMap' ); wfLoadExtension( 'InputBox' ); #wfLoadExtension( 'OATHAuth' ); wfLoadExtension( 'Interwiki' ); wfLoadExtension( 'JsonConfig' ); # Configuration via Special Wiki Pages containing JSON wfLoadExtension( 'LocalisationUpdate' ); wfLoadExtension( 'Maps' ); # OSM Maps wfLoadExtension( 'Mermaid' ); # Diagrams and flowcharts wfLoadExtension( 'MsUpload' ); # Better upload formulars wfLoadExtension( 'MultimediaViewer' ); wfLoadExtension( 'Nuke' ); # Mass delete pages wfLoadExtension( 'PageImages' ); wfLoadExtension( 'ParserFunctions' ); wfLoadExtension( 'PdfHandler' ); wfLoadExtension( 'Poem' ); # Formatting of poems wfLoadExtension( 'Renameuser' ); wfLoadExtension( 'ReplaceText' ); wfLoadExtension( 'Scribunto' ); # Lua Scripting wfLoadExtension( 'SecureLinkFixer' ); wfLoadExtension( 'SpamBlacklist' ); wfLoadExtension( 'SubPageList3' ); wfLoadExtension( 'SyntaxHighlight_GeSHi' ); wfLoadExtension( 'TemplateData' ); # Template schema information wfLoadExtension( 'TemplateStyles' ); # Embedd Styles from Wiki Pages containing CSS wfLoadExtension( 'TextExtracts' ); wfLoadExtension( 'TitleBlacklist' ); require_once "$IP/extensions/Validator/Validator.php"; wfLoadExtension( 'VisualEditor' ); # WYSIWYG editor wfLoadExtension( 'WikiEditor' ); # scribunto configuration $wgScribuntoDefaultEngine = 'luastandalone'; # Load SMW Extensions wfLoadExtension( 'PageForms' ); # SMW Dependency wfLoadExtension( 'SemanticCompoundQueries' ); # Allow combined queries in SMW wfLoadExtension( 'SemanticExtraSpecialProperties' ); wfLoadExtension( 'SemanticResultFormats' ); wfLoadExtension( 'SemanticScribunto' ); # Lua scripting using semantic information # Turn on SemanticMediaWiki $smwgUpgradeKey = 'smw:2020-04-18'; wfLoadExtension( 'SemanticMediaWiki' ); enableSemantics( getenv("SEMANTIC_URL") ); # Configure S3 Storage if (getenv("S3_SECRET")) { wfLoadExtension( 'AWS' ); $wgAWSCredentials = [ 'key' => getenv("S3_KEY"), 'secret' => getenv("S3_SECRET"), 'token' => false ]; $wgAWSRegion = getenv("S3_REGION"); $wgAWSBucketName = getenv("S3_BUCKET_NAME"); # If you are using minio, you need to set a public policy like this: # mc policy set public instance/bucket/ # mc admin config set instance/bucket/ api cors_allow_origin=https://wiki.example.com $wgAWSBucketTopSubdirectory = getenv("S3_SUBDIRECTORY"); $wgAWSRepoHashLevels = '2'; # Default 0; But 2 means that S3 objects # will be named a/ab/Filename.png (same # as when MediaWiki stores files in local # directories) # --- $wgAWSRepoDeletedHashLevels = '3'; # Default 0; But 3 for naming # a/ab/abc/Filename.png (same as # when MediaWiki stores deleted # files in local directories) //The url used for the API (PutObject, etc.) $wgFileBackends['s3']['endpoint'] = getenv("S3_ENDPOINT"); //The url used for showing images. $1 is translated to the bucket name. $wgAWSBucketDomain = getenv("S3_BUCKET_DOMAIN_NAME"); } # Set Subpages on $wgNamespacesWithSubpages[NS_MAIN] = 1; # Enable long error messages if (getenv("DEBUG")) { $wgShowExceptionDetails = true; $wgShowDBErrorBacktrace = true; $wgShowSQLErrors = true; } # Local configuration for MediaWiki ini_set( 'max_execution_time', 1000 ); ini_set('memory_limit', '-1'); # Move the SMW config directory $smwgConfigFileDir = '/var/www/localstore/smwconfig'; # Logos $wgLogos = [ '1x' => "/wiki/Special:Redirect/file/Logo.png" ]; # Footer icons if (getenv("DISABLE_ICONS")) { $wgFooterIcons['poweredby']['semanticmediawiki'] = false; unset( $wgFooterIcons['poweredby'] ); } # Responsive $wgVectorResponsive = true;