diff --git a/LocalWiki.php b/LocalWiki.php index 4092f125..e06f194a 100644 --- a/LocalWiki.php +++ b/LocalWiki.php @@ -1,317 +1,317 @@ config->settings['wgRevokePermissions']['default'] = [ '*' => [ 'block' => true, 'createaccount' => true, 'delete' => true, 'edit' => true, 'protect' => true, 'import' => true, 'upload' => true, 'undelete' => true, ], ]; if ( $cwPrivate ) { $wgHooks['SiteNoticeAfter'][] = 'onClosedSiteNoticeAfter'; function onClosedSiteNoticeAfter( &$siteNotice, $skin ) { $siteNotice .= << This wiki has been closed because there have been no edits or logs made within the last 60 days. Since this wiki is private, it may not be adopted as a public wiki would be. If this wiki is not reopened within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki you can go to Special:ManageWiki and uncheck the "closed" box to reopen it. If you have any other questions or concerns, please don't hesitate to ask at Stewards' noticeboard. EOF; return true; } } else { $wgHooks['SiteNoticeAfter'][] = 'onClosedSiteNoticeAfter'; function onClosedSiteNoticeAfter( &$siteNotice, $skin ) { $siteNotice .= << This wiki has been closed because there have been no edits or logs made within the last 60 days. This wiki is now eligible for being adopted. To adopt this wiki please go to Requests for adoption and make a request. If this wiki is not adopted within 6 months it may be deleted. Note: If you are a bureaucrat on this wiki you can go to Special:ManageWiki and uncheck the "closed" box to reopen it. EOF; return true; } } } // Inactive Wikis if ( $cwInactive && (string)$cwInactive != 'exempt' ) { $wgHooks['SiteNoticeAfter'][] = 'onInactiveSiteNoticeAfter'; function onInactiveSiteNoticeAfter( &$siteNotice, $skin ) { $siteNotice .= << This wiki has no edits or logs made within the last 45 days, therefore it is marked as inactive. If you would like to prevent this wiki from being closed, please start showing signs of activity here. If there are no signs of this wiki being used within the next 15 days, this wiki may be closed per the Dormancy Policy. This wiki will then be eligible for adoption by another user. If not adopted and still inactive 135 days from now, this wiki will become eligible for deletion. Please be sure to familiarize yourself with Miraheze's Dormancy Policy. If there is activity on this wiki you can go to Special:ManageWiki and uncheck "inactive" yourself. If you have any other questions or concerns, please don't hesitate to ask at Stewards' noticeboard. EOF; return true; } } // Public Wikis if ( !$cwPrivate ) { $wgRCFeeds['irc'] = [ 'formatter' => 'MirahezeIRCRCFeedFormatter', 'uri' => 'udp://51.89.160.138:5070', 'add_interwiki_prefix' => false, 'omit_bots' => true, ]; // global extension wfLoadExtension( 'DiscordNotifications' ); $wgDiscordFromName = $wgSitename; $wgDiscordShowNewUserEmail = false; $wgDiscordShowNewUserIP = false; $wgDiscordNotificationsShowSuppressed = false; $wgDiscordNotificationWikiUrl = $wgServer . '/w/'; $wgDiscordAdditionalIncomingWebhookUrls = $wmgWikiMirahezeDiscordHooks[$wgDBname] ?? $wmgWikiMirahezeDiscordHooks['default']; } // CookieWarning exempt ElectronPdfService if ( isset( $_SERVER['REMOTE_ADDR'] ) && ( $_SERVER['REMOTE_ADDR'] === '51.89.160.132' || $_SERVER['REMOTE_ADDR'] === '2001:41d0:800:1056::7' || $_SERVER['REMOTE_ADDR'] === '51.89.160.141' || $_SERVER['REMOTE_ADDR'] === '2001:41d0:800:105a::9' ) ) { $wi->config->settings['wgCookieWarningEnabled']['default'] = false; } // Per-wiki overrides if ( $wgDBname === 'allthetropeswiki' ) { $wgRelatedArticlesFooterBlacklistedSkins = [ "minerva" ]; } if ( $wgDBname === 'dcmultiversewiki' ) { $wgMFAutodetectMobileView = false; } if ( $wmgPrivateUploads ) { $wgUploadDirectory = "/mnt/mediawiki-static/private/$wgDBname"; $wgUploadPath = "https://{$wi->hostname}/w/img_auth.php"; $wi->config->settings['wgGenerateThumbnailOnParse']['default'] = true; } if ( $wgDBname === 'hamzawiki' ) { $wgWhitelistRead[] = [ "Rukus" ]; } if ( $wgDBname === 'isvwiki' ) { $wgExtraLanguageNames['isv'] = 'Medžuslovjansky'; $wgExtraInterlanguageLinkPrefixes = [ 'd' ]; $wgSimpleFlaggedRevsUI = false; } if ( $wgDBname === 'metawiki' ) { $wgHooks['BeforePageDisplay'][] = 'wfModifyMetaTags'; function wfModifyMetaTags( OutputPage $out ) { $out->addMeta( 'description', 'Miraheze is an open source project that offers free MediaWiki hosting, for everyone. Request your free wiki today!' ); $out->addMeta( 'revisit-after', '2 days' ); $out->addMeta( 'keywords', 'miraheze, free, wiki hosting, mediawiki, mediawiki hosting, open source, hosting' ); } // disable, needs validated bank account // $wgDonateBoxInSidebarContent = '
'; $wgDonateBoxInSidebarContent = ''; } if ( $wgDBname === 'nbdbwiki' ) { $wgForeignFileRepos[] = [ 'class' => 'ForeignDBViaLBRepo', 'name' => 'shared-nenawikiwiki', 'directory' => '/mnt/mediawiki-static/nonbinarywiki', 'url' => 'https://static.miraheze.org/nonbinarywiki', 'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => false, 'transformVia404' => !$wgGenerateThumbnailOnParse, 'hasSharedCache' => false, 'fetchDescription' => true, 'descriptionCacheExpiry' => 86400 * 7, 'wiki' => 'nonbinarywiki', 'descBaseUrl' => 'https://nonbinary.wiki/wiki/File:', 'scriptDirUrl' => 'https://nonbinary.wiki/w', ]; } if ( $wgDBname === 'ndgwiki' ) { $wgForeignFileRepos[] = [ 'class' => 'ForeignDBViaLBRepo', 'name' => 'shared-nenawikiwiki', 'directory' => '/mnt/mediawiki-static/nenawikiwiki', 'url' => 'https://static.miraheze.org/nenawikiwiki', 'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => false, 'transformVia404' => !$wgGenerateThumbnailOnParse, 'hasSharedCache' => false, 'fetchDescription' => true, 'descriptionCacheExpiry' => 86400 * 7, 'wiki' => 'nenawikiwiki', 'descBaseUrl' => 'https://nenawiki.org/wiki/File:', 'scriptDirUrl' => 'https://nenawiki.org/w', ]; } if ( $wgDBname === 'newusopediawiki' ) { $wgFilterLogTypes['comments'] = false; } if ( $wgDBname === 'thelonsdalebattalionwiki' ) { $egMapsDefaultService = 'googlemaps3'; } if ( $wgDBname === 'swiki' ) { $wgWhitelistRead[] = [ "メインページ/ja" ]; } if ( $wgDBname === 'swisscomraidwiki' ) { $wgAutopromote['emailconfirmed'] = APCOND_EMAILCONFIRMED; } if ( $wgDBname === 'simcitywiki' ) { unset( $wgGroupPermissions['oversight'] ); unset( $wgGroupPermissions['interwiki-admin'] ); unset( $wgGroupPermissions['checkuser'] ); } // Depends on $wgContentNamespaces if ( $wgDBname === 'abitaregeawiki' ) { $wi->config->settings['wgExemptFromUserRobotsControl']['default'] = []; } // Additional wgReadWhitelist changes if ( $wgDBname === 'cvtwiki' ) { $wgWhitelistRead[] = 'CVT action log'; } // Licensing variables switch ( $wmgWikiLicense ) { case 'arr': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/arr.png'; $wi->config->settings['wgRightsText']['default'] = 'All Rights Reserved'; $wi->config->settings['wgRightsUrl']['default'] = false; break; case 'cc-by': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-by.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution 4.0 International (CC BY 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by/4.0'; break; case 'cc-by-nc': $wi->config->settings['wgRightsIcon']['default'] = 'https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-nc/4.0/'; break; case 'cc-by-nd': $wi->config->settings['wgRightsIcon']['default'] = 'https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nd.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-nd/4.0/'; break; case 'cc-by-sa': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-by-sa.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-sa/4.0/'; break; case 'cc-by-sa-3-0': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-by-sa.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-sa/3.0'; break; case 'cc-by-sa-2-0-kr': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-by-sa.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons BY-SA 2.0 Korea'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-sa/2.0/kr'; break; case 'cc-by-sa-nc': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-by-nc-sa.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-nc-sa/4.0/'; break; case 'cc-by-nc-nd': $wi->config->settings['wgRightsIcon']['default'] = 'https://mirrors.creativecommons.org/presskit/buttons/88x31/png/by-nc-nd.png'; $wi->config->settings['wgRightsText']['default'] = 'Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/licenses/by-nc-nd/4.0/'; break; case 'cc-pd': $wi->config->settings['wgRightsIcon']['default'] = 'https://meta.miraheze.org/w/resources/assets/licenses/cc-0.png'; $wi->config->settings['wgRightsText']['default'] = 'CC0 Public Domain'; $wi->config->settings['wgRightsUrl']['default'] = 'https://creativecommons.org/publicdomain/zero/1.0/'; break; case 'gpl-v3': $wi->config->settings['wgRightsIcon']['default'] = 'https://www.gnu.org/graphics/gplv3-or-later.png'; $wi->config->settings['wgRightsText']['default'] = 'GPLv3'; $wi->config->settings['wgRightsUrl']['default'] = 'https://www.gnu.org/licenses/gpl-3.0-standalone.html'; break; case 'empty': break; } if ( $wgDBname === 'gyaanipediawiki' || $wgDBname === 'higyaanipediawiki' || $wgDBname === 'bngyaanipediawiki' || $wgDBname === 'tegyaanipediawiki' || $wgDBname === 'tagyaanipediawiki' || $wgDBname === 'mrgyaanipediawiki' || $wgDBname === 'gugyaanipediawiki' || $wgDBname === 'pagyaanipediawiki' || $wgDBname === 'kngyaanipediawiki' || $wgDBname === 'maigyaanipediawiki' || $wgDBname === 'bhgyaanipediawiki' || $wgDBname === 'asgyaanipediawiki' || $wgDBname === 'mlgyaanipediawiki' ) { // per Ucronistaw $wgForeignFileRepos[] = [ 'class' => 'ForeignDBViaLBRepo', 'name' => 'shared', 'directory' => '/mnt/mediawiki-static/commonsgyaanipediawiki', 'url' => 'https://static.miraheze.org/commonsgyaanipediawiki', 'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => false, 'transformVia404' => !$wgGenerateThumbnailOnParse, 'hasSharedCache' => 'commonsgyaanipediawiki', 'wiki' => 'commonsgyaanipediawiki', 'descBaseUrl' => 'https://commonsgyaanipedia.miraheze.org/wiki/File:', ]; } if ( $wmgUseYandexTranslate ) { $wgTranslateTranslationServices['Yandex'] = [ 'url' => 'https://translate.yandex.net/api/v1.5/tr.json/translate', 'key' => $wmgYandexTranslationKey, 'pairs' => 'https://translate.yandex.net/api/v1.5/tr.json/getLangs', 'timeout' => 3, 'langorder' => [ 'en', 'ru', 'uk', 'de', 'fr', 'pl', 'it', 'es', 'tr' ], 'langlimit' => 1, 'type' => 'yandex', ]; } if ( $wgDBname === 'tuscriaturaswiki' || $wgDBname === 'yourcreatureswiki') { $wgForeignFileRepos[] = [ 'class' => 'ForeignDBViaLBRepo', 'name' => 'shared', 'directory' => '/mnt/mediawiki-static/intercriaturaswiki', 'url' => 'https://static.miraheze.org/intercriaturaswiki', 'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0, 'thumbScriptUrl' => false, 'transformVia404' => !$wgGenerateThumbnailOnParse, 'hasSharedCache' => 'intercriaturaswiki', 'wiki' => 'intercriaturaswiki', 'descBaseUrl' => 'https://intercriaturas.miraheze.org/wiki/File:', ]; } -if ( $wgDBname === 'test2wiki' ) { +if ( $wgDBname === 'erislywiki' ) { // T5981 $wgHooks['OutputPageParserOutput'][] = 'onOutputPageParserOutput'; function onOutputPageParserOutput( OutputPage &$out, ParserOutput $parseroutput ) { // $out is an instance of the OutputPage object. // Add a meta tag - $out->addMeta( 'PreMiD_Present', 'test' ); + $out->addMeta( 'PreMiD_Presence', 'Erisly' ); // Required return value of a hook function. return true; } }