r26386 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26385‎ | r26386 | r26387 >
Date:20:20, 3 October 2007
Author:brion
Status:old
Tags:
Comment:
temp demo from sandy's mock-up...
Modified paths:
  • /trunk/extensions/CentralNotice/CentralNotice.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeLoader.php (modified) (history)
  • /trunk/extensions/CentralNotice/SpecialNoticeText.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CentralNotice/SpecialNoticeLoader.php
@@ -20,7 +20,7 @@
2121 * 10 minutes?
2222 */
2323 protected function maxAge() {
24 - return 600;
 24+ return 0;
2525 }
2626
2727 function getJsOutput() {
Index: trunk/extensions/CentralNotice/CentralNotice.php
@@ -3,7 +3,8 @@
44 // http://meta.wikimedia.org/wiki/Special:NoticeLoader
55 $wgNoticeLoader = 'http://smorgasbord.local/trunk/index.php/Special:NoticeLoader';
66 $wgNoticeText = 'http://smorgasbord.local/trunk/index.php/Special:NoticeText';
7 -$wgNoticeEpoch = '20071003015645';
 7+//$wgNoticeEpoch = '20071003183510';
 8+$wgNoticeEpoch = gmdate( 'YmdHis', @filemtime( dirname( __FILE__ ) . '/SpecialNoticeText.php' ) );
89
910 function wfCentralNotice( &$notice ) {
1011 global $wgNoticeLoader;
Index: trunk/extensions/CentralNotice/SpecialNoticeText.php
@@ -17,11 +17,73 @@
1818
1919 function getJsOutput() {
2020 global $wgSiteNotice;
21 - $encNotice = Xml::escapeJsString( $wgSiteNotice );
 21+ $encNotice = Xml::escapeJsString( $this->getHtmlNotice() );
2222 return <<<EOT
2323 wgNotice = "$encNotice";
2424 EOT;
2525 }
 26+
 27+ function getHtmlNotice() {
 28+ return <<<EOT
 29+<style type="text/css">
 30+.fundraiser-box {
 31+ margin-top: 12px;
2632 }
 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+}
2762
 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+
2890 ?>
\ No newline at end of file

Status & tagging log