Index: trunk/extensions/CentralNotice/SpecialNoticeLoader.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | * 10 minutes? |
22 | 22 | */ |
23 | 23 | protected function maxAge() { |
24 | | - return 600; |
| 24 | + return 0; |
25 | 25 | } |
26 | 26 | |
27 | 27 | function getJsOutput() { |
Index: trunk/extensions/CentralNotice/CentralNotice.php |
— | — | @@ -3,7 +3,8 @@ |
4 | 4 | // http://meta.wikimedia.org/wiki/Special:NoticeLoader |
5 | 5 | $wgNoticeLoader = 'http://smorgasbord.local/trunk/index.php/Special:NoticeLoader'; |
6 | 6 | $wgNoticeText = 'http://smorgasbord.local/trunk/index.php/Special:NoticeText'; |
7 | | -$wgNoticeEpoch = '20071003015645'; |
| 7 | +//$wgNoticeEpoch = '20071003183510'; |
| 8 | +$wgNoticeEpoch = gmdate( 'YmdHis', @filemtime( dirname( __FILE__ ) . '/SpecialNoticeText.php' ) ); |
8 | 9 | |
9 | 10 | function wfCentralNotice( &$notice ) { |
10 | 11 | global $wgNoticeLoader; |
Index: trunk/extensions/CentralNotice/SpecialNoticeText.php |
— | — | @@ -17,11 +17,73 @@ |
18 | 18 | |
19 | 19 | function getJsOutput() { |
20 | 20 | global $wgSiteNotice; |
21 | | - $encNotice = Xml::escapeJsString( $wgSiteNotice ); |
| 21 | + $encNotice = Xml::escapeJsString( $this->getHtmlNotice() ); |
22 | 22 | return <<<EOT |
23 | 23 | wgNotice = "$encNotice"; |
24 | 24 | EOT; |
25 | 25 | } |
| 26 | + |
| 27 | + function getHtmlNotice() { |
| 28 | + return <<<EOT |
| 29 | +<style type="text/css"> |
| 30 | +.fundraiser-box { |
| 31 | + margin-top: 12px; |
26 | 32 | } |
| 33 | +.fundraiser-box a { |
| 34 | + color: black; |
| 35 | + text-effect: none; |
| 36 | +} |
| 37 | +.fundraiser-text { |
| 38 | + not-width: 400px; /* 420 - 8*2 - 2*2 */ |
| 39 | + height: 75px; |
| 40 | + padding: 0px 8px; |
| 41 | + background: #fdece5; |
| 42 | + border: solid 2px #f3e4dd; |
| 43 | + text-align: left; |
| 44 | +} |
| 45 | +.fundraiser-headline { |
| 46 | + font-size: 14px; |
| 47 | + margin-top: 0px; |
| 48 | + padding: 0px; |
| 49 | +} |
| 50 | +.fundraiser-quote { |
| 51 | + font-family: Monaco, monospace; |
| 52 | + font-size: 11px; |
| 53 | + background: white; |
| 54 | + |
| 55 | + not-width: 387px; /* 407 - 8*2 - 2*2 */ |
| 56 | + height: 1.5em; |
| 57 | + padding: 2px 8px; |
| 58 | + border: solid 2px #efedee; |
| 59 | + |
| 60 | + overflow: hidden; |
| 61 | +} |
27 | 62 | |
| 63 | +.fundraiser-bar { |
| 64 | + margin-top: 5px; |
| 65 | + margin-bottom: 0px; |
| 66 | +} |
| 67 | +</style> |
| 68 | +<table class="fundraiser-box" align="center"> |
| 69 | + <tr> |
| 70 | + <td class="fundraiser-text"> |
| 71 | + <div class="fundraiser-headline"> |
| 72 | + <a href="http://fundraising.wikimedia.org/">What you didn't know about Wikipedia . . . <small>(See more)</small></a> |
| 73 | + </div> |
| 74 | + <div class='fundraiser-quote'> |
| 75 | + <a href="http://fundraising.wikimedia.org/">Anonymous: Well Done! Anonymous: What on earth did we do...</a> |
| 76 | + </div> |
| 77 | + <div class='fundraiser-bar'> |
| 78 | + <a href="http://fundraising.wikimedia.org/"><img src="http://upload.wikimedia.org/fundraising/2007/meter.png" width='407' height='14' /></a> |
| 79 | + </div> |
| 80 | + </td> |
| 81 | + <td width="109" height="75"> |
| 82 | + <a href="http://fundraising.wikimedia.org/"><img src="http://upload.wikimedia.org/wikipedia/commons/a/ab/Movie.png" alt="Video" /></a> |
| 83 | + </td> |
| 84 | + </tr> |
| 85 | +</table> |
| 86 | +EOT; |
| 87 | + } |
| 88 | +} |
| 89 | + |
28 | 90 | ?> |
\ No newline at end of file |