forked from miraheze/mw-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSitenotice.php
44 lines (35 loc) · 1.7 KB
/
Sitenotice.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
if ( $wmgSiteNoticeOptOut ) {
# Only show important notices when optout
$wi->config->settings['wgNoticeProject']['default'] = 'optout';
}
# Increment this version number whenever you change the site notice
$wgMajorSiteNoticeID = 58;
/**
* Wrap your sitenotice with <div data-nosnippet>(sitenotice)</div>
* or Google will use the sitenotice for their search result snippet.
*/
# Global SiteNotice
/*if ( !$wmgSiteNoticeOptOut ) {
$wgHooks['SiteNoticeAfter'][] = 'onSiteNoticeAfter'; // show to all users
function onSiteNoticeAfter( &$siteNotice, $skin ) {
global $wmgSiteNoticeOptOut, $snImportant;
$siteNotice .= <<<EOF
<table class="wikitable" style="text-align:center;"><tbody><tr>
<td style="font-size:125%"><div data-nosnippet>Miraheze is planning database maintenance beginning at 21:00 UTC time on the 19th of August 2021. We apologize for any inconvenience caused by this.</div></td>
</tr></tbody></table>
EOF;
}
}*/
# Specific wiki SiteNotice
/* if ( $wgDiscordIncomingWebhookUrl || $wgSlackIncomingWebhookUrl ) {
$wgHooks['SiteNoticeAfter'][] = 'onSiteNoticeAfter';
function onSiteNoticeAfter( &$siteNotice, $skin ) {
global $wmgSiteNoticeOptOut, $snImportant;
$siteNotice .= <<<EOF
<div data-nosnippet><table class="wikitable" style="text-align:center;"><tbody><tr>
<td>Unfortunately, between 3 January 2021 and 28 April 2021, Discord & Slack Webhook URLs were available via the MediaWiki API due to <a href="https://github.com/miraheze/ManageWiki/security/advisories/GHSA-jmc9-rv2f-g8vv">GHSA-jmc9-rv2f-g8vv</a>. We advise you to consider resetting and replacing your Discord or Slack webhook via Special:ManageWiki/settings.</td>
</tr></tbody></table></div>
EOF;
}
} */