new skin: modern
authorRiver Tarnell <river@users.mediawiki.org>
Wed, 16 Jan 2008 02:15:06 +0000 (02:15 +0000)
committerRiver Tarnell <river@users.mediawiki.org>
Wed, 16 Jan 2008 02:15:06 +0000 (02:15 +0000)
skins/Modern.deps.php [new file with mode: 0644]
skins/Modern.php [new file with mode: 0644]
skins/modern/bullet.gif [new file with mode: 0644]
skins/modern/discussionitem_icon.gif [new file with mode: 0644]
skins/modern/external.png [new file with mode: 0644]
skins/modern/file_icon.gif [new file with mode: 0644]
skins/modern/footer-grad.png [new file with mode: 0644]
skins/modern/link_icon.gif [new file with mode: 0644]
skins/modern/lock_icon.gif [new file with mode: 0644]
skins/modern/mail_icon.gif [new file with mode: 0644]
skins/modern/main.css [new file with mode: 0644]

diff --git a/skins/Modern.deps.php b/skins/Modern.deps.php
new file mode 100644 (file)
index 0000000..73adcb4
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+// This file exists to ensure that base classes are preloaded before
+// Simple.php is compiled, working around a bug in the APC opcode
+// cache on PHP 5, where cached code can break if the include order
+// changed on a subsequent page view.
+// see http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+require_once( dirname(__FILE__) . '/Modern.php' );
+
diff --git a/skins/Modern.php b/skins/Modern.php
new file mode 100644 (file)
index 0000000..dae4438
--- /dev/null
@@ -0,0 +1,279 @@
+<?php
+/**
+ * Modern skin, derived from monobook template.
+ *
+ * @todo document
+ * @addtogroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * Inherit main code from SkinTemplate, set the CSS and template filter.
+ * @todo document
+ * @addtogroup Skins
+ */
+class SkinModern extends SkinTemplate {
+       function initPage( &$out ) {
+               SkinTemplate::initPage( $out );
+               $this->skinname  = 'modern';
+               $this->stylename = 'modern';
+               $this->template  = 'ModernTemplate';
+       }
+}
+
+/**
+ * @todo document
+ * @addtogroup Skins
+ */
+class ModernTemplate extends QuickTemplate {
+       /**
+        * Template filter callback for Modern skin.
+        * Takes an associative array of data set from a SkinTemplate-based
+        * class, and a wrapper for MediaWiki's localization database, and
+        * outputs a formatted page.
+        *
+        * @access private
+        */
+       function execute() {
+               global $wgUser;
+               $skin = $wgUser->getSkin();
+
+               // Suppress warnings to prevent notices about missing indexes in $this->data
+               wfSuppressWarnings();
+
+?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="<?php $this->text('xhtmldefaultnamespace') ?>" <?php 
+       foreach($this->data['xhtmlnamespaces'] as $tag => $ns) {
+               ?>xmlns:<?php echo "{$tag}=\"{$ns}\" ";
+       } ?>xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>">
+       <head>
+               <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" />
+               <?php $this->html('headlinks') ?>
+               <title><?php $this->text('pagetitle') ?></title>
+               <style type="text/css" media="screen, projection">/*<![CDATA[*/
+                       @import "<?php $this->text('stylepath') ?>/common/shared.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
+                       @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?<?php echo $GLOBALS['wgStyleVersion'] ?>";
+               /*]]>*/</style>
+               <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css?<?php echo $GLOBALS['wgStyleVersion'] ?>" />
+               <!--[if lt IE 7]><meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+               
+               <?php print Skin::makeGlobalVariablesScript( $this->data ); ?>
+                
+               <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"><!-- wikibits js --></script>
+               <!-- Head Scripts -->
+<?php $this->html('headscripts') ?>
+<?php  if($this->data['jsvarurl'  ]) { ?>
+               <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl'  ) ?>"><!-- site js --></script>
+<?php  } ?>
+<?php  if($this->data['pagecss'   ]) { ?>
+               <style type="text/css"><?php $this->html('pagecss'   ) ?></style>
+<?php  }
+               if($this->data['usercss'   ]) { ?>
+               <style type="text/css"><?php $this->html('usercss'   ) ?></style>
+<?php  }
+               if($this->data['userjs'    ]) { ?>
+               <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script>
+<?php  }
+               if($this->data['userjsprev']) { ?>
+               <script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script>
+<?php  }
+               if($this->data['trackbackhtml']) print $this->data['trackbackhtml']; ?>
+       </head>
+<body<?php if($this->data['body_ondblclick']) { ?> ondblclick="<?php $this->text('body_ondblclick') ?>"<?php } ?>
+<?php if($this->data['body_onload'    ]) { ?> onload="<?php     $this->text('body_onload')     ?>"<?php } ?>
+ class="mediawiki <?php $this->text('nsclass') ?> <?php $this->text('dir') ?> <?php $this->text('pageclass') ?>">
+
+       <!-- heading -->
+       <div id="mw_header">
+               <h1 id="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
+       </div>
+
+       <div id="mw_main">
+
+       <div id="mw_portlets">
+
+       <!-- other portlets -->
+       <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?>
+       <div class='portlet' id='p-<?php echo Sanitizer::escapeId($bar) ?>'<?php echo $skin->tooltip('p-'.$bar) ?>>
+               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
+               <div class='pBody'>
+                       <ul>
+<?php                  foreach($cont as $key => $val) { ?>
+                               <li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
+                                       if ( $val['active'] ) { ?> class="active" <?php }
+                               ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
+<?php                  } ?>
+                       </ul>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+       <?php } ?>
+
+       <!-- search -->
+       <div id="p-search" class="portlet">
+               <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+               <div id="searchBody" class="pBody">
+                       <form action="<?php $this->text('searchaction') ?>" id="searchform"><div>
+                               <input id="searchInput" name="search" type="text"<?php echo $skin->tooltipAndAccesskey('search');
+                                       if( isset( $this->data['search'] ) ) {
+                                               ?> value="<?php $this->text('search') ?>"<?php } ?> />
+                               <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
+                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+                       </div></form>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+
+       <!-- toolbox -->
+       <div class="portlet" id="p-tb">
+               <h5><?php $this->msg('toolbox') ?></h5>
+               <div class="pBody">
+                       <ul>
+<?php
+               if($this->data['notspecialpage']) { ?>
+                               <li id="t-whatlinkshere"><a href="<?php
+                               echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
+<?php
+                       if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
+                               <li id="t-recentchangeslinked"><a href="<?php
+                               echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked') ?></a></li>
+<?php          }
+               }
+               if(isset($this->data['nav_urls']['trackbacklink'])) { ?>
+                       <li id="t-trackbacklink"><a href="<?php
+                               echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
+<?php  }
+               if($this->data['feeds']) { ?>
+                       <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
+                                       ?><span id="feed-<?php echo Sanitizer::escapeId($key) ?>"><a href="<?php
+                                       echo htmlspecialchars($feed['href']) ?>"<?php echo $skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;</span>
+                                       <?php } ?></li><?php
+               }
+
+               foreach( array('contributions', 'log', 'blockip', 'emailuser', 'upload', 'specialpages') as $special ) {
+
+                       if($this->data['nav_urls'][$special]) {
+                               ?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
+<?php          }
+               }
+
+               if(!empty($this->data['nav_urls']['print']['href'])) { ?>
+                               <li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
+               }
+
+               if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
+                               <li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
+                               ?>"<?php echo $skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
+               } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
+                               <li id="t-ispermalink"<?php echo $skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
+               }
+?>
+                       </ul>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+
+       <!-- languages -->
+<?php
+               if( $this->data['language_urls'] ) { ?>
+       <div id="p-lang" class="portlet">
+               <h5><?php $this->msg('otherlanguages') ?></h5>
+               <div class="pBody">
+                       <ul>
+<?php          foreach($this->data['language_urls'] as $langlink) { ?>
+                               <li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
+                               ?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
+<?php          } ?>
+                       </ul>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+<?php  } ?>
+
+       </div><!-- mw_portlets -->
+
+       <!-- navigation portlet -->
+       <div id="p-cactions" class="portlet">
+               <h5><?php $this->msg('views') ?></h5>
+               <div class="pBody">
+                       <ul>
+       <?php                   foreach($this->data['content_actions'] as $key => $tab) { ?>
+                                <li id="ca-<?php echo Sanitizer::escapeId($key) ?>"<?php
+                                               if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php }
+                                        ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"<?php echo $skin->tooltipAndAccesskey('ca-'.$key) ?>><?php
+                                        echo htmlspecialchars($tab['text']) ?></a></li>
+       <?php                    } ?>
+                       </ul>
+               </div>
+       </div>
+
+       <!-- content -->
+       <div id="mw_content">
+                       <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+
+                       <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
+                       <div id="contentSub"><?php $this->html('subtitle') ?></div>
+
+                       <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
+                       <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk')  ?></div><?php } ?>
+                       <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#column-one"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
+
+                       <?php $this->html('bodytext') ?>
+                       <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php       $this->html('catlinks') ?></div><?php } ?>
+       </div><!-- mw_content -->
+
+       </div><!-- main -->
+
+       <div id="mw_clear"></div>
+
+       <!-- personal portlet -->
+       <div class="portlet" id="p-personal">
+               <h5><?php $this->msg('personaltools') ?></h5>
+               <div class="pBody">
+                       <ul>
+<?php                  foreach($this->data['personal_urls'] as $key => $item) { ?>
+                               <li id="pt-<?php echo Sanitizer::escapeId($key) ?>"<?php
+                                       if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
+                               echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
+                               if(!empty($item['class'])) { ?> class="<?php
+                               echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
+                               echo htmlspecialchars($item['text']) ?></a></li>
+<?php                  } ?>
+                       </ul>
+               </div>
+       </div>
+
+
+       <!-- footer --> 
+       <div id="footer">
+                       <ul id="f-list">
+<?php
+               $footerlinks = array(
+                       'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
+                       'privacy', 'about', 'disclaimer', 'tagline',
+               );
+               foreach( $footerlinks as $aLink ) {
+                       if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+?>                             <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
+<?php          }
+               }
+?>
+                       </ul>
+       </div>
+
+       <?php $this->html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?>
+<?php $this->html('reporttime') ?>
+<?php if ( $this->data['debug'] ): ?>
+<!-- Debug output:
+<?php $this->text( 'debug' ); ?>
+-->
+<?php endif; ?>
+</body></html>
+<?php
+       wfRestoreWarnings();
+       } // end of execute() method
+} // end of class
+?>
diff --git a/skins/modern/bullet.gif b/skins/modern/bullet.gif
new file mode 100644 (file)
index 0000000..b43de48
Binary files /dev/null and b/skins/modern/bullet.gif differ
diff --git a/skins/modern/discussionitem_icon.gif b/skins/modern/discussionitem_icon.gif
new file mode 100644 (file)
index 0000000..baec471
Binary files /dev/null and b/skins/modern/discussionitem_icon.gif differ
diff --git a/skins/modern/external.png b/skins/modern/external.png
new file mode 100644 (file)
index 0000000..419c06f
Binary files /dev/null and b/skins/modern/external.png differ
diff --git a/skins/modern/file_icon.gif b/skins/modern/file_icon.gif
new file mode 100644 (file)
index 0000000..847f648
Binary files /dev/null and b/skins/modern/file_icon.gif differ
diff --git a/skins/modern/footer-grad.png b/skins/modern/footer-grad.png
new file mode 100644 (file)
index 0000000..6f61d61
Binary files /dev/null and b/skins/modern/footer-grad.png differ
diff --git a/skins/modern/link_icon.gif b/skins/modern/link_icon.gif
new file mode 100644 (file)
index 0000000..815ccb1
Binary files /dev/null and b/skins/modern/link_icon.gif differ
diff --git a/skins/modern/lock_icon.gif b/skins/modern/lock_icon.gif
new file mode 100644 (file)
index 0000000..8a87e28
Binary files /dev/null and b/skins/modern/lock_icon.gif differ
diff --git a/skins/modern/mail_icon.gif b/skins/modern/mail_icon.gif
new file mode 100644 (file)
index 0000000..50a87a9
Binary files /dev/null and b/skins/modern/mail_icon.gif differ
diff --git a/skins/modern/main.css b/skins/modern/main.css
new file mode 100644 (file)
index 0000000..f3a3eb0
--- /dev/null
@@ -0,0 +1,279 @@
+body {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       font-size: 10pt;
+
+       font-family: sans-serif;
+       color: black;
+       background-color: #f0f0f0;
+}
+
+#mw_header {
+       position: absolute;
+       top: 0;
+       left: 0;
+       margin: 0 0 0 0;
+       padding: 0 0em 0 0em;
+       border: none;
+       height: 2em;
+       width: 100%;
+
+       background-color: #003366;
+       color: white;
+}
+
+#mw_header h1 {
+       margin: 0 0 0 0.5em;
+       padding: 0 0 0 0;
+       text-decoration: none;
+       font-size: 150%;
+}
+
+#p-personal {
+       position: absolute;
+       top: 2em;
+       left: 0;
+       height: 1.5em;
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       width: 100%;
+
+}
+
+#p-personal div.pBody {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       height: 1.5em;
+       font-variant: small-caps;
+}
+
+#p-personal h5 {
+       display: none;
+}
+
+#p-personal ul {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       display: block;
+       height: 1.5em;
+       background-color: #3c78b5;
+}
+
+#p-personal li {
+       display: block; float: left;
+       height: 1.5em;
+       margin: 0 0 0 0;
+       vertical-align: middle;
+
+       font-weight: bold;
+       text-transform: lowercase;
+}
+
+#p-personal li a {
+       text-decoration: none;
+       color: white;
+       padding: 0 1em 0 1em;
+}
+
+#p-personal li a:hover {
+       text-decoration: none;
+       color: white;
+}
+
+#p-personal li:hover {
+       background-color: #003366;
+}
+
+#jump-to-nav {
+       display: none;
+}
+
+#mw_content {
+       margin: 0 0 0 14em;
+
+       background-color: white;
+       border-top: solid 1px #bbbbbb;
+       border-left: solid 1px #bbbbbb;
+       border-bottom: solid 1px #bbbbbb;
+
+       line-height: 1.5em;
+       padding: 1em 1em 1em 1em;
+}
+
+#mw_portlets {
+       width: 14em;
+       float: left;
+       
+       border-right: solid 1px #bbbbbb;
+       background-color: #f0f0f0;
+}
+
+#mw_main {
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+       margin-top: 3.5em;
+}
+
+#mw_clear {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       clear: both;
+}
+
+.portlet {
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+}
+
+.portlet div.pBody {
+       padding: 1em 0 1em 0;
+}
+
+#searchBody {
+       text-align: center;
+}
+
+#searchInput {
+       display: block;
+       margin-left: auto;
+       margin-right: auto;
+       clear: both;
+}
+
+.portlet h5 {
+       padding: 0.3em 0 0.3em 1em;
+       margin: 0 0 0 0;
+       background-color: #dddddd;
+       font-weight: bold;
+       border-bottom: solid 1px #3c78b5;
+}
+
+.portlet ul {
+       margin: 0 0 0 1.5em;
+       padding: 0 0 0 0;
+}
+
+li {
+       list-style-image: url(bullet.gif);
+}
+
+#p-cactions {
+       height: 1.5em;
+       display: block;
+       padding: 0 0 0 0;
+}
+
+#p-cactions div.pBody {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+#p-cactions a,
+#p-cactions a:hover {
+       color: black;
+       text-decoration: none;
+}
+
+#p-cactions ul {
+       display: inline;
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+#p-cactions li {
+       margin: 0 0.5em 0 0.5em;
+       padding: 0 0.2em 0 0.2em;
+       display: block;
+       float: left;
+       height: 1.5em;
+       text-transform: lowercase;
+}
+
+#p-cactions li.selected {
+       background-color: #bbbbbb;
+}
+
+#p-cactions li a,
+#p-cactions li a:hover,
+#p-cactions li a:visited {
+       text-decoration: underline;
+       color: #003366;
+}
+
+#p-cactions li.selected a,
+#p-cactions li.selected a:hover,
+#p-cactions li.selected a:visited {
+       text-decoration: none;
+       color: white;
+}
+
+#p-cactions h5 {
+       display: none;
+}
+
+#siteSub {
+       display: none;
+}
+
+#footer {
+       background-color: #f0f0f0;
+       background: url(footer-grad.png) repeat-x 0 0;
+       padding: 10px 1em 0 1em;
+
+       color: #444444;
+}
+
+#footer a,
+#footer a:hover,
+#footer a:visited {
+       color: #444444;
+       text-decoration: underline;
+}
+
+img {
+       border: none;
+}
+
+#footer li {
+       display: inline;
+       list-style-type: none;
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+}
+
+#footer ul {
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+}
+
+div.printfooter {
+       display: none;
+}
+
+p {
+       margin: 0 0 0 0;
+}
+
+#contentSub {
+       color: #888;
+       font-size: small;
+       padding-left: 2em;
+}
+
+#mw_portlets form {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+a, a:hover, a:visited {
+       text-decoration: underline;
+       color: #003366;
+}
+
+span.editsection {
+       font-size: small;
+}
+
+h1, h2 {
+       border-bottom: solid 1px #003366;
+}