Index: trunk/extensions/ContributionReporting/arrow.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Index: trunk/extensions/ContributionReporting/ContributionReporting.php |
— | — | @@ -43,7 +43,9 @@ |
44 | 44 | $wgAutoloadClasses['SpecialContributionTrackingStatistics'] = $dir . 'ContributionTrackingStatistics_body.php'; |
45 | 45 | $wgAutoloadClasses['SpecialDailyTotal'] = $dir . 'DailyTotal_body.php'; |
46 | 46 | $wgAutoloadClasses['SpecialYearlyTotal'] = $dir . 'YearlyTotal_body.php'; |
| 47 | +$wgAutoloadClasses['DisabledNotice'] = $dir . 'DisabledNotice_body.php'; |
47 | 48 | |
| 49 | +/* |
48 | 50 | $wgSpecialPages['ContributionHistory'] = 'ContributionHistory'; |
49 | 51 | $wgSpecialPages['ContributionTotal'] = 'ContributionTotal'; |
50 | 52 | $wgSpecialPages['ContributionStatistics'] = 'SpecialContributionStatistics'; |
— | — | @@ -51,6 +53,18 @@ |
52 | 54 | $wgSpecialPages['ContributionTrackingStatistics'] = 'SpecialContributionTrackingStatistics'; |
53 | 55 | $wgSpecialPages['DailyTotal'] = 'SpecialDailyTotal'; |
54 | 56 | $wgSpecialPages['YearlyTotal'] = 'SpecialYearlyTotal'; |
| 57 | +*/ |
| 58 | + |
| 59 | +// Temporarily redirect all pages to DisabledNotice |
| 60 | +$wgSpecialPages['DisabledNotice'] = 'DisabledNotice'; |
| 61 | +$wgSpecialPages['ContributionHistory'] = 'DisabledNotice'; |
| 62 | +$wgSpecialPages['ContributionTotal'] = 'DisabledNotice'; |
| 63 | +$wgSpecialPages['ContributionStatistics'] = 'DisabledNotice'; |
| 64 | +$wgSpecialPages['FundraiserStatistics'] = 'DisabledNotice'; |
| 65 | +$wgSpecialPages['ContributionTrackingStatistics'] = 'DisabledNotice'; |
| 66 | +$wgSpecialPages['DailyTotal'] = 'DisabledNotice'; |
| 67 | +$wgSpecialPages['YearlyTotal'] = 'DisabledNotice'; |
| 68 | + |
55 | 69 | $wgSpecialPageGroups['ContributionHistory'] = 'contribution'; |
56 | 70 | $wgSpecialPageGroups['ContributionTotal'] = 'contribution'; |
57 | 71 | $wgSpecialPageGroups['ContributionStatistics'] = 'contribution'; |
— | — | @@ -124,6 +138,10 @@ |
125 | 139 | 'styles' => 'ext.fundraiserstatistics.css', |
126 | 140 | ) + $commonModuleInfo; |
127 | 141 | |
| 142 | +$wgResourceModules['ext.disablednotice'] = array( |
| 143 | + 'styles' => 'ext.disablednotice.css', |
| 144 | +) + $commonModuleInfo; |
| 145 | + |
128 | 146 | $wgHooks['ParserFirstCallInit'][] = 'efContributionReportingSetup'; |
129 | 147 | $wgHooks['LanguageGetMagic'][] = 'efContributionReportingTotal_Magic'; |
130 | 148 | |
Index: trunk/extensions/ContributionReporting/modules/ext.disablednotice.css |
— | — | @@ -0,0 +1,10 @@ |
| 2 | +div#cr-disablednotice { |
| 3 | + font-size: 1.2em; |
| 4 | + line-height: 1.3em; |
| 5 | + background-image: url("warning-icon.png"); |
| 6 | + background-repeat: no-repeat; |
| 7 | + background-position: 1.1em 50%; |
| 8 | + background-color: #ffffd9; |
| 9 | + border: 1px solid orange; |
| 10 | + padding: 1.1em 1em 1em 4em; |
| 11 | +} |
Index: trunk/extensions/ContributionReporting/modules/arrow.png |
Cannot display: file marked as a binary type. |
svn:mime-type = image/png |
Property changes on: trunk/extensions/ContributionReporting/modules/arrow.png |
___________________________________________________________________ |
Added: svn:mime-type |
1 | 12 | + image/png |
Index: trunk/extensions/ContributionReporting/modules/warning-icon.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/ContributionReporting/modules/warning-icon.png |
___________________________________________________________________ |
Added: svn:mime-type |
2 | 13 | + application/octet-stream |
Index: trunk/extensions/ContributionReporting/DisabledNotice_body.php |
— | — | @@ -0,0 +1,36 @@ |
| 2 | +<?php |
| 3 | +/** |
| 4 | + * Special Page for Contribution statistics extension |
| 5 | + * |
| 6 | + * @file |
| 7 | + * @ingroup Extensions |
| 8 | + */ |
| 9 | + |
| 10 | +class DisabledNotice extends SpecialPage { |
| 11 | + |
| 12 | + /* Functions */ |
| 13 | + |
| 14 | + public function __construct() { |
| 15 | + parent::__construct( 'DisabledNotice' ); |
| 16 | + } |
| 17 | + |
| 18 | + public function execute( $sub ) { |
| 19 | + global $wgOut, $wgScriptPath; |
| 20 | + |
| 21 | + /* Setup */ |
| 22 | + |
| 23 | + $this->setHeaders(); |
| 24 | + $wgOut->addModules( 'ext.disablednotice' ); |
| 25 | + |
| 26 | + /* Display */ |
| 27 | + |
| 28 | + $wgOut->addWikiMsg( 'contribstats-header' ); |
| 29 | + |
| 30 | + $wgOut->addHTML( Xml::openElement( 'div', array( 'id' => 'cr-disablednotice' ) ) ); |
| 31 | + $wgOut->addWikiMsg( 'disablednotice-disabled' ); |
| 32 | + $wgOut->addHTML( Xml::closeElement( 'div' ) ); |
| 33 | + |
| 34 | + $wgOut->addWikiMsg( 'contribstats-footer' ); |
| 35 | + } |
| 36 | + |
| 37 | +} |
Index: trunk/extensions/ContributionReporting/ContributionReporting.i18n.php |
— | — | @@ -15,17 +15,22 @@ |
16 | 16 | // ContributionReporting and ContributionTotal |
17 | 17 | 'contributionreporting-desc' => 'Live reporting on the Wikimedia fundraiser', |
18 | 18 | 'contributiontotal' => 'Contribution total', |
| 19 | + |
| 20 | + 'contribstats-header' => '', |
| 21 | + 'contribstats-footer' => '', |
| 22 | + |
| 23 | + // DisabledNotice |
| 24 | + 'disablednotice' => 'Contribution reporting', |
| 25 | + 'disablednotice-disabled' => 'This page has been temporarily disabled. Please try again later.', |
| 26 | + |
| 27 | + // ContributionHistory |
19 | 28 | 'contributionhistory' => 'Contribution history', |
20 | | - |
21 | 29 | 'contrib-hist-header' => 'Donor comments from around the world', |
22 | | - |
23 | 30 | 'contrib-hist-name' => 'Name', |
24 | 31 | 'contrib-hist-date' => 'Time and date', |
25 | 32 | 'contrib-hist-amount' => 'Amount', |
26 | | - |
27 | 33 | 'contrib-hist-next' => 'Earlier donations', |
28 | 34 | 'contrib-hist-previous' => 'Newer donations', |
29 | | - |
30 | 35 | 'contrib-hist-anonymous' => 'Anonymous', |
31 | 36 | |
32 | 37 | // ContributionStatistics |
— | — | @@ -53,8 +58,6 @@ |
54 | 59 | 'contribstats-value-under' => 'Under $1', |
55 | 60 | 'contribstats-value-from' => 'From $1 - $2', |
56 | 61 | 'contribstats-value-over' => 'Over $1', |
57 | | - 'contribstats-header' => '', |
58 | | - 'contribstats-footer' => '', |
59 | 62 | |
60 | 63 | // Tracking Statistics |
61 | 64 | 'contributiontrackingstatistics' => 'Contribution tracking statistics', |