162 lines
6.8 KiB
PHP
162 lines
6.8 KiB
PHP
<?php
|
|
|
|
foreach($mtSkins as &$skin) {
|
|
wfLoadSkin($skin);
|
|
}
|
|
|
|
foreach($mtExtensions as &$exName){
|
|
$mtFuncName = "mt" . $exName;
|
|
switch($exName){
|
|
//All extensions loaded by wikis MUST be in this list.
|
|
//If the extension doesn't require a global config to be set, simply plase the name alike at the top
|
|
//Do not define permissions in here, those are always wiki specific
|
|
//For all blocks, at the TOP you MUST put wfLoadExtension($exName);
|
|
case "AbuseFilter":
|
|
case "AdminLinks":
|
|
case "AJAXPoll":
|
|
case "Arrays":
|
|
case "CharInsert":
|
|
case "CheckUser":
|
|
case "CodeMirror":
|
|
case "CookieWarning":
|
|
case "ConfirmAccount":
|
|
case "CSS":
|
|
case "DarkMode":
|
|
case "Description2":
|
|
case "Disambiguator":
|
|
case "Discord":
|
|
case "DPLforum":
|
|
case "DynamicPageList3":
|
|
case "Editcount":
|
|
case "EmbedVideo":
|
|
case "intersection":
|
|
case "Math":
|
|
case "MobileFrontend":
|
|
case "Moderation":
|
|
case "MyVariables":
|
|
case "NativeSvgHandler":
|
|
case "NewUserMessage":
|
|
case "OpenGraphMeta":
|
|
case "Popups":
|
|
case "RandomSelection":
|
|
case "Tabs":
|
|
case "TemplateSandbox":
|
|
case "TitleKey":
|
|
case "TorBlock":
|
|
case "UnusedRedirects":
|
|
case "UserMerge":
|
|
case "Variables":
|
|
//MW Defaults
|
|
case "CategoryTree":
|
|
case "Cite":
|
|
case "CiteThisPage":
|
|
case "CodeEditor":
|
|
case "Gadgets":
|
|
case "ImageMap":
|
|
case "InputBox":
|
|
case "LocalisationUpdate":
|
|
case "Nuke":
|
|
case "PageImages":
|
|
case "ParserFunctions":
|
|
case "PdfHandler":
|
|
case "Poem":
|
|
case "Renameuser":
|
|
case "ReplaceText":
|
|
case "SecureLinkFixer":
|
|
case "SpamBlacklist":
|
|
case "TemplateData":
|
|
case "TextExtracts":
|
|
case "TitleBlacklist":
|
|
case "VisualEditor":
|
|
case "WhosOnline":
|
|
case "WikiEditor":
|
|
wfLoadExtension($exName);
|
|
break;
|
|
//Do not put settings above this comment
|
|
case "ConfirmAccount":
|
|
wfLoadExtension($exName);
|
|
$wgConfirmAccountRedactEmails = true;
|
|
break;
|
|
case "Widgets":
|
|
wfLoadExtension($exName);
|
|
$wgWidgetsCompileDir = "$mtDataPath/widgets/$mtWikiName/";
|
|
break;
|
|
case "Cargo":
|
|
wfLoadExtension($exName);
|
|
$wgCargoDBname = $mtUsername . "_cargo" . $mtSiteAttributes["dbsuffix"];
|
|
$wgCargoDBuser = $mtUsername . "cargo";
|
|
break;
|
|
case "TimedMediaHandler":
|
|
wfLoadExtension($exName);
|
|
$wgEnableTranscode = false;
|
|
$wgFFmpegLocation = "/usr/bin/ffmpeg";
|
|
$wgEnabledTranscodeSet = [
|
|
'120p.vp9.webm' => false,
|
|
'160p.vp9.webm' => false,
|
|
'180p.vp9.webm' => false,
|
|
'240p.vp9.webm' => false,
|
|
'360p.vp9.webm' => false,
|
|
'480p.vp9.webm' => false,
|
|
'720p.vp9.webm' => false,
|
|
'1080p.vp9.webm' => false,
|
|
'1440p.vp9.webm' => false,
|
|
'2160p.vp9.webm' => false,
|
|
];
|
|
// $wgEnabledTranscodeSet = array();
|
|
// $wgEnabledAudioTranscodeSet = array();
|
|
// $wgTmhWebPlayer = "videojs";
|
|
break;
|
|
case "SyntaxHighlight_GeSHi":
|
|
wfLoadExtension($exName);
|
|
$wgPygmentizePath = "/usr/bin/pygmentize";
|
|
break;
|
|
case "ConfirmEdit":
|
|
wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/QuestyCaptcha' ]);
|
|
break;
|
|
case "ReCaptchaNoCaptcha":
|
|
wfLoadExtensions([ 'ConfirmEdit', 'ConfirmEdit/ReCaptchaNoCaptcha' ]);
|
|
// $wgCaptchaClass = 'ReCaptchaNoCaptcha';
|
|
break;
|
|
case "Scribunto":
|
|
wfLoadExtension($exName);
|
|
$wgScribuntoDefaultEngine = "luasandbox";
|
|
$wgScribuntoEngineConf['luastandalone']['cpuLimit'] = 15;
|
|
break;
|
|
case "OATHAuth":
|
|
wfLoadExtension($exName);
|
|
$wgGroupPermissions['sysop']['oathauth-disable-for-user'] = false;
|
|
$wgGroupPermissions['sysop']['oathauth-verify-user'] = false;
|
|
$wgGroupPermissions['sysop']['oathauth-view-log'] = false;
|
|
break;
|
|
case "Interwiki":
|
|
wfLoadExtension($exName);
|
|
$wgGroupPermissions['sysop']['interwiki'] = true;
|
|
break;
|
|
case "timeline":
|
|
wfLoadExtension($exName);
|
|
$wgTimelinePloticusCommand = "/usr/bin/ploticus";
|
|
$wgTimelinePerlCommand = "/usr/bin/perl";
|
|
break;
|
|
case "AWS":
|
|
wfLoadExtension($exName);
|
|
$wgFileBackends['s3']['endpoint'] = "";
|
|
$wgAWSBucketDomain = "cdn.$mtWikiName";
|
|
$wgAWSRegion = 'auto';
|
|
$wgAWSRepoHashLevels = '2';
|
|
$wgAWSRepoDeletedHashLevels = '3';
|
|
$wgAWSStatCacheTTL = 7776000; //90 days, metadata cache should be able to stick around for a while
|
|
|
|
$wgAWSCredentials = [
|
|
"key" => "",
|
|
"secret" => "",
|
|
"token" => false
|
|
];
|
|
break;
|
|
default:
|
|
throw new Exception("MTMW Invalid Extension, " . $exName . ", please contact system administrator");
|
|
return;
|
|
break;
|
|
}
|
|
}
|
|
unset($extension);
|