checked in skins, courtesy of djbclark
authorMatt Lee <mattl@gnu.org>
Mon, 20 Jul 2009 20:57:49 +0000 (20:57 +0000)
committerMatt Lee <mattl@gnu.org>
Mon, 20 Jul 2009 20:57:49 +0000 (20:57 +0000)
196 files changed:
skins/Chick.deps.php [new file with mode: 0644]
skins/Chick.php [new file with mode: 0644]
skins/CologneBlue.php [new file with mode: 0644]
skins/Modern.deps.php [new file with mode: 0644]
skins/Modern.php [new file with mode: 0644]
skins/MonoBook.deps.php [new file with mode: 0644]
skins/MonoBook.php [new file with mode: 0644]
skins/MySkin.deps.php [new file with mode: 0644]
skins/MySkin.php [new file with mode: 0644]
skins/Nostalgia.php [new file with mode: 0644]
skins/Simple.deps.php [new file with mode: 0644]
skins/Simple.php [new file with mode: 0644]
skins/Skin.sample [new file with mode: 0644]
skins/Standard.php [new file with mode: 0644]
skins/chick/IE50Fixes.css [new file with mode: 0644]
skins/chick/IE55Fixes.css [new file with mode: 0644]
skins/chick/IE60Fixes.css [new file with mode: 0644]
skins/chick/main.css [new file with mode: 0644]
skins/common/IEFixes.js [new file with mode: 0644]
skins/common/ajax.js [new file with mode: 0644]
skins/common/ajaxwatch.js [new file with mode: 0644]
skins/common/allmessages.js [new file with mode: 0644]
skins/common/block.js [new file with mode: 0644]
skins/common/cologneblue.css [new file with mode: 0644]
skins/common/commonPrint.css [new file with mode: 0644]
skins/common/common_rtl.css [new file with mode: 0644]
skins/common/diff.css [new file with mode: 0644]
skins/common/diff.js [new file with mode: 0644]
skins/common/edit.js [new file with mode: 0644]
skins/common/enhancedchanges.js [new file with mode: 0644]
skins/common/feed.css [new file with mode: 0644]
skins/common/history.js [new file with mode: 0644]
skins/common/images/Arr_.png [new file with mode: 0644]
skins/common/images/Arr_d.png [new file with mode: 0644]
skins/common/images/Arr_l.png [new file with mode: 0644]
skins/common/images/Arr_r.png [new file with mode: 0644]
skins/common/images/Arr_r.xcf [new file with mode: 0644]
skins/common/images/Arr_u.png [new file with mode: 0644]
skins/common/images/Checker-16x16.png [new file with mode: 0644]
skins/common/images/Zoom_sans.gif [new file with mode: 0644]
skins/common/images/ar/button_bold.png [new file with mode: 0644]
skins/common/images/ar/button_headline.png [new file with mode: 0644]
skins/common/images/ar/button_italic.png [new file with mode: 0644]
skins/common/images/ar/button_link.png [new file with mode: 0644]
skins/common/images/ar/button_nowiki.png [new file with mode: 0644]
skins/common/images/arrow_disabled_first_25.png [new file with mode: 0644]
skins/common/images/arrow_disabled_last_25.png [new file with mode: 0644]
skins/common/images/arrow_disabled_left_25.png [new file with mode: 0644]
skins/common/images/arrow_disabled_right_25.png [new file with mode: 0644]
skins/common/images/arrow_first.svg [new file with mode: 0644]
skins/common/images/arrow_first_25.png [new file with mode: 0644]
skins/common/images/arrow_last_25.png [new file with mode: 0644]
skins/common/images/arrow_left.svg [new file with mode: 0644]
skins/common/images/arrow_left_25.png [new file with mode: 0644]
skins/common/images/arrow_right_25.png [new file with mode: 0644]
skins/common/images/be-tarask/button_bold.png [new file with mode: 0644]
skins/common/images/be-tarask/button_italic.png [new file with mode: 0644]
skins/common/images/be-tarask/button_link.png [new file with mode: 0644]
skins/common/images/bullet.gif [new file with mode: 0644]
skins/common/images/button_bold.png [new file with mode: 0644]
skins/common/images/button_extlink.png [new file with mode: 0644]
skins/common/images/button_headline.png [new file with mode: 0644]
skins/common/images/button_hr.png [new file with mode: 0644]
skins/common/images/button_image.png [new file with mode: 0644]
skins/common/images/button_italic.png [new file with mode: 0644]
skins/common/images/button_link.png [new file with mode: 0644]
skins/common/images/button_math.png [new file with mode: 0644]
skins/common/images/button_media.png [new file with mode: 0644]
skins/common/images/button_nowiki.png [new file with mode: 0644]
skins/common/images/button_sig.png [new file with mode: 0644]
skins/common/images/button_template.png [new file with mode: 0644]
skins/common/images/cyrl/button_bold.png [new file with mode: 0644]
skins/common/images/cyrl/button_italic.png [new file with mode: 0644]
skins/common/images/cyrl/button_link.png [new file with mode: 0644]
skins/common/images/de/button_bold.png [new file with mode: 0644]
skins/common/images/de/button_italic.png [new file with mode: 0644]
skins/common/images/diffunderline.gif [new file with mode: 0644]
skins/common/images/fa/button_bold.png [new file with mode: 0644]
skins/common/images/fa/button_headline.png [new file with mode: 0644]
skins/common/images/fa/button_italic.png [new file with mode: 0644]
skins/common/images/fa/button_link.png [new file with mode: 0644]
skins/common/images/fa/button_nowiki.png [new file with mode: 0644]
skins/common/images/fileicon.xcf [new file with mode: 0644]
skins/common/images/gnu-fdl.png [new file with mode: 0644]
skins/common/images/gnu-fdl.xcf [new file with mode: 0644]
skins/common/images/groups-logo.png [new file with mode: 0644]
skins/common/images/icons/fileicon-c.png [new file with mode: 0644]
skins/common/images/icons/fileicon-cpp.png [new file with mode: 0644]
skins/common/images/icons/fileicon-deb.png [new file with mode: 0644]
skins/common/images/icons/fileicon-djvu.png [new file with mode: 0644]
skins/common/images/icons/fileicon-djvu.xcf [new file with mode: 0644]
skins/common/images/icons/fileicon-dvi.png [new file with mode: 0644]
skins/common/images/icons/fileicon-exe.png [new file with mode: 0644]
skins/common/images/icons/fileicon-h.png [new file with mode: 0644]
skins/common/images/icons/fileicon-html.png [new file with mode: 0644]
skins/common/images/icons/fileicon-iso.png [new file with mode: 0644]
skins/common/images/icons/fileicon-java.png [new file with mode: 0644]
skins/common/images/icons/fileicon-mid.png [new file with mode: 0644]
skins/common/images/icons/fileicon-mov.png [new file with mode: 0644]
skins/common/images/icons/fileicon-o.png [new file with mode: 0644]
skins/common/images/icons/fileicon-ogg.png [new file with mode: 0644]
skins/common/images/icons/fileicon-ogg.xcf [new file with mode: 0644]
skins/common/images/icons/fileicon-pdf.png [new file with mode: 0644]
skins/common/images/icons/fileicon-ps.png [new file with mode: 0644]
skins/common/images/icons/fileicon-rm.png [new file with mode: 0644]
skins/common/images/icons/fileicon-rpm.png [new file with mode: 0644]
skins/common/images/icons/fileicon-svg.png [new file with mode: 0644]
skins/common/images/icons/fileicon-tar.png [new file with mode: 0644]
skins/common/images/icons/fileicon-tex.png [new file with mode: 0644]
skins/common/images/icons/fileicon-ttf.png [new file with mode: 0644]
skins/common/images/icons/fileicon-txt.png [new file with mode: 0644]
skins/common/images/icons/fileicon.png [new file with mode: 0644]
skins/common/images/ksh/button_S_italic.png [new file with mode: 0644]
skins/common/images/link_icon.gif [new file with mode: 0644]
skins/common/images/magnify-clip.png [new file with mode: 0644]
skins/common/images/mediawiki-small.xcf [new file with mode: 0644]
skins/common/images/mediawiki.png [new file with mode: 0644]
skins/common/images/poweredby_mediawiki_88x31.png [new file with mode: 0644]
skins/common/images/public-domain.png [new file with mode: 0644]
skins/common/images/redirectltr.png [new file with mode: 0644]
skins/common/images/redirectrtl.png [new file with mode: 0644]
skins/common/images/sort_down.gif [new file with mode: 0644]
skins/common/images/sort_none.gif [new file with mode: 0644]
skins/common/images/sort_up.gif [new file with mode: 0644]
skins/common/images/spinner.gif [new file with mode: 0644]
skins/common/images/tooltip_icon.png [new file with mode: 0644]
skins/common/images/wiki.png [new file with mode: 0644]
skins/common/metadata.js [new file with mode: 0644]
skins/common/mwsuggest.js [new file with mode: 0644]
skins/common/nostalgia.css [new file with mode: 0644]
skins/common/oldshared.css [new file with mode: 0644]
skins/common/prefs.js [new file with mode: 0644]
skins/common/preview.js [new file with mode: 0644]
skins/common/protect.js [new file with mode: 0644]
skins/common/quickbar-right.css [new file with mode: 0644]
skins/common/quickbar.css [new file with mode: 0644]
skins/common/rightclickedit.js [new file with mode: 0644]
skins/common/shared.css [new file with mode: 0644]
skins/common/sticky.js [new file with mode: 0644]
skins/common/upload.js [new file with mode: 0644]
skins/common/wikibits.js [new file with mode: 0644]
skins/common/wikiprintable.css [new file with mode: 0644]
skins/common/wikistandard.css [new file with mode: 0644]
skins/disabled/MonoBook.tpl [new file with mode: 0644]
skins/disabled/MonoBookCBT.php [new file with mode: 0644]
skins/modern/audio.png [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/document.png [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]
skins/modern/news_icon.png [new file with mode: 0644]
skins/modern/print.css [new file with mode: 0644]
skins/modern/rtl.css [new file with mode: 0644]
skins/modern/video.png [new file with mode: 0644]
skins/monobook/IE50Fixes.css [new file with mode: 0644]
skins/monobook/IE55Fixes.css [new file with mode: 0644]
skins/monobook/IE60Fixes.css [new file with mode: 0644]
skins/monobook/IE70Fixes.css [new file with mode: 0644]
skins/monobook/IEMacFixes.css [new file with mode: 0644]
skins/monobook/KHTMLFixes.css [new file with mode: 0644]
skins/monobook/Opera6Fixes.css [new file with mode: 0644]
skins/monobook/Opera7Fixes.css [new file with mode: 0644]
skins/monobook/audio.png [new file with mode: 0644]
skins/monobook/bullet.gif [new file with mode: 0644]
skins/monobook/discussionitem_icon.gif [new file with mode: 0644]
skins/monobook/document.png [new file with mode: 0644]
skins/monobook/external.png [new file with mode: 0644]
skins/monobook/file_icon.gif [new file with mode: 0644]
skins/monobook/headbg.jpg [new file with mode: 0644]
skins/monobook/link_icon.gif [new file with mode: 0644]
skins/monobook/lock_icon.gif [new file with mode: 0644]
skins/monobook/magnify-clip.png [new file with mode: 0644]
skins/monobook/mail_icon.gif [new file with mode: 0644]
skins/monobook/main.css [new file with mode: 0644]
skins/monobook/news_icon.png [new file with mode: 0644]
skins/monobook/required.gif [new file with mode: 0644]
skins/monobook/rtl.css [new file with mode: 0644]
skins/monobook/user.gif [new file with mode: 0644]
skins/monobook/video.png [new file with mode: 0644]
skins/monobook/wiki-indexed.png [new file with mode: 0644]
skins/monobook/wiki.png [new file with mode: 0644]
skins/myskin/main.css [new file with mode: 0644]
skins/simple/discussionitem_icon.gif [new file with mode: 0644]
skins/simple/external.png [new file with mode: 0644]
skins/simple/file_icon.gif [new file with mode: 0644]
skins/simple/link_icon.gif [new file with mode: 0644]
skins/simple/lock_icon.gif [new file with mode: 0644]
skins/simple/mail_icon.gif [new file with mode: 0644]
skins/simple/main.css [new file with mode: 0644]
skins/simple/rtl.css [new file with mode: 0644]

diff --git a/skins/Chick.deps.php b/skins/Chick.deps.php
new file mode 100644 (file)
index 0000000..a7cb084
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+// This file exists to ensure that base classes are preloaded before
+// Chick.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://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+require_once( dirname(__FILE__) . '/MonoBook.php' );
+
diff --git a/skins/Chick.php b/skins/Chick.php
new file mode 100644 (file)
index 0000000..a95a72c
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/** */
+require_once( dirname(__FILE__) . '/MonoBook.php' );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinChick extends SkinTemplate {
+       function initPage( OutputPage $out ) {
+               SkinTemplate::initPage( $out );
+               $this->skinname  = 'chick';
+               $this->stylename = 'chick';
+               $this->template  = 'MonoBookTemplate';
+       }
+
+       function setupSkinUserCss( OutputPage $out ){
+               parent::setupSkinUserCss( $out );
+               // Append to the default screen common & print styles...
+               $out->addStyle( 'chick/main.css', 'screen,handheld' );
+               $out->addStyle( 'chick/IE50Fixes.css', 'screen,handheld', 'lt IE 5.5000' );
+               $out->addStyle( 'chick/IE55Fixes.css', 'screen,handheld', 'IE 5.5000' );
+               $out->addStyle( 'chick/IE60Fixes.css', 'screen,handheld', 'IE 6' );
+       }
+}
+
+
diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php
new file mode 100644 (file)
index 0000000..f3806dc
--- /dev/null
@@ -0,0 +1,311 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinCologneBlue extends Skin {
+
+       function getStylesheet() {
+               return 'common/cologneblue.css';
+       }
+       function getSkinName() {
+               return "cologneblue";
+       }
+
+       function doBeforeContent() {
+
+               $s = "";
+               $qb = $this->qbSetting();
+               $mainPageObj = Title::newMainPage();
+
+               $s .= "\n<div id='content'>\n<div id='topbar'>" .
+                 "<table width='100%' border='0' cellspacing='0' cellpadding='8'><tr>";
+
+               $s .= "<td class='top' align='left' valign='middle' nowrap='nowrap'>";
+               $s .= "<a href=\"" . $mainPageObj->escapeLocalURL() . "\">";
+               $s .= "<span id='sitetitle'>" . wfMsg( "sitetitle" ) . "</span></a>";
+
+               $s .= "</td><td class='top' align='right' valign='bottom' width='100%'>";
+               $s .= $this->sysLinks();
+               $s .= "</td></tr><tr><td valign='top'>";
+
+               $s .= "<font size='-1'><span id='sitesub'>";
+               $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . "</span></font>";
+               $s .= "</td><td align='right'>" ;
+
+               $s .= "<font size='-1'><span id='langlinks'>" ;
+               $s .= str_replace ( "<br />" , "" , $this->otherLanguages() );
+               $cat = $this->getCategoryLinks();
+               if( $cat ) $s .= "<br />$cat\n";
+               $s .= "<br />" . $this->pageTitleLinks();
+               $s .= "</span></font>";
+
+               $s .= "</td></tr></table>\n";
+
+               $s .= "\n</div>\n<div id='article'>";
+
+               $notice = wfGetSiteNotice();
+               if( $notice ) {
+                       $s .= "\n<div id='siteNotice'>$notice</div>\n";
+               }
+               $s .= $this->pageTitle();
+               $s .= $this->pageSubtitle() . "\n";
+               return $s;
+       }
+
+       function doAfterContent()
+       {
+               global $wgOut;
+
+               $s = "\n</div><br clear='all' />\n";
+
+               $s .= "\n<div id='footer'>";
+               $s .= "<table width='98%' border='0' cellspacing='0'><tr>";
+
+               $qb = $this->qbSetting();
+               if ( 1 == $qb || 3 == $qb ) { # Left
+                       $s .= $this->getQuickbarCompensator();
+               }
+               $s .= "<td class='bottom' align='center' valign='top'>";
+
+               $s .= $this->bottomLinks();
+               $s .= "\n<br />" . $this->makeKnownLinkObj( Title::newMainPage() ) . " | "
+                 . $this->aboutLink() . " | "
+                 . $this->searchForm( wfMsg( "qbfind" ) );
+
+               $s .= "\n<br />" . $this->pageStats();
+
+               $s .= "</td>";
+               if ( 2 == $qb ) { # Right
+                       $s .= $this->getQuickbarCompensator();
+               }
+               $s .= "</tr></table>\n</div>\n</div>\n";
+
+               if ( 0 != $qb ) { $s .= $this->quickBar(); }
+               return $s;
+       }
+
+       function reallyGenerateUserStylesheet() {
+               $s = parent::reallyGenerateUserStylesheet();
+               $qb = $this->qbSetting();
+
+               if ( 2 == $qb ) { # Right
+                       $s .= "#quickbar { position: absolute; right: 4px; }\n" .
+                         "#article { margin-left: 4px; margin-right: 148px; }\n";
+               } else if ( 1 == $qb ) {
+                       $s .= "#quickbar { position: absolute; left: 4px; }\n" .
+                         "#article { margin-left: 148px; margin-right: 4px; }\n";
+               } else if ( 3 == $qb ) { # Floating left
+                       $s .= "#quickbar { position:absolute; left:4px } \n" .
+                         "#topbar { margin-left: 148px }\n" .
+                         "#article { margin-left:148px; margin-right: 4px; } \n" .
+                         "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE
+               } else if ( 4 == $qb ) { # Floating right
+                       $s .= "#quickbar { position: fixed; right: 4px; } \n" .
+                         "#topbar { margin-right: 148px }\n" .
+                         "#article { margin-right: 148px; margin-left: 4px; } \n" .
+                         "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE
+               }
+               return $s;
+       }
+
+       function sysLinks() {
+               global $wgUser, $wgContLang, $wgTitle;
+               $li = $wgContLang->specialPage("Userlogin");
+               $lo = $wgContLang->specialPage("Userlogout");
+
+               $rt = $wgTitle->getPrefixedURL();
+               if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) {
+                       $q = "";
+               } else {
+                       $q = "returnto={$rt}";
+               }
+
+               $s = "" .
+                 $this->mainPageLink()
+                 . " | " .
+                 $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) )
+                 . " | " .
+                 $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) )
+                 . " | " .
+                 $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
+                 . " | " .
+                 $this->specialLink( "specialpages" );
+
+               /* show links to different language variants */
+               $s .= $this->variantLinks();
+               $s .= $this->extensionTabLinks();
+               
+               $s .= " | ";
+               if ( $wgUser->isLoggedIn() ) {
+                       $s .=  $this->makeKnownLink( $lo, wfMsg( "logout" ), $q );
+               } else {
+                       $s .=  $this->makeKnownLink( $li, wfMsg( "login" ), $q );
+               }
+
+               return $s;
+       }
+
+       /**
+        * Compute the sidebar
+        * @access private
+        */
+       function quickBar()
+       {
+               global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads;
+
+               $tns=$wgTitle->getNamespace();
+
+               $s = "\n<div id='quickbar'>";
+
+               $sep = "<br />";
+               $s .= $this->menuHead( "qbfind" );
+               $s .= $this->searchForm();
+
+               $s .= $this->menuHead( "qbbrowse" );
+
+               # Use the first heading from the Monobook sidebar as the "browse" section
+               $bar = $this->buildSidebar();
+               unset( $bar['SEARCH'] );
+               unset( $bar['LANGUAGES'] );
+               unset( $bar['TOOLBOX'] );
+               $browseLinks = reset( $bar );
+
+               foreach ( $browseLinks as $link ) {
+                       if ( $link['text'] != '-' ) {
+                               $s .= "<a href=\"{$link['href']}\">" .
+                                       htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                       }
+               }
+
+               if ( $wgOut->isArticle() ) {
+                       $s .= $this->menuHead( "qbedit" );
+                       $s .= "<strong>" . $this->editThisPage() . "</strong>";
+
+                       $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) );
+
+                       if( $wgUser->isLoggedIn() ) {
+                               $s .= $sep . $this->moveThisPage();
+                       }
+                       if ( $wgUser->isAllowed('delete') ) {
+                               $dtp = $this->deleteThisPage();
+                               if ( "" != $dtp ) {
+                                       $s .= $sep . $dtp;
+                               }
+                       }
+                       if ( $wgUser->isAllowed('protect') ) {
+                               $ptp = $this->protectThisPage();
+                               if ( "" != $ptp ) {
+                                       $s .= $sep . $ptp;
+                               }
+                       }
+                       $s .= $sep;
+
+                       $s .= $this->menuHead( "qbpageoptions" );
+                       $s .= $this->talkLink()
+                         . $sep . $this->commentLink()
+                         . $sep . $this->printableLink();
+                       if ( $wgUser->isLoggedIn() ) {
+                               $s .= $sep . $this->watchThisPage();
+                       }
+
+                       $s .= $sep;
+
+                       $s .= $this->menuHead("qbpageinfo")
+                         . $this->historyLink()
+                         . $sep . $this->whatLinksHere()
+                         . $sep . $this->watchPageLinksLink();
+
+                       if( $tns == NS_USER || $tns == NS_USER_TALK ) {
+                               $id=User::idFromName($wgTitle->getText());
+                               if ($id != 0) {
+                                       $s .= $sep . $this->userContribsLink();
+                                       if( $this->showEmailUser( $id ) ) {
+                                               $s .= $sep . $this->emailUserLink();
+                                       }
+                               }
+                       }
+                       $s .= $sep;
+               }
+
+               $s .= $this->menuHead( "qbmyoptions" );
+               if ( $wgUser->isLoggedIn() ) {
+                       $name = $wgUser->getName();
+                       $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(),
+                               wfMsg( 'mytalk' ) );
+                       if ( $wgUser->getNewtalk() ) {
+                               $tl .= " *";
+                       }
+
+                       $s .= $this->makeKnownLinkObj( $wgUser->getUserPage(),
+                               wfMsg( "mypage" ) )
+                         . $sep . $tl
+                         . $sep . $this->specialLink( "watchlist" )
+                         . $sep . $this->makeKnownLinkObj( SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ),
+                               wfMsg( "mycontris" ) )
+                         . $sep . $this->specialLink( "preferences" )
+                         . $sep . $this->specialLink( "userlogout" );
+               } else {
+                       $s .= $this->specialLink( "userlogin" );
+               }
+
+               $s .= $this->menuHead( "qbspecialpages" )
+                 . $this->specialLink( "newpages" )
+                 . $sep . $this->specialLink( "imagelist" )
+                 . $sep . $this->specialLink( "statistics" );
+               if ( $wgUser->isLoggedIn() && $wgEnableUploads ) {
+                       $s .= $sep . $this->specialLink( "upload" );
+               }
+               global $wgSiteSupportPage;
+               if( $wgSiteSupportPage) {
+                       $s .= $sep."<a href=\"".htmlspecialchars($wgSiteSupportPage)."\" class =\"internal\">"
+                             .wfMsg( "sitesupport" )."</a>";
+               }
+
+               $s .= $sep . $this->makeKnownLinkObj(
+                       SpecialPage::getTitleFor( 'Specialpages' ),
+                       wfMsg( 'moredotdotdot' ) );
+
+               $s .= $sep . "\n</div>\n";
+               return $s;
+       }
+
+       function menuHead( $key )
+       {
+               $s = "\n<h6>" . wfMsg( $key ) . "</h6>";
+               return $s;
+       }
+
+       function searchForm( $label = "" )
+       {
+               global $wgRequest;
+
+               $search = $wgRequest->getText( 'search' );
+               $action = $this->escapeSearchLink();
+               $s = "<form id=\"searchform{$this->searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">";
+               if ( "" != $label ) { $s .= "{$label}: "; }
+
+               $s .= "<input type='text' id=\"searchInput{$this->searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\""
+                 . htmlspecialchars(substr($search,0,256)) . "\" /><br />"
+                 . "<input type='submit' id=\"searchGoButton{$this->searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( "searcharticle" ) ) . "\" />"
+                 . "<input type='submit' id=\"mw-searchButton{$this->searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>";
+
+               // Ensure unique id's for search boxes made after the first
+               $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1;
+
+               return $s;
+       }
+}
+
+
diff --git a/skins/Modern.deps.php b/skins/Modern.deps.php
new file mode 100644 (file)
index 0000000..e76ab99
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+// This file exists to ensure that base classes are preloaded before
+// Modern.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://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php' );
+
diff --git a/skins/Modern.php b/skins/Modern.php
new file mode 100644 (file)
index 0000000..cb24baf
--- /dev/null
@@ -0,0 +1,370 @@
+<?php
+/**
+ * Modern skin, derived from monobook template.
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * Inherit main code from SkinTemplate, set the CSS and template filter.
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinModern extends SkinTemplate {
+       /*
+        * We don't like the default getPoweredBy, the icon clashes with the 
+        * skin L&F.
+        */
+       function getPoweredBy() {
+               global  $wgVersion;
+               return "<div class='mw_poweredby'>Powered by MediaWiki $wgVersion</div>";
+       }
+
+       function initPage( OutputPage $out ) {
+               parent::initPage( $out );
+               $this->skinname  = 'modern';
+               $this->stylename = 'modern';
+               $this->template  = 'ModernTemplate';
+       }
+       
+       function setupSkinUserCss( OutputPage $out ){
+               // Do not call parent::setupSkinUserCss(), we have our own print style
+               $out->addStyle( 'common/shared.css', 'screen' );
+               $out->addStyle( 'modern/main.css', 'screen' );
+               $out->addStyle( 'modern/print.css', 'print' );
+               $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' );
+       }
+}
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class ModernTemplate extends QuickTemplate {
+       var $skin;
+       /**
+        * 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 $wgRequest;
+               $this->skin = $skin = $this->data['skin'];
+               $action = $wgRequest->getText( 'action' );
+
+               // 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>
+               <?php $this->html('csslinks') ?>
+               <!--[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('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">
+
+       <!-- 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_contentwrapper">
+       <!-- 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) {
+                                       echo '
+                                <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"';
+                                       if( $tab['class'] ) {
+                                               echo ' class="'.htmlspecialchars($tab['class']).'"';
+                                       }
+                                       echo'><a href="'.htmlspecialchars($tab['href']).'"';
+                                       # We don't want to give the watch tab an accesskey if the
+                                       # page is being edited, because that conflicts with the
+                                       # accesskey on the watch checkbox.  We also don't want to
+                                       # give the edit tab an accesskey, because that's fairly su-
+                                       # perfluous and conflicts with an accesskey (Ctrl-E) often
+                                       # used for editing in Safari.
+                                       if( in_array( $action, array( 'edit', 'submit' ) )
+                                       && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
+                                               echo $skin->tooltip( "ca-$key" );
+                                       } else {
+                                               echo $skin->tooltipAndAccesskey( "ca-$key" );
+                                       }
+                                       echo '>'.htmlspecialchars($tab['text']).'</a></li>';
+                               } ?>
+                       </ul>
+               </div>
+       </div>
+
+       <!-- content -->
+       <div id="mw_content">
+       <!-- contentholder does nothing by default, but it allows users to style the text inside
+            the content area without affecting the meaning of 'em' in #mw_content, which is used
+            for the margins -->
+       <div id="mw_contentholder">
+               <div class='mw-topboxes'>
+                       <div id="mw-js-message" style="display:none;"></div>
+                       <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
+                       <?php if($this->data['newtalk'] ) {
+                               ?><div class="usermessage mw-topbox"><?php $this->html('newtalk')  ?></div>
+                       <?php } ?>
+                       <?php if($this->data['sitenotice']) {
+                               ?><div class="mw-topbox" id="siteNotice"><?php $this->html('sitenotice') ?></div>
+                       <?php } ?>
+               </div>
+
+               <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['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
+
+               <?php $this->html('bodytext') ?>
+               <div class='mw_clear'></div>
+               <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+               <?php $this->html ('dataAfterContent') ?>
+       </div><!-- mw_contentholder -->
+       </div><!-- mw_content -->
+       </div><!-- mw_contentwrapper -->
+
+       <div id="mw_portlets">
+
+       <!-- portlets -->
+       <?php 
+               $sidebar = $this->data['sidebar'];              
+               if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
+               if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
+               if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+
+               foreach ($sidebar as $boxName => $cont) {
+                       if ( $boxName == 'SEARCH' ) {
+                               $this->searchBox();
+                       } elseif ( $boxName == 'TOOLBOX' ) {
+                               $this->toolbox();
+                       } elseif ( $boxName == 'LANGUAGES' ) {
+                               $this->languageBox();
+                       } else {
+                               $this->customBox( $boxName, $cont );
+                       }
+               }
+       ?>
+
+       </div><!-- mw_portlets -->
+
+
+       </div><!-- main -->
+
+       <div class="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="<?php echo Sanitizer::escapeId( "pt-$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>
+               <?php echo $this->html("poweredbyico"); ?>
+       </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
+
+       /*************************************************************************************************/
+       function searchBox() {
+?>
+       <!-- 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 $this->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 $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
+                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+                       </div></form>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+<?php
+       }
+
+       /*************************************************************************************************/
+       function toolbox() {
+?>
+       <!-- 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 $this->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 $this->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 $this->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="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>"><a href="<?php
+                                       echo htmlspecialchars($feed['href']) ?>"<?php echo $this->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 $this->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 $this->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 $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
+               } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
+                               <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
+               }
+
+               wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
+?>                     </ul>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+<?php
+       }
+
+       /*************************************************************************************************/
+       function languageBox() {
+?>
+       <!-- 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
+               }
+       }
+
+       /*************************************************************************************************/
+       function customBox( $bar, $cont ) {
+?>
+               <div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
+               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
+               <div class='pBody'>
+<?php   if ( is_array( $cont ) ) { ?>
+                       <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 $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
+<?php                  } ?>
+                       </ul>
+<?php   } else {
+                       # allow raw HTML block to be defined by extensions
+                       print $cont;
+               } 
+?>
+               </div><!-- pBody -->
+       </div><!-- portlet -->
+<?php
+       }
+
+} // end of class
+?>
diff --git a/skins/MonoBook.deps.php b/skins/MonoBook.deps.php
new file mode 100644 (file)
index 0000000..dda24e0
--- /dev/null
@@ -0,0 +1,12 @@
+<?php
+// This file exists to ensure that base classes are preloaded before
+// MonoBook.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://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+
diff --git a/skins/MonoBook.php b/skins/MonoBook.php
new file mode 100644 (file)
index 0000000..8afc498
--- /dev/null
@@ -0,0 +1,373 @@
+<?php
+/**
+ * MonoBook nouveau
+ *
+ * Translated from gwicke's previous TAL template version to remove
+ * dependency on PHPTAL.
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * Inherit main code from SkinTemplate, set the CSS and template filter.
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinMonoBook extends SkinTemplate {
+       /** Using monobook. */
+       function initPage( OutputPage $out ) {
+               parent::initPage( $out );
+               $this->skinname  = 'monobook';
+               $this->stylename = 'monobook';
+               $this->template  = 'MonoBookTemplate';
+
+       }
+
+       function setupSkinUserCss( OutputPage $out ) {
+               global $wgHandheldStyle;
+
+               parent::setupSkinUserCss( $out );
+
+               // Append to the default screen common & print styles...
+               $out->addStyle( 'monobook/main.css', 'screen' );
+               if( $wgHandheldStyle ) {
+                       // Currently in testing... try 'chick/main.css'
+                       $out->addStyle( $wgHandheldStyle, 'handheld' );
+               }
+
+               $out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' );
+               $out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' );
+               $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' );
+               $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' );
+
+               $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' );
+       }
+}
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class MonoBookTemplate extends QuickTemplate {
+       var $skin;
+       /**
+        * Template filter callback for MonoBook 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 $wgRequest;
+               $this->skin = $skin = $this->data['skin'];
+               $action = $wgRequest->getText( 'action' );
+
+               // 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>
+               <?php $this->html('csslinks') ?>
+
+               <!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js?<?php echo $GLOBALS['wgStyleVersion'] ?>"></script>
+               <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('dir') ?> <?php $this->text('pageclass') ?> <?php $this->text('skinnameclass') ?>">
+       <div id="globalWrapper">
+               <div id="column-content">
+       <div id="content">
+               <a name="top" id="top"></a>
+               <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?>
+               <h1 id="firstHeading" class="firstHeading"><?php $this->data['displaytitle']!=""?$this->html('title'):$this->text('title') ?></h1>
+               <div id="bodyContent">
+                       <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 } ?>
+                       <!-- start content -->
+                       <?php $this->html('bodytext') ?>
+                       <?php if($this->data['catlinks']) { $this->html('catlinks'); } ?>
+                       <!-- end content -->
+                       <?php if($this->data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?>
+                       <div class="visualClear"></div>
+               </div>
+       </div>
+               </div>
+               <div id="column-one">
+       <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) {
+                                       echo '
+                                <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"';
+                                       if( $tab['class'] ) {
+                                               echo ' class="'.htmlspecialchars($tab['class']).'"';
+                                       }
+                                       echo'><a href="'.htmlspecialchars($tab['href']).'"';
+                                       # We don't want to give the watch tab an accesskey if the
+                                       # page is being edited, because that conflicts with the
+                                       # accesskey on the watch checkbox.  We also don't want to
+                                       # give the edit tab an accesskey, because that's fairly su-
+                                       # perfluous and conflicts with an accesskey (Ctrl-E) often
+                                       # used for editing in Safari.
+                                       if( in_array( $action, array( 'edit', 'submit' ) )
+                                       && in_array( $key, array( 'edit', 'watch', 'unwatch' ))) {
+                                               echo $skin->tooltip( "ca-$key" );
+                                       } else {
+                                               echo $skin->tooltipAndAccesskey( "ca-$key" );
+                                       }
+                                       echo '>'.htmlspecialchars($tab['text']).'</a></li>';
+                               } ?>
+                       </ul>
+               </div>
+       </div>
+       <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="<?php echo Sanitizer::escapeId( "pt-$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>
+       <div class="portlet" id="p-logo">
+               <a style="background-image: url(<?php $this->text('logopath') ?>);" <?php
+                       ?>href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>"<?php
+                       echo $skin->tooltipAndAccesskey('n-mainpage') ?>></a>
+       </div>
+       <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script>
+<?php
+               $sidebar = $this->data['sidebar'];
+               if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true;
+               if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true;
+               if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true;
+               foreach ($sidebar as $boxName => $cont) {
+                       if ( $boxName == 'SEARCH' ) {
+                               $this->searchBox();
+                       } elseif ( $boxName == 'TOOLBOX' ) {
+                               $this->toolbox();
+                       } elseif ( $boxName == 'LANGUAGES' ) {
+                               $this->languageBox();
+                       } else {
+                               $this->customBox( $boxName, $cont );
+                       }
+               }
+?>
+               </div><!-- end of the left (by default at least) column -->
+                       <div class="visualClear"></div>
+                       <div id="footer">
+<?php
+               if($this->data['poweredbyico']) { ?>
+                               <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
+<?php  }
+               if($this->data['copyrightico']) { ?>
+                               <div id="f-copyrightico"><?php $this->html('copyrightico') ?></div>
+<?php  }
+
+               // Generate additional footer links
+               $footerlinks = array(
+                       'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright',
+                       'privacy', 'about', 'disclaimer', 'tagline',
+               );
+               $validFooterLinks = array();
+               foreach( $footerlinks as $aLink ) {
+                       if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+                               $validFooterLinks[] = $aLink;
+                       }
+               }
+               if ( count( $validFooterLinks ) > 0 ) {
+?>                     <ul id="f-list">
+<?php
+                       foreach( $validFooterLinks as $aLink ) {
+                               if( isset( $this->data[$aLink] ) && $this->data[$aLink] ) {
+?>                                     <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li>
+<?php                  }
+                       }
+?>
+                       </ul>
+<?php  }
+?>
+               </div>
+</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
+
+       /*************************************************************************************************/
+       function searchBox() {
+?>
+       <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 $this->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 $this->skin->tooltipAndAccesskey( 'search-go' ); ?> />&nbsp;
+                               <input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> />
+                       </div></form>
+               </div>
+       </div>
+<?php
+       }
+
+       /*************************************************************************************************/
+       function 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 $this->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 $this->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 $this->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="<?php echo Sanitizer::escapeId( "feed-$key" ) ?>"><a href="<?php
+                                       echo htmlspecialchars($feed['href']) ?>"<?php echo $this->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 $this->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 $this->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 $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
+               } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
+                               <li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
+               }
+
+               wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
+               wfRunHooks( 'SkinTemplateToolboxEnd', array( &$this ) );
+?>
+                       </ul>
+               </div>
+       </div>
+<?php
+       }
+
+       /*************************************************************************************************/
+       function languageBox() {
+               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>
+       </div>
+<?php
+               }
+       }
+
+       /*************************************************************************************************/
+       function customBox( $bar, $cont ) {
+?>
+       <div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
+               <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5>
+               <div class='pBody'>
+<?php   if ( is_array( $cont ) ) { ?>
+                       <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 $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
+<?php                  } ?>
+                       </ul>
+<?php   } else {
+                       # allow raw HTML block to be defined by extensions
+                       print $cont;
+               }
+?>
+               </div>
+       </div>
+<?php
+       }
+
+} // end of class
+
+
diff --git a/skins/MySkin.deps.php b/skins/MySkin.deps.php
new file mode 100644 (file)
index 0000000..b589cc5
--- /dev/null
@@ -0,0 +1,13 @@
+<?php
+// This file exists to ensure that base classes are preloaded before
+// MySkin.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://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+require_once( dirname(__FILE__) . '/MonoBook.php' );
+
diff --git a/skins/MySkin.php b/skins/MySkin.php
new file mode 100644 (file)
index 0000000..4609845
--- /dev/null
@@ -0,0 +1,24 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinMySkin extends SkinTemplate {
+       function initPage( OutputPage $out ) {
+               parent::initPage( $out );
+               $this->skinname  = 'myskin';
+               $this->stylename = 'myskin';
+               $this->template  = 'MonoBookTemplate';
+       }
+}
diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php
new file mode 100644 (file)
index 0000000..2b9b2f6
--- /dev/null
@@ -0,0 +1,118 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinNostalgia extends Skin {
+
+       function getStylesheet() {
+               return 'common/nostalgia.css';
+       }
+       function getSkinName() {
+               return "nostalgia";
+       }
+
+       function doBeforeContent() {
+               $s = "\n<div id='content'>\n<div id='top'>\n";
+               $s .= "<div id=\"logo\">".$this->logoText( "right" )."</div>";
+
+               $s .= $this->pageTitle();
+               $s .= $this->pageSubtitle() . "\n";
+
+               $s .= "<div id=\"topbar\">";
+               $s .= $this->topLinks() . "\n<br />";
+
+               $notice = wfGetSiteNotice();
+               if( $notice ) {
+                       $s .= "\n<div id='siteNotice'>$notice</div>\n";
+               }
+               $s .= $this->pageTitleLinks();
+
+               $ol = $this->otherLanguages();
+               if($ol) $s .= "<br />" . $ol;
+
+               $cat = $this->getCategoryLinks();
+               if($cat) $s .= "<br />" . $cat;
+
+               $s .= "<br clear='all' /></div><hr />\n</div
+>\n";
+               $s .= "\n<div id='article'>";
+
+               return $s;
+       }
+
+       function topLinks() {
+               global $wgOut, $wgUser, $wgEnableUploads;
+               $sep = " |\n";
+
+               $s = $this->mainPageLink() . $sep
+                 . $this->specialLink( 'recentchanges' );
+
+               if ( $wgOut->isArticle() ) {
+                       $s .=  $sep . $this->editThisPage()
+                         . $sep . $this->historyLink();
+               }
+
+               /* show links to different language variants */
+               $s .= $this->variantLinks();
+               $s .= $this->extensionTabLinks();
+               if ( $wgUser->isAnon() ) {
+                       $s .= $sep . $this->specialLink( 'userlogin' );
+               } else {
+                       $name = $wgUser->getName();
+                       /* show user page and user talk links */
+                       $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) );
+                       $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) );
+                       if ( $wgUser->getNewtalk() ) {
+                               $s .= ' *';
+                       }
+                       /* show watchlist link */
+                       $s .= $sep . $this->specialLink( 'watchlist' );
+                       /* show my contributions link */
+                       $s .= $sep . $this->link(
+                               SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ),
+                               wfMsgHtml( 'mycontris' ) );
+                       /* show my preferences link */
+                       $s .= $sep . $this->specialLink( 'preferences' );
+                       /* show upload file link */
+                       if ( $wgEnableUploads ) {
+                               $s .= $sep . $this->specialLink( 'upload' );
+                       }
+                       /* show log out link */
+                       $s .= $sep . $this->specialLink( 'userlogout' );
+               }
+
+               $s .= $sep . $this->specialPagesList();
+
+               return $s;
+       }
+
+       function doAfterContent() {
+               $s = "\n</div><br clear='all' />\n";
+
+               $s .= "\n<div id='footer'><hr />";
+
+               $s .= $this->bottomLinks();
+               $s .= "\n<br />" . $this->pageStats();
+               $s .= "\n<br />" . $this->mainPageLink()
+                 . " | " . $this->aboutLink()
+                 . " | " . $this->searchForm();
+
+               $s .= "\n</div>\n</div>\n";
+
+               return $s;
+       }
+}
+
+
diff --git a/skins/Simple.deps.php b/skins/Simple.deps.php
new file mode 100644 (file)
index 0000000..99fadc6
--- /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://lists.wikimedia.org/pipermail/wikitech-l/2006-January/021311.html
+
+if ( ! defined( 'MEDIAWIKI' ) )
+       die( 1 );
+
+require_once( dirname( dirname( __FILE__ ) ) . '/includes/SkinTemplate.php');
+require_once( dirname(__FILE__) . '/MonoBook.php' );
+
diff --git a/skins/Simple.php b/skins/Simple.php
new file mode 100644 (file)
index 0000000..b26f50d
--- /dev/null
@@ -0,0 +1,75 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/** */
+require_once( dirname(__FILE__) . '/MonoBook.php' );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinSimple extends SkinTemplate {
+       function initPage( OutputPage $out ) {
+               SkinTemplate::initPage( $out );
+               $this->skinname  = 'simple';
+               $this->stylename = 'simple';
+               $this->template  = 'MonoBookTemplate';
+       }
+
+       function setupSkinUserCss( OutputPage $out ){
+               $out->addStyle( 'simple/main.css', 'screen' );
+               $out->addStyle( 'simple/rtl.css', '', '', 'rtl' );
+
+       }
+
+       function reallyGenerateUserStylesheet() {
+               global $wgUser;
+               $s = '';
+               if (($undopt = $wgUser->getOption("underline")) != 2) {
+                       $underline = $undopt ? 'underline' : 'none';
+                       $s .= "a { text-decoration: $underline; }\n";
+               }
+               if ($wgUser->getOption('highlightbroken')) {
+                       $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n";
+               } else {
+                       $s .= <<<END
+a.new, #quickbar a.new,
+a.stub, #quickbar a.stub {
+       color: inherit;
+       text-decoration: inherit;
+}
+a.new:after, #quickbar a.new:after {
+       content: "?";
+       color: #CC2200;
+       text-decoration: $underline;
+}
+a.stub:after, #quickbar a.stub:after {
+       content: "!";
+       color: #772233;
+       text-decoration: $underline;
+}
+END;
+               }
+               if ($wgUser->getOption('justify')) {
+                       $s .= "#article, #bodyContent { text-align: justify; }\n";
+               }
+               if (!$wgUser->getOption('showtoc')) {
+                       $s .= "#toc { display: none; }\n";
+               }
+               if (!$wgUser->getOption('editsection')) {
+                       $s .= ".editsection { display: none; }\n";
+               }
+               return $s;
+       }
+}
+
+
diff --git a/skins/Skin.sample b/skins/Skin.sample
new file mode 100644 (file)
index 0000000..c011c14
--- /dev/null
@@ -0,0 +1,19 @@
+<?php
+# Your class extension is defined there.
+#
+# Do NOT use PHPTal with this sample, if you want PHPTal support have a look at
+# the other sample : SkinPHPTal.sample.
+#
+# The class name MUST begin with 'Skin' and the rest is the name of the file
+# excluding '.php'
+# This file is named Skin.sample (but it should end with php). So the
+# class name will be 'Skin' . 'Skin'
+
+class SkinSkin extends Skin {
+# Override method below
+#
+
+}
+
+}
+?>
diff --git a/skins/Standard.php b/skins/Standard.php
new file mode 100644 (file)
index 0000000..1f3cab9
--- /dev/null
@@ -0,0 +1,296 @@
+<?php
+/**
+ * See docs/skin.txt
+ *
+ * @todo document
+ * @file
+ * @ingroup Skins
+ */
+
+if( !defined( 'MEDIAWIKI' ) )
+       die( -1 );
+
+/**
+ * @todo document
+ * @ingroup Skins
+ */
+class SkinStandard extends Skin {
+
+       /**
+        *
+        */
+       function getHeadScripts( $allowUserJs ) {
+               global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
+
+               $s = parent::getHeadScripts( $allowUserJs );
+               if ( 3 == $this->qbSetting() ) { # Floating left
+                       $s .= "<script language='javascript' type='$wgJsMimeType' " .
+                         "src='{$wgStylePath}/common/sticky.js?$wgStyleVersion'></script>\n";
+               }
+               return $s;
+       }
+
+       /**
+        *
+        */
+       function setupSkinUserCss( OutputPage $out ){
+               if ( 3 == $this->qbSetting() ) { # Floating left
+                       $out->addStyle( 'common/quickbar.css' );
+               } else if ( 4 == $this->qbSetting() ) { # Floating right
+                       $out->addStyle( 'common/quickbar-right.css' );
+               }
+               parent::setupSkinUserCss( $out );
+       }
+
+       /**
+        *
+        */
+       function reallyGenerateUserStylesheet() {
+               $s = parent::reallyGenerateUserStylesheet();
+               $qb = $this->qbSetting();
+
+               if ( 2 == $qb ) { # Right
+                       $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " .
+                         "border-left: 2px solid #000000; }\n" .
+                         "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n";
+               } else if ( 1 == $qb || 3 == $qb ) {
+                       $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " .
+                         "border-right: 1px solid gray; }\n" .
+                         "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n";
+               } else if ( 4 == $qb) {
+                       $s .= "#quickbar { border-right: 1px solid gray; }\n" .
+                         "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n";
+               }
+               return $s;
+       }
+
+       /**
+        *
+        */
+       function getBodyOptions() {
+               $a = parent::getBodyOptions();
+
+               if ( 3 == $this->qbSetting() ) { # Floating left
+                       $qb = "setup(\"quickbar\")";
+                       if($a["onload"]) {
+                               $a["onload"] .= ";$qb";
+                       } else {
+                               $a["onload"] = $qb;
+                       }
+               }
+               return $a;
+       }
+
+       function doAfterContent() {
+               global $wgContLang;
+               $fname =  'SkinStandard::doAfterContent';
+               wfProfileIn( $fname );
+               wfProfileIn( $fname.'-1' );
+
+               $s = "\n</div><br style=\"clear:both\" />\n";
+               $s .= "\n<div id='footer'>";
+               $s .= '<table border="0" cellspacing="0"><tr>';
+
+               wfProfileOut( $fname.'-1' );
+               wfProfileIn( $fname.'-2' );
+
+               $qb = $this->qbSetting();
+               $shove = ($qb != 0);
+               $left = ($qb == 1 || $qb == 3);
+               if($wgContLang->isRTL()) $left = !$left;
+
+               if ( $shove && $left ) { # Left
+                               $s .= $this->getQuickbarCompensator();
+               }
+               wfProfileOut( $fname.'-2' );
+               wfProfileIn( $fname.'-3' );
+               $l = $wgContLang->isRTL() ? 'right' : 'left';
+               $s .= "<td class='bottom' align='$l' valign='top'>";
+
+               $s .= $this->bottomLinks();
+               $s .= "\n<br />" . $this->mainPageLink()
+                 . ' | ' . $this->aboutLink()
+                 . ' | ' . $this->specialLink( 'recentchanges' )
+                 . ' | ' . $this->searchForm()
+                 . '<br /><span id="pagestats">' . $this->pageStats() . '</span>';
+
+               $s .= "</td>";
+               if ( $shove && !$left ) { # Right
+                       $s .= $this->getQuickbarCompensator();
+               }
+               $s .= "</tr></table>\n</div>\n</div>\n";
+
+               wfProfileOut( $fname.'-3' );
+               wfProfileIn( $fname.'-4' );
+               if ( 0 != $qb ) { $s .= $this->quickBar(); }
+               wfProfileOut( $fname.'-4' );
+               wfProfileOut( $fname );
+               return $s;
+       }
+
+       function quickBar() {
+               global $wgOut, $wgTitle, $wgUser, $wgRequest, $wgContLang;
+               global $wgEnableUploads, $wgRemoteUploads;
+
+               $fname =  'Skin::quickBar';
+               wfProfileIn( $fname );
+
+               $action = $wgRequest->getText( 'action' );
+               $wpPreview = $wgRequest->getBool( 'wpPreview' );
+               $tns=$wgTitle->getNamespace();
+
+               $s = "\n<div id='quickbar'>";
+               $s .= "\n" . $this->logoText() . "\n<hr class='sep' />";
+
+               $sep = "\n<br />";
+
+               # Use the first heading from the Monobook sidebar as the "browse" section
+               $bar = $this->buildSidebar();
+               unset( $bar['SEARCH'] );
+               unset( $bar['LANGUAGES'] );
+               unset( $bar['TOOLBOX'] );
+               $browseLinks = reset( $bar );
+
+               foreach ( $browseLinks as $link ) {
+                       if ( $link['text'] != '-' ) {
+                               $s .= "<a href=\"{$link['href']}\">" .
+                                       htmlspecialchars( $link['text'] ) . '</a>' . $sep;
+                       }
+               }
+
+               if( $wgUser->isLoggedIn() ) {
+                       $s.= $this->specialLink( 'watchlist' ) ;
+                       $s .= $sep . $this->makeKnownLink( $wgContLang->specialPage( 'Contributions' ),
+                               wfMsg( 'mycontris' ), 'target=' . wfUrlencode($wgUser->getName() ) );
+               }
+               // only show watchlist link if logged in
+               $s .= "\n<hr class='sep' />";
+               $articleExists = $wgTitle->getArticleId();
+               if ( $wgOut->isArticle() || $action =='edit' || $action =='history' || $wpPreview) {
+                       if($wgOut->isArticle()) {
+                               $s .= '<strong>' . $this->editThisPage() . '</strong>';
+                       } else { # backlink to the article in edit or history mode
+                               if($articleExists){ # no backlink if no article
+                                       switch($tns) {
+                                               case NS_TALK:
+                                               case NS_USER_TALK:
+                                               case NS_PROJECT_TALK:
+                                               case NS_FILE_TALK:
+                                               case NS_MEDIAWIKI_TALK:
+                                               case NS_TEMPLATE_TALK:
+                                               case NS_HELP_TALK:
+                                               case NS_CATEGORY_TALK:
+                                                       $text = wfMsg('viewtalkpage');
+                                                       break;
+                                               case NS_MAIN:
+                                                       $text = wfMsg( 'articlepage' );
+                                                       break;
+                                               case NS_USER:
+                                                       $text = wfMsg( 'userpage' );
+                                                       break;
+                                               case NS_PROJECT:
+                                                       $text = wfMsg( 'projectpage' );
+                                                       break;
+                                               case NS_FILE:
+                                                       $text = wfMsg( 'imagepage' );
+                                                       break;
+                                               case NS_MEDIAWIKI:
+                                                       $text = wfMsg( 'mediawikipage' );
+                                                       break;
+                                               case NS_TEMPLATE:
+                                                       $text = wfMsg( 'templatepage' );
+                                                       break;
+                                               case NS_HELP:
+                                                       $text = wfMsg( 'viewhelppage' );
+                                                       break;
+                                               case NS_CATEGORY:
+                                                       $text = wfMsg( 'categorypage' );
+                                                       break;
+                                               default:
+                                                       $text= wfMsg( 'articlepage' );
+                                       }
+
+                                       $link = $wgTitle->getText();
+                                       if ($nstext = $wgContLang->getNsText($tns) ) { # add namespace if necessary
+                                               $link = $nstext . ':' . $link ;
+                                       }
+
+                                       $s .= $this->makeLink( $link, $text );
+                               } elseif( $wgTitle->getNamespace() != NS_SPECIAL ) {
+                                       # we just throw in a "New page" text to tell the user that he's in edit mode,
+                                       # and to avoid messing with the separator that is prepended to the next item
+                                       $s .= '<strong>' . wfMsg('newpage') . '</strong>';
+                               }
+
+                       }
+
+                       # "Post a comment" link
+                       if( ( $wgTitle->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview )
+                               $s .= '<br />' . $this->makeKnownLinkObj( $wgTitle, wfMsg( 'postcomment' ), 'action=edit&section=new' );
+                       
+                       #if( $tns%2 && $action!='edit' && !$wpPreview) {
+                               #$s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit&section=new');
+                       #}
+
+                       /*
+                       watching could cause problems in edit mode:
+                       if user edits article, then loads "watch this article" in background and then saves
+                       article with "Watch this article" checkbox disabled, the article is transparently
+                       unwatched. Therefore we do not show the "Watch this page" link in edit mode
+                       */
+                       if ( $wgUser->isLoggedIn() && $articleExists) {
+                               if($action!='edit' && $action != 'submit' )
+                               {
+                                       $s .= $sep . $this->watchThisPage();
+                               }
+                               if ( $wgTitle->userCan( 'edit' ) )
+                                       $s .= $sep . $this->moveThisPage();
+                       }
+                       if ( $wgUser->isAllowed('delete') and $articleExists ) {
+                               $s .= $sep . $this->deleteThisPage() .
+                               $sep . $this->protectThisPage();
+                       }
+                       $s .= $sep . $this->talkLink();
+                       if ($articleExists && $action !='history') {
+                               $s .= $sep . $this->historyLink();
+                       }
+                       $s.=$sep . $this->whatLinksHere();
+
+                       if($wgOut->isArticleRelated()) {
+                               $s .= $sep . $this->watchPageLinksLink();
+                       }
+
+                       if ( NS_USER == $wgTitle->getNamespace()
+                               || $wgTitle->getNamespace() == NS_USER_TALK ) {
+
+                               $id=User::idFromName($wgTitle->getText());
+                               $ip=User::isIP($wgTitle->getText());
+
+                               if( $id || $ip ){
+                                       $s .= $sep . $this->userContribsLink();
+                               }
+                               if( $this->showEmailUser( $id ) ) {
+                                       $s .= $sep . $this->emailUserLink();
+                               }
+                       }
+                       $s .= "\n<br /><hr class='sep' />";
+               }
+
+               if ( $wgUser->isLoggedIn() && ( $wgEnableUploads || $wgRemoteUploads ) ) {
+                       $s .= $this->specialLink( 'upload' ) . $sep;
+               }
+               $s .= $this->specialLink( 'specialpages' );
+
+               global $wgSiteSupportPage;
+               if( $wgSiteSupportPage ) {
+                       $s .= "\n<br /><a href=\"" . htmlspecialchars( $wgSiteSupportPage ) .
+                         '" class="internal">' . wfMsg( 'sitesupport' ) . '</a>';
+               }
+
+               $s .= "\n<br /></div>\n";
+               wfProfileOut( $fname );
+               return $s;
+       }
+
+
+}
diff --git a/skins/chick/IE50Fixes.css b/skins/chick/IE50Fixes.css
new file mode 100644 (file)
index 0000000..4a193e9
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+** IE5.0 Fix Stylesheet
+*/
+
+#column-content {
+    margin: 0 !important;
+    float: none;
+}
+#column-content #content { 
+    margin-top: 3em; 
+    height: 1%;
+}
+#column-one {
+    position: absolute;
+    overflow: visible;
+    top: 0;
+    left: 0;
+    z-index: 3;
+}
+#footer {
+    margin: 0 0 0 13.6em;
+}
+
+/* IE 5 & 5.5 interpret keyword sizes one off */
+body { font-size: xx-small; }
+/*
+** the edit tabs
+*/
+#p-cactions li {
+    float: left;
+    padding-top: 0;
+    padding-bottom: 0 !important;
+    height: 0.9em;
+}
+#p-cactions li a {
+    display: block;
+    padding-bottom: 0.045em;
+}
+#p-cactions li.selected a {
+    padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+    padding-bottom: 0.17em;
+}
+/* 5.0 doesn't like the background icon for external links and user */
+.link-external,
+.external {
+    background: none;
+    padding: 0;
+}
+#p-personal ul { float: right }
+#p-personal li { float: left }
+li#pt-userpage,
+li#pt-anonuserpage,
+li#pt-login,
+li#pt-logout {
+    background: none;
+    padding-left: none;
+}
+.visualClear {
+    width:100%;
+    height: 0px;
+    padding:0;
+    margin:0;
+}
+#firstHeading { margin-bottom: 0.3em; }
+/*div{ border:1px solid Red !important;}*/
diff --git a/skins/chick/IE55Fixes.css b/skins/chick/IE55Fixes.css
new file mode 100644 (file)
index 0000000..2f78561
--- /dev/null
@@ -0,0 +1,81 @@
+/* IE5.5/win- only fixes */
+
+#column-content { 
+    float: none; 
+    margin-left: 0;
+    height: 1%;
+}
+#column-content #content {
+    position: relative;
+    z-index: 5;
+    margin-left: 12.2em;
+    margin-top: 3em;
+    height: 1%;
+}
+#column-one {
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 4;
+    width: 100%;
+}
+#footer {
+    margin-left: 13.6em;
+    border-left: 1px solid #fabd23;
+}
+
+/*#bodyContent div,
+#bodyContent pre { overflow: auto; }*/
+
+#p-personal { padding-bottom: 0.1em; }
+
+body { font-size: xx-small; }
+
+#p-cactions {
+    width: 76% !important;
+    z-index: 3 !important;
+    float: none;
+}
+#p-cactions li {
+    padding-bottom: 0 !important;
+    border: none;
+    background-color: transparent;
+    cursor: default;
+    float: none !important;
+}
+#p-cactions li a {
+    display: inline-block !important;
+    vertical-align: top;
+    padding-bottom: 0;
+    border: solid #aaa;
+    border-width: 1px 1px 0;
+}
+#p-cactions li.selected a {
+    border-color: #fabd23;
+    padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+    padding-bottom: 0.17em;
+}
+.portlet {
+    overflow:hidden;
+}
+#bodyContent a.external {
+    background: url(external.png) center right no-repeat;
+    padding-right: 13px;
+}
+/* show the hand */
+#p-logo a,
+#p-logo a:hover {
+    cursor: pointer;
+}
+.visualClear {
+    width:90%;
+    height: 1px;
+    padding:0;
+    margin:0;
+}
+
+#editform {
+    width: 100%;
+}
diff --git a/skins/chick/IE60Fixes.css b/skins/chick/IE60Fixes.css
new file mode 100644 (file)
index 0000000..feec15f
--- /dev/null
@@ -0,0 +1,79 @@
+/* 6.0 - only fixes */
+/* content area */ 
+/* workaround for various ie float bugs */
+#column-content { 
+    float: none; 
+    margin-left: 0;
+    height: 1%;
+}
+#column-content #content {
+    margin-left: 12.2em;
+    margin-top: 3em;
+    height: 1%;
+}
+#column-one {
+    position: absolute;
+    top: 0;
+    left: 0;
+    z-index: 4;
+}
+#footer {
+    margin-left: 13.6em;
+    border-left: 1px solid #fabd23;
+}
+
+/* the tabs */
+
+#p-cactions {
+    z-index: 3;
+}
+
+#p-cactions li {
+    padding-bottom: 0 !important;
+    border: none;
+    background-color: transparent;
+    cursor: default;
+    float: none !important;
+}
+#p-cactions li a {
+    display: inline-block !important;
+    vertical-align: top;
+    padding-bottom: 0;
+    border: solid #aaa;
+    border-width: 1px 1px 0;
+}
+#p-cactions li.selected a {
+    border-color: #fabd23;
+    padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+    padding-bottom: 0.17em;
+}
+#portal-personaltools {
+    padding-bottom: 0.1em;
+}
+#bodyContent a.external {
+    background: url(external.png) center right no-repeat;
+    padding-right: 13px;
+}
+
+/* show the hand */
+#p-logo a,
+#p-logo a:hover {
+    cursor: pointer;
+}
+div.visualClear {
+    width:100%;
+    line-height: 0;
+}
+textarea {
+    width: 96%;
+}
+
+div.editsection,
+#catlinks,
+div.tright,
+div.tleft {
+    position: relative;
+}
+/*{ border:1px solid Red !important;}*/
diff --git a/skins/chick/main.css b/skins/chick/main.css
new file mode 100644 (file)
index 0000000..fde0330
--- /dev/null
@@ -0,0 +1,443 @@
+/*
+** MediaWiki 'chick' style sheet for PDAs or other small-screen devices.
+** Copyright Timwi
+** License: GPL (http://www.gnu.org/copyleft/gpl.html)
+**
+** Loosely based on Monobook by Gabriel Wicke
+*/
+
+body {
+    font-family: sans-serif;
+    color: Black;
+    margin: 0;
+    padding: 0.3em;
+}
+
+a { color: #002bb8; }
+a:visited { color: #5a3696; }
+a:active { color: #ffa500; }
+a.stub { color: #772233; }
+a.new,
+#p-personal a.new { color:#ba0000; }
+a.new:visited,
+#p-personal a.new:visited { color:#a55858; }
+
+img {
+    border: none;
+    vertical-align: middle;
+}
+p {
+    margin: 0.4em 0em 0.5em 0em;
+    line-height: 1.5em;
+}
+
+p img { margin: 0; }
+
+hr {
+    height: 1px;
+    color: #aaaaaa;
+    background-color: #aaaaaa;
+    border: 0;
+    margin: 0.2em 0 0.2em 0;
+}
+
+h1, h2, h3, h4, h5, h6 {
+    color: Black;
+    background: none;
+    font-weight: normal;
+    margin: 0;
+    padding-top: 0.5em;
+    padding-bottom: 0.17em;
+    border-bottom: 1px solid #aaaaaa;
+}
+.editsection {
+       font-weight: normal;
+}
+h1 { font-size: 188%; }
+h1 .editsection { font-size: 53.2%; }
+h2 { font-size: 150%; }
+h2 .editsection { font-size: 66.7%; }
+h3, h4, h5, h6 {
+    border-bottom: none;
+    font-weight: bold;
+}
+h3 { font-size: 132%; }
+h3 .editsection { font-size: 75.8%; }
+h4 { font-size: 116%; }
+h4 .editsection { font-size: 86.2%; }
+h5 { font-size: 100%; }
+h6 { font-size: 80%;  }
+h6 .editsection { font-size: 125%; }
+
+ul {
+    line-height: 1.5em;
+    margin: 0.3em 0 0 1.5em;
+    padding:0;
+}
+ol {
+    line-height: 1.5em;
+    margin: 0.3em 0 0 3.2em;
+    padding:0;
+    list-style-image: none;
+}
+li { margin-bottom: 0.1em; }
+dt {
+    font-weight: bold;
+    margin-bottom: 0.1em;
+}
+dl{
+    margin-top: 0.2em;
+    margin-bottom: 0.5em;
+}
+dd {
+    line-height: 1.5em;
+    margin-left: 2em;
+    margin-bottom: 0.1em;
+}
+
+fieldset {
+    border: 1px solid #2f6fab;
+    margin: 1em 0em 1em 0em;
+    padding: 0em 1em 1em 1em;
+    line-height: 1.5em;
+}
+legend {
+    background: White;
+    padding: 0.5em;
+    font-size: 95%;
+}
+form {
+    border: none;
+    margin: 0;
+}
+
+textarea {
+    border: 1px solid #2f6fab;
+    color: Black;
+    background-color: white;
+    width: 100%;
+    padding: 0.1em;
+    overflow: auto;
+}
+/* hide this from ie/mac and konq2.2 */
+@media All {
+    head:first-child+body input {
+        visibility: visible;
+        border: 1px solid #2f6fab;
+        color: Black;
+        background-color: white;
+        vertical-align: middle;
+        padding: 0.2em;
+    }
+}
+input.historysubmit {
+    padding: 0 0.3em 0.3em 0.3em !important;
+    font-size: 94%;
+    cursor: pointer;
+    height: 1.7em !important;
+    margin-left: 1.6em;
+}
+input[type="radio"],
+input[type="checkbox"] { border:none; }
+select {
+    border: 1px solid #2f6fab;
+    color: Black;
+    vertical-align: top;
+}
+abbr, acronym, .explain {
+    border-bottom: 1px dotted Black;
+    color: Black;
+    background: none;
+    cursor: help;
+}
+q {
+    font-family: Times, "Times New Roman", serif;
+    font-style: italic;
+}
+code { background-color: #f9f9f9; }
+pre {
+    padding: 1em;
+    border: 1px dashed #2f6fab;
+    color: Black;
+    background-color: #f9f9f9;
+    line-height: 1.1em;
+}
+
+/*
+** the main content area
+*/
+
+span.subpages { display: block; }
+
+/* Some space under the headers in the content area */
+#bodyContent h1, #bodyContent h2 { margin-bottom:0.6em; }
+#bodyContent h3,
+#bodyContent h4,
+#bodyContent h5 {
+    margin-bottom: 0.3em;
+}
+#firstHeading { margin-bottom:0.1em; }
+
+/* user notification thing */
+.usermessage {
+    background-color: #ffce7b;
+    border: 1px solid #ffa500;
+    color: Black;
+    font-weight: bold;
+    margin: 0.1em 0 0 0;
+    padding: 2px 5px;
+    vertical-align: middle;
+}
+#siteNotice {
+    text-align: center;
+    font-size: 95%;
+    padding: 0 0.9em 0 0.9em;
+}
+#siteNotice p { margin: 0; padding: 0; }
+.error {
+    color: red;
+    font-size: larger;
+}
+.catlinks {
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding: 2px 5px;
+    margin: 0.1em 0 0 0;
+    clear: both;
+}
+.catlinks { margin: 0; padding: 0; }
+
+
+/* currently unused, intended to be used by a metadata box
+in the bottom-right corner of the content area */
+.documentDescription {
+    /* The summary text describing the document */
+    font-weight: bold;
+    display: block;
+    margin: 1em 0em;
+    line-height: 1.5em;
+}
+.documentByLine {
+    text-align: right;
+    font-size: 90%;
+    clear: both;
+    font-weight: normal;
+    color: #76797c;
+}
+
+/* emulate center */
+.center {
+    width: 100%;
+    text-align: center;
+}
+*.center * {
+    margin-left: auto;
+    margin-right: auto;
+}
+/* small for tables and similar */
+.small, .small * { font-size: 94%; }
+table.small { font-size: 100% }
+
+/*
+** content styles
+*/
+
+#toc {
+    /*border:1px solid #2f6fab;*/
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding:5px;
+    font-size: 95%;
+}
+#toc ul { margin-left: 2em; }
+#toc .toctoggle { font-size: 94%; }
+#toc .editsection {
+    margin-top: 0.7em;
+    font-size: 94%;
+}
+
+/* images */
+div.floatright, table.floatright {
+    clear: right;
+    float: right;
+    margin: 0;
+    position: relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+    float: left;
+    clear: left;
+    margin: 0.3em 0.5em 0.5em 0;
+    position: relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+div.floatleft p { font-style: italic; }
+/* thumbnails */
+div.thumb {
+    margin-bottom: 0.5em;
+    border-style: solid; border-color: White;
+    width: auto;
+}
+div.thumb div {
+    border:1px solid #cccccc;
+    padding: 3px !important;
+    background-color:#f9f9f9;
+    font-size: 94%;
+    text-align: center;
+    overflow: hidden;
+}
+div.thumb div a img {
+    border:1px solid #cccccc;
+}
+div.thumb div div.thumbcaption {
+    border: none;
+    text-align: left;
+    line-height: 1.4em;
+    padding: 0.3em 0 0.1em 0;
+}
+div.magnify {
+    float: right;
+    border: none !important;
+    background: none !important;
+}
+div.magnify a, div.magnify img {
+    display: block;
+    border: none !important;
+    background: none !important;
+}
+div.tright {
+    clear: right;
+    float: right;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.tleft {
+    float: left;
+    clear: left;
+    margin-right:0.5em;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+
+.hiddenStructure {
+    display: none;
+}
+
+/*
+** classes for special content elements like town boxes
+** intended to be referenced directly from the wiki src
+*/
+
+/*
+** User styles
+*/
+/* table standards */
+table.rimage {
+    float:right;
+    position:relative;
+    margin-left:1em;
+    margin-bottom:1em;
+    text-align:center;
+}
+.toccolours {
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding:5px;
+    font-size: 95%;
+}
+
+/*
+** edit views etc
+*/
+.special li {
+    line-height: 1.4em;
+    margin: 0;
+    padding: 0;
+}
+
+a.external { color: #3366bb; }
+div#footer { text-align: center; }
+ul#f-list li { list-style: none;  text-align: center; }
+div.portlet { margin: 0.5em 0; }
+
+.redirectText {
+       font-size:150%;
+       margin:5px;
+}
+
+ul.special li.not-patrolled, ol.special li.not-patrolled {
+       background-color: #ffa;
+}
+div.patrollink {
+       font-size: 75%;
+       text-align: right;
+}
+span.newpage, span.minor {
+       font-weight: bold;
+}
+
+span.updatedmarker {
+       color:black;
+       background-color:#00FF00;
+}
+
+table.gallery {
+        border:  1px solid #cccccc;
+        margin:  2px;
+        padding: 2px;
+        background-color:#ffffff;
+}
+
+table.gallery tr { 
+        vertical-align:top;
+}
+
+table.gallery td {
+      vertical-align:top;
+      background-color:#f9f9f9;
+      border: solid 2px white;
+}
+
+div.gallerybox {
+        margin: 2px;
+        width:  150px;
+}
+
+div.gallerybox div.thumb {
+        text-align: center;
+        border: 1px solid #cccccc;
+        margin: 2px;
+}       
+
+div.gallerytext {
+       overflow: hidden;
+        font-size: 94%;
+        padding: 2px 4px;
+}       
+
+#xjump-to-nav {
+  display: none;
+}
+
+.templatesUsed { margin-top: 1.5em; }
+
+.printfooter {
+       display: none;
+}
+
+#footer {
+       background-color: white;
+       border-top: 1px solid #fabd23;
+       border-bottom: 1px solid #fabd23;
+       margin: .6em 0 1em 0;
+       padding: .4em 0 1.2em 0;
+       text-align: center;
+       font-size: 90%;
+}
+#f-poweredbyico, #f-copyrightico {
+       display: inline;
+}
\ No newline at end of file
diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js
new file mode 100644 (file)
index 0000000..f85f506
--- /dev/null
@@ -0,0 +1,127 @@
+// IE fixes javascript
+
+var isMSIE55 = (window.showModalDialog && window.clipboardData && window.createPopup);
+var doneIETransform;
+var doneIEAlphaFix;
+
+if (document.attachEvent)
+  document.attachEvent('onreadystatechange', hookit);
+
+function hookit() {
+    if (!doneIETransform && document.getElementById && document.getElementById('bodyContent')) {
+        doneIETransform = true;
+        relativeforfloats();
+        fixalpha();
+    }
+}
+
+// png alpha transparency fixes
+function fixalpha() {
+    // bg
+    if (isMSIE55 && !doneIEAlphaFix)
+    {
+        var plogo = document.getElementById('p-logo');
+        if (!plogo) return;
+
+        var logoa = plogo.getElementsByTagName('a')[0];
+        if (!logoa) return;
+
+        var bg = logoa.currentStyle.backgroundImage;
+        var imageUrl = bg.substring(5, bg.length-2);
+
+        doneIEAlphaFix = true;
+
+        if (imageUrl.substr(imageUrl.length-4).toLowerCase() == '.png') {
+            var logospan = logoa.appendChild(document.createElement('span'));
+
+            logoa.style.backgroundImage = 'none';
+            logospan.style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=' + imageUrl + ')';
+            logospan.style.height = '100%';
+            logospan.style.position = 'absolute';
+            logospan.style.width = logoa.currentStyle.width;
+            logospan.style.cursor = 'hand';
+            // Center image with hack for IE5.5
+            if (document.documentElement.dir == "rtl")
+            {
+              logospan.style.right = '50%';
+              logospan.style.setExpression('marginRight', '"-" + (this.offsetWidth / 2) + "px"');
+            }
+            else
+            {
+              logospan.style.left = '50%';
+              logospan.style.setExpression('marginLeft', '"-" + (this.offsetWidth / 2) + "px"');
+            }
+            logospan.style.top = '50%';
+            logospan.style.setExpression('marginTop', '"-" + (this.offsetHeight / 2) + "px"');
+
+            var linkFix = logoa.appendChild(logoa.cloneNode());
+            linkFix.style.position = 'absolute';
+            linkFix.style.height = '100%';
+            linkFix.style.width = '100%';
+        }
+    }
+}
+
+// fix ie6 disappering float bug
+function relativeforfloats() {
+    var bc = document.getElementById('bodyContent');
+    if (bc) {
+        var tables = bc.getElementsByTagName('table');
+        var divs = bc.getElementsByTagName('div');
+    }
+    setrelative(tables);
+    setrelative(divs);
+}
+function setrelative (nodes) {
+    var i = 0;
+    while (i < nodes.length) {
+        if(((nodes[i].style.float && nodes[i].style.float != ('none') ||
+        (nodes[i].align && nodes[i].align != ('none'))) &&
+        (!nodes[i].style.position || nodes[i].style.position != 'relative'))) 
+        {
+            nodes[i].style.position = 'relative';
+        }
+        i++;
+    }
+}
+
+
+// Expand links for printing
+
+String.prototype.hasClass = function(classWanted)
+{
+    var classArr = this.split(/\s/);
+    for (var i=0; i<classArr.length; i++)
+      if (classArr[i].toLowerCase() == classWanted.toLowerCase()) return true;
+    return false;
+}
+
+var expandedURLs;
+
+onbeforeprint = function() { 
+    expandedURLs = [];
+
+    var contentEl = document.getElementById("content");
+
+    if (contentEl)
+    {
+      var allLinks = contentEl.getElementsByTagName("a");
+
+      for (var i=0; i < allLinks.length; i++) {
+          if (allLinks[i].className.hasClass("external") && !allLinks[i].className.hasClass("free")) {
+              var expandedLink = document.createElement("span");
+              var expandedText = document.createTextNode(" (" + allLinks[i].href + ")");
+              expandedLink.appendChild(expandedText);
+              allLinks[i].parentNode.insertBefore(expandedLink, allLinks[i].nextSibling);
+              expandedURLs[i] = expandedLink;
+          }
+      }
+   }
+}
+
+onafterprint = function()
+{
+    for (var i=0; i < expandedURLs.length; i++)
+        if (expandedURLs[i])
+            expandedURLs[i].removeNode(true);
+}
diff --git a/skins/common/ajax.js b/skins/common/ajax.js
new file mode 100644 (file)
index 0000000..afcfa70
--- /dev/null
@@ -0,0 +1,167 @@
+// remote scripting library
+// (c) copyright 2005 modernmethod, inc
+var sajax_debug_mode = false;
+var sajax_request_type = "GET";
+
+/**
+* if sajax_debug_mode is true, this function outputs given the message into 
+* the element with id = sajax_debug; if no such element exists in the document, 
+* it is injected.
+*/
+function sajax_debug(text) {
+       if (!sajax_debug_mode) return false;
+
+       var e= document.getElementById('sajax_debug');
+
+       if (!e) {
+               e= document.createElement("p");
+               e.className= 'sajax_debug';
+               e.id= 'sajax_debug';
+
+               var b= document.getElementsByTagName("body")[0];
+
+               if (b.firstChild) b.insertBefore(e, b.firstChild);
+               else b.appendChild(e);
+       }
+
+       var m= document.createElement("div");
+       m.appendChild( document.createTextNode( text ) );
+
+       e.appendChild( m );
+
+       return true;
+}
+
+/**
+* compatibility wrapper for creating a new XMLHttpRequest object.
+*/
+function sajax_init_object() {
+       sajax_debug("sajax_init_object() called..")
+       var A;
+       try {
+               // Try the new style before ActiveX so we don't
+               // unnecessarily trigger warnings in IE 7 when
+               // set to prompt about ActiveX usage
+               A = new XMLHttpRequest();
+       } catch (e) {
+               try {
+                       A=new ActiveXObject("Msxml2.XMLHTTP");
+               } catch (e) {
+                       try {
+                               A=new ActiveXObject("Microsoft.XMLHTTP");
+                       } catch (oc) {
+                               A=null;
+                       }
+               }
+       }
+       if (!A)
+               sajax_debug("Could not create connection object.");
+
+       return A;
+}
+
+/**
+* Perform an ajax call to mediawiki. Calls are handeled by AjaxDispatcher.php
+*   func_name - the name of the function to call. Must be registered in $wgAjaxExportList
+*   args - an array of arguments to that function
+*   target - the target that will handle the result of the call. If this is a function,
+*            if will be called with the XMLHttpRequest as a parameter; if it's an input
+*            element, its value will be set to the resultText; if it's another type of
+*            element, its innerHTML will be set to the resultText.
+*
+* Example:
+*    sajax_do_call('doFoo', [1, 2, 3], document.getElementById("showFoo"));
+*
+* This will call the doFoo function via MediaWiki's AjaxDispatcher, with
+* (1, 2, 3) as the parameter list, and will show the result in the element
+* with id = showFoo
+*/
+function sajax_do_call(func_name, args, target) {
+       var i, x, n;
+       var uri;
+       var post_data;
+       uri = wgServer +
+               ((wgScript == null) ? (wgScriptPath + "/index.php") : wgScript) +
+               "?action=ajax";
+       if (sajax_request_type == "GET") {
+               if (uri.indexOf("?") == -1)
+                       uri = uri + "?rs=" + encodeURIComponent(func_name);
+               else
+                       uri = uri + "&rs=" + encodeURIComponent(func_name);
+               for (i = 0; i < args.length; i++)
+                       uri = uri + "&rsargs[]=" + encodeURIComponent(args[i]);
+               //uri = uri + "&rsrnd=" + new Date().getTime();
+               post_data = null;
+       } else {
+               post_data = "rs=" + encodeURIComponent(func_name);
+               for (i = 0; i < args.length; i++)
+                       post_data = post_data + "&rsargs[]=" + encodeURIComponent(args[i]);
+       }
+       x = sajax_init_object();
+       if (!x) {
+               alert("AJAX not supported");
+               return false;
+       }
+
+       try {
+               x.open(sajax_request_type, uri, true);
+       } catch (e) {
+               if (window.location.hostname == "localhost") {
+                       alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing.");
+               }
+               throw e;
+       }
+       if (sajax_request_type == "POST") {
+               x.setRequestHeader("Method", "POST " + uri + " HTTP/1.1");
+               x.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+       }
+       x.setRequestHeader("Pragma", "cache=yes");
+       x.setRequestHeader("Cache-Control", "no-transform");
+       x.onreadystatechange = function() {
+               if (x.readyState != 4)
+                       return;
+
+               sajax_debug("received (" + x.status + " " + x.statusText + ") " + x.responseText);
+
+               //if (x.status != 200)
+               //      alert("Error: " + x.status + " " + x.statusText + ": " + x.responseText);
+               //else
+
+               if ( typeof( target ) == 'function' ) {
+                       target( x );
+               }
+               else if ( typeof( target ) == 'object' ) {
+                       if ( target.tagName == 'INPUT' ) {
+                               if (x.status == 200) target.value= x.responseText;
+                               //else alert("Error: " + x.status + " " + x.statusText + " (" + x.responseText + ")");
+                       }
+                       else {
+                               if (x.status == 200) target.innerHTML = x.responseText;
+                               else target.innerHTML= "<div class='error'>Error: " + x.status + " " + x.statusText + " (" + x.responseText + ")</div>";
+                       }
+               }
+               else {
+                       alert("bad target for sajax_do_call: not a function or object: " + target);
+               }
+
+               return;
+       }
+
+       sajax_debug(func_name + " uri = " + uri + " / post = " + post_data);
+       x.send(post_data);
+       sajax_debug(func_name + " waiting..");
+       delete x;
+
+       return true;
+}
+
+/**
+ * @return boolean whether the browser supports XMLHttpRequest
+ */
+function wfSupportsAjax() {
+       var request = sajax_init_object();
+       var supportsAjax = request ? true : false;
+       delete request;
+       return supportsAjax;
+}
+
diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js
new file mode 100644 (file)
index 0000000..c8d90b8
--- /dev/null
@@ -0,0 +1,153 @@
+// dependencies:
+// * ajax.js:
+  /*extern sajax_init_object, sajax_do_call */
+// * wikibits.js:
+  /*extern changeText, akeytt, hookEvent, jsMsg */
+
+// These should have been initialized in the generated js
+/*extern wgAjaxWatch, wgPageName */
+
+if(typeof wgAjaxWatch === "undefined" || !wgAjaxWatch) {
+       var wgAjaxWatch = {
+               watchMsg: "Watch",
+               unwatchMsg: "Unwatch",
+               watchingMsg: "Watching...",
+               unwatchingMsg: "Unwatching..."
+       };
+}
+
+wgAjaxWatch.supported = true; // supported on current page and by browser
+wgAjaxWatch.watching = false; // currently watching page
+wgAjaxWatch.inprogress = false; // ajax request in progress
+wgAjaxWatch.timeoutID = null; // see wgAjaxWatch.ajaxCall
+wgAjaxWatch.watchLinks = []; // "watch"/"unwatch" links
+
+wgAjaxWatch.setLinkText = function(newText) {
+       for (i = 0; i < wgAjaxWatch.watchLinks.length; i++) {
+               changeText(wgAjaxWatch.watchLinks[i], newText);
+       }
+};
+
+wgAjaxWatch.setLinkID = function(newId) {
+       // We can only set the first one
+       wgAjaxWatch.watchLinks[0].setAttribute( 'id', newId );
+       akeytt(newId); // update tooltips for Monobook
+};
+
+wgAjaxWatch.setHref = function( string ) {
+       for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) {
+               if( string == 'watch' ) {
+                       wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href
+                               .replace( /&action=unwatch/, '&action=watch' );
+               } else if( string == 'unwatch' ) {
+                       wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href
+                               .replace( /&action=watch/, '&action=unwatch' );
+               }
+       }
+}
+
+wgAjaxWatch.ajaxCall = function() {
+       if(!wgAjaxWatch.supported) {
+               return true;
+       } else if (wgAjaxWatch.inprogress) {
+               return false;
+       }
+       if(!wfSupportsAjax()) {
+               // Lazy initialization so we don't toss up
+               // ActiveX warnings on initial page load
+               // for IE 6 users with security settings.
+               wgAjaxWatch.supported = false;
+               return true;
+       }
+
+       wgAjaxWatch.inprogress = true;
+       wgAjaxWatch.setLinkText( wgAjaxWatch.watching
+               ? wgAjaxWatch.unwatchingMsg : wgAjaxWatch.watchingMsg);
+       sajax_do_call(
+               "wfAjaxWatch",
+               [wgPageName, (wgAjaxWatch.watching ? "u" : "w")], 
+               wgAjaxWatch.processResult
+       );
+       // if the request isn't done in 10 seconds, allow user to try again
+       wgAjaxWatch.timeoutID = window.setTimeout(
+               function() { wgAjaxWatch.inprogress = false; },
+               10000
+       );
+       return false;
+};
+
+wgAjaxWatch.processResult = function(request) {
+       if(!wgAjaxWatch.supported) {
+               return;
+       }
+       var response = request.responseText;
+       if( response.match(/^<w#>/) ) {
+               wgAjaxWatch.watching = true;
+               wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg);
+               wgAjaxWatch.setLinkID("ca-unwatch");
+               wgAjaxWatch.setHref( 'unwatch' );
+       } else if( response.match(/^<u#>/) ) {
+               wgAjaxWatch.watching = false;
+               wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg);
+               wgAjaxWatch.setLinkID("ca-watch");
+               wgAjaxWatch.setHref( 'watch' );
+       } else {
+               // Either we got a <err#> error code or it just plain broke.
+               window.location.href = wgAjaxWatch.watchLinks[0].href;
+               return;
+       }
+       jsMsg( response.substr(4), 'watch' );
+       wgAjaxWatch.inprogress = false;
+       if(wgAjaxWatch.timeoutID) {
+               window.clearTimeout(wgAjaxWatch.timeoutID);
+       }
+       // Bug 12395 - avoid some watch link confusion on edit
+       var watchthis = document.getElementById("wpWatchthis");
+       if( watchthis && response.match(/^<[uw]#>/) ) {
+               watchthis.checked = response.match(/^<w#>/) ? "checked" : "";
+       }
+       return;
+};
+
+wgAjaxWatch.onLoad = function() {
+       // This document structure hardcoding sucks.  We should make a class and
+       // toss all this out the window.
+       var el1 = document.getElementById("ca-unwatch");
+       var el2 = null;
+       if (!el1) {
+               el1 = document.getElementById("mw-unwatch-link1");
+               el2 = document.getElementById("mw-unwatch-link2");
+       }
+       if(el1) {
+               wgAjaxWatch.watching = true;
+       } else {
+               wgAjaxWatch.watching = false;
+               el1 = document.getElementById("ca-watch");
+               if (!el1) {
+                       el1 = document.getElementById("mw-watch-link1");
+                       el2 = document.getElementById("mw-watch-link2");
+               }
+               if(!el1) {
+                       wgAjaxWatch.supported = false;
+                       return;
+               }
+       }
+
+       // The id can be either for the parent (Monobook-based) or the element
+       // itself (non-Monobook)
+       wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a"
+               ? el1 : el1.firstChild );
+
+       if( el2 ) {
+               wgAjaxWatch.watchLinks.push( el2 );
+       }
+
+       // I couldn't get for (watchLink in wgAjaxWatch.watchLinks) to work, if
+       // you can be my guest.
+       for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) {
+               wgAjaxWatch.watchLinks[i].onclick = wgAjaxWatch.ajaxCall;
+       }
+       return;
+};
+
+hookEvent("load", wgAjaxWatch.onLoad);
diff --git a/skins/common/allmessages.js b/skins/common/allmessages.js
new file mode 100644 (file)
index 0000000..9f07a48
--- /dev/null
@@ -0,0 +1,83 @@
+var allmessages_nodelist = false;
+var allmessages_modified = false;
+var allmessages_timeout = false;
+var allmessages_running = false;
+
+function allmessagesmodified() {
+       allmessages_modified = !allmessages_modified;
+       allmessagesfilter();
+}
+
+function allmessagesfilter() {
+       if ( allmessages_timeout )
+               window.clearTimeout( allmessages_timeout );
+
+       if ( !allmessages_running )
+               allmessages_timeout = window.setTimeout( 'allmessagesfilter_do();', 500 );
+}
+
+function allmessagesfilter_do() {
+       if ( !allmessages_nodelist )
+               return;
+
+       var text = document.getElementById('allmessagesinput').value.toLowerCase();
+       var nodef = allmessages_modified;
+
+       allmessages_running = true;
+
+       for ( var name in allmessages_nodelist ) {
+               var nodes = allmessages_nodelist[name];
+               var display = ( name.toLowerCase().indexOf( text ) == -1 ? 'none' : '' );
+
+               for ( var i = 0; i < nodes.length; i++)
+                       nodes[i].style.display =
+                               ( nodes[i].className == "def" && nodef
+                                 ? 'none' : display );
+       }
+
+       if ( text != document.getElementById('allmessagesinput').value.toLowerCase() ||
+            nodef != allmessages_modified )
+               allmessagesfilter_do();  // repeat
+
+       allmessages_running = false;
+}
+
+function allmessagesfilter_init() {
+       if ( allmessages_nodelist )
+               return;
+
+       var nodelist = new Array();
+       var templist = new Array();
+
+       var table = document.getElementById('allmessagestable');
+       if ( !table ) return;
+
+       var rows = document.getElementsByTagName('tr');
+       for ( var i = 0; i < rows.length; i++ ) {
+               var id = rows[i].getAttribute('id')
+               if ( id && id.substring(0,16) != 'sp-allmessages-r' ) continue;
+               templist[ id ] = rows[i];
+       }
+
+       var spans = table.getElementsByTagName('span');
+       for ( var i = 0; i < spans.length; i++ ) {
+               var id = spans[i].getAttribute('id')
+               if ( id && id.substring(0,17) != 'sp-allmessages-i-' ) continue;
+               if ( !spans[i].firstChild || spans[i].firstChild.nodeType != 3 ) continue;
+
+               var nodes = new Array();
+               var row1 = templist[ id.replace('i', 'r1') ];
+               var row2 = templist[ id.replace('i', 'r2') ];
+
+               if ( row1 ) nodes[nodes.length] = row1;
+               if ( row2 ) nodes[nodes.length] = row2;
+               nodelist[ spans[i].firstChild.nodeValue ] = nodes;
+       }
+
+       var k = document.getElementById('allmessagesfilter');
+       if (k) { k.style.display = ''; }
+
+       allmessages_nodelist = nodelist;
+}
+
+hookEvent( "load", allmessagesfilter_init );
diff --git a/skins/common/block.js b/skins/common/block.js
new file mode 100644 (file)
index 0000000..6f7be0c
--- /dev/null
@@ -0,0 +1,54 @@
+addOnloadHook(considerChangingExpiryFocus);
+
+function considerChangingExpiryFocus() {
+       if (!document.getElementById) {
+               return;
+       }
+       var drop = document.getElementById('wpBlockExpiry');
+       if (!drop) {
+               return;
+       }
+       var field = document.getElementById('wpBlockOther');
+       if (!field) {
+               return;
+       }
+       var opt = drop.value;
+       if (opt == 'other') {
+               field.style.display = '';
+       } else {
+               field.style.display = 'none';
+       }
+}
+
+function updateBlockOptions() {
+       if (!document.getElementById)
+               return;
+
+       var target = document.getElementById('mw-bi-target');
+       if (!target)
+               return;
+
+       var addy = target.value;
+       var isEmpty = addy.match(/^\s*$/);
+       var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/);
+
+       var anonymousRow = document.getElementById('wpAnonOnlyRow');
+       if( anonymousRow ) {
+               anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : '';
+       }
+
+       var autoblockRow = document.getElementById('wpEnableAutoblockRow');
+       if( autoblockRow ) {
+               autoblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
+
+       var emailblockRow = document.getElementById('wpEnableEmailBan');
+       if( emailblockRow ) {
+               emailblockRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
+       
+       var hideuserRow = document.getElementById('wpEnableHideUser');
+       if( hideuserRow ) {
+               hideuserRow.style.display = isIp && !isEmpty ? 'none' : '';
+       }
+}
diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css
new file mode 100644 (file)
index 0000000..2723bbe
--- /dev/null
@@ -0,0 +1,96 @@
+body { margin: 0px; padding: 0px; color: black; }
+#specialform { display: inline; }
+#content { top: 0; margin: 0; padding: 0; }
+#topbar { padding: 0px; }
+#powersearch {
+  background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px;
+}
+#quickbar {
+ width: 140px; top: 18ex; padding: 2px; visibility: visible; z-index: 99;
+}
+#article, #article td, #article th, #article p {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt; color: black;
+}
+#article p {
+ padding-top: 0; padding-bottom: 0;
+ margin-top: 1ex; margin-bottom: 0;
+}
+p, pre, td, th, li, dd, dt { line-height: 12pt; }
+textarea { overflow: auto; }
+
+#footer { padding: 4px; }
+#footer form { display: inline; }
+#sitetitle {
+ font-family: Times, serif;
+ color: white;
+ font-weight: normal; font-size: 32pt;
+ line-height: 32pt;
+}
+td.top {
+ background-color: #6688AA; color: white;
+ margin-top: 4px; margin-bottom: 4px;
+ padding-top: 0; padding-bottom: 0;
+ text-transform: uppercase;
+ font-family: Verdana, Arial, sans-serif; font-size: 8pt;
+}
+td.top a {
+ font-family: Verdana, Arial, sans-serif;
+ background-color: #6688AA; color: white;
+ text-decoration: none; font-size: 10pt;
+}
+td.bottom {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt;
+ padding: 0;
+}
+#pagestats {
+ font-family: Verdana, Arial, sans-serif;
+ color: black;
+ font-size: 9pt;
+}
+#sitesub {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 9pt; font-weight: bold;
+ color: black;
+ padding-top: 0;
+}
+#quickbar {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 8pt; font-weight: bold; line-height: 9.5pt;
+ text-decoration: none;
+ color: black;
+ padding: 0; margin-top: 0;
+}
+#quickbar a { color: #446688; }
+
+#quickbar h6 {
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 10pt; font-weight: bold; line-height: 12pt;
+ text-decoration: none;
+ color: #666666;
+ padding: 0; margin-bottom: 2px; margin-top: 6px;
+}
+#quickbar form { padding: 0; margin-top: 0; }
+
+h1 {
+ color: #666666;
+ font-family: Verdana, Arial, sans-serif;
+ font-size: 180%; line-height: 21pt;
+}
+h1 .editsection { font-size: 55.6%; }
+h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
+#article p.subtitle {
+ color: #666666; font-size: 11pt; font-weight: bold;
+ padding-top: 0; margin-top: 0; padding-bottom: 1ex;
+}
+
+a { color: #223366; }
+a.external { color: #336644; }
+a:visited { color: #8D0749; }
+a.printable { text-decoration: underline; }
+a.stub, #quickbar a.stub { color:#772233; text-decoration:none; }
+a.new, #quickbar a.new { color: #CC2200; }
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
+small { font-size: 75%; }
+input.mw-searchInput { width: 106px; }
diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css
new file mode 100644 (file)
index 0000000..ecf146d
--- /dev/null
@@ -0,0 +1,267 @@
+/*
+** MediaWiki Print style sheet for CSS2-capable browsers.
+** Copyright Gabriel Wicke, http://www.aulinx.de/
+**
+** Derived from the plone (http://plone.org/) styles
+** Copyright Alexander Limi
+*/
+
+/* Thanks to A List Apart (http://alistapart.com/) for useful extras */
+a.stub,
+a.new{ color:#ba0000; text-decoration:none; }
+
+#toc { 
+    /*border:1px solid #2f6fab;*/
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding:5px;
+}
+.tocindent {
+       margin-left: 2em;
+}
+.tocline {
+       margin-bottom: 0px;
+}
+
+/* images */
+div.floatright { 
+    float: right;
+    clear: right;
+    margin: 0;
+    position:relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.floatright p { font-style: italic;} 
+div.floatleft { 
+    float: left; 
+    margin: 0.3em 0.5em 0.5em 0;
+    position:relative;
+    border: 0.5em solid White;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+div.floatleft p { font-style: italic; } 
+/* thumbnails */
+div.thumb {
+    margin-bottom: 0.5em;
+    border-style: solid; border-color: White;
+    width: auto;
+    overflow: hidden;
+}
+div.thumb div {
+    border:1px solid #cccccc;
+    padding: 3px !important;
+    background-color:#f9f9f9;
+    font-size: 94%;
+    text-align: center;
+}
+div.thumb div a img {
+    border:1px solid #cccccc;
+}
+div.thumb div div.thumbcaption {
+    border: none;
+    padding: 0.3em 0 0.1em 0;
+}
+div.magnify { display: none; }
+div.tright {
+    float: right;
+    clear: right;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.tleft {
+    float: left;
+    margin-right:0.5em;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+
+/* table standards */
+table.rimage {
+    float:right; 
+    width:1pt; 
+    position:relative;
+    margin-left:1em; 
+    margin-bottom:1em;
+    text-align:center;
+}
+
+body {
+    background: White;
+    /*font-size: 11pt !important;*/
+    color: Black;
+    margin: 0;
+    padding: 0;
+}
+
+.noprint,
+div#jump-to-nav,
+div.top,
+div#column-one,
+#colophon,
+.editsection,
+.toctoggle,
+.tochidden,
+div#f-poweredbyico,
+div#f-copyrightico,
+li#viewcount,
+li#about,
+li#disclaimer,
+li#privacy {
+    /* Hides all the elements irrelevant for printing */
+    display: none;
+}
+
+ul { 
+    list-style-type: square;
+}
+
+#content {
+    background: none;
+    border: none ! important;
+    padding: 0 ! important;
+    margin: 0 ! important;
+}
+#footer {
+       background : white;
+       color : black;
+    border-top: 1px solid black;
+}
+
+h1, h2, h3, h4, h5, h6 {
+       font-weight: bold;
+}
+
+p, .documentDescription {
+    margin: 1em 0 ! important;
+    line-height: 1.2em;
+}
+
+.tocindent p {
+       margin: 0 0 0 0 ! important;
+}
+
+pre {
+    border: 1pt dashed black;
+    white-space: pre;
+    font-size: 8pt;
+    overflow: auto;
+    padding: 1em 0;
+       background : white;
+       color : black;
+}
+
+table.listing,
+table.listing td {
+    border: 1pt solid black;
+    border-collapse: collapse;
+}
+
+a {
+    color: Black !important;
+    background: none !important;
+    padding: 0 !important;
+}
+
+a:link, a:visited {
+    color: #520;
+    background: transparent;
+    text-decoration: underline;
+}
+
+#content a.external.text:after, #content a.external.autonumber:after {
+    /* Expand URLs for printing */
+    content: " (" attr(href) ") ";
+}
+
+#globalWrapper {
+    width: 100% !important;
+    min-width: 0 !important;
+}
+
+#content {
+       background : white;
+       color : black;
+}
+
+#column-content {
+    margin: 0 !important;
+}
+
+#column-content #content {
+    padding: 1em;
+    margin: 0 !important;
+}
+/* MSIE/Win doesn't understand 'inherit' */
+a, a.external, a.new, a.stub {
+       color: black ! important;
+       text-decoration: none ! important;
+}
+
+/* Continue ... */
+a, a.external, a.new, a.stub {
+       color: inherit ! important;
+       text-decoration: inherit ! important;
+}
+
+img { border: none; }
+img.tex { vertical-align: middle; }
+span.texhtml { font-family: serif; }
+
+#siteNotice { display: none; }
+
+table.gallery {
+        border:  1px solid #cccccc;
+        margin:  2px;
+        padding: 2px;
+        background-color:#ffffff;
+}
+
+table.gallery tr { 
+        vertical-align:top;
+}
+
+div.gallerybox {
+        border: 1px solid #cccccc;
+        margin: 2px;
+        background-color:#f9f9f9;
+        width:  150px;
+}
+
+div.gallerybox div.thumb {
+        text-align: center;
+        border: 1px solid #cccccc;
+        margin: 2px;
+}       
+
+div.gallerytext {
+        font-size: 94%;
+        padding: 2px 4px;
+}       
+
+/*
+** Diff rendering
+*/
+table.diff { background:white; }
+td.diff-otitle { background:#ffffff; }
+td.diff-ntitle { background:#ffffff; }
+td.diff-addedline {
+    background:#ccffcc;
+    font-size: smaller;
+    border: solid 2px black;
+}
+td.diff-deletedline {
+    background:#ffffaa;
+    font-size: smaller;
+    border: dotted 2px black;
+}
+td.diff-context {
+    background:#eeeeee;
+    font-size: smaller;
+}
+.diffchange {
+    color: silver;
+    font-weight: bold;
+    text-decoration: underline;
+}
diff --git a/skins/common/common_rtl.css b/skins/common/common_rtl.css
new file mode 100644 (file)
index 0000000..11fc995
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * This file contains CSS settings common to RTL wikis use the old
+ * pre-Monobook skins Wikistandard, Nostalgia and CologneBlue
+ */
+
+/* js pref toc */
+#preftoc { float: right; }
+/* workaround for moz bug, displayed bullets on left side */
+#preftoc li { list-style: none; }
+#prefcontrol { float: right; }
+fieldset.prefsection,
+fieldset.operaprefsection { 
+    margin-left: 0;
+    margin-right: 18em;
+}
+/* page history */
+#pagehistory .history-user { 
+    margin-right: 1.4em;
+    margin-left: 0.4em;
+}
+.editsection {
+       float: left;
+       margin-right: 5px;
+}
+div.tright, div.floatright {
+       clear: none;
+}
+div.tleft, div.floatleft {
+       clear: left;
+}
+/* Convenience links to edit block, delete and protect reasons */
+p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
+p.mw-filedelete-editreasons, p.mw-delete-editreasons {
+       float: left;
+}
+table.filehistory th {
+       text-align: right;
+}
+
+/**
+ * Lists:
+ * The following lines don't have a visible effect on non-Gecko browsers
+ * They fix a problem ith Gecko browsers rendering lists to the right of
+ * left-floated objects in an RTL layout.
+ */
+html > body div#article ul {
+       display: table;
+}
diff --git a/skins/common/diff.css b/skins/common/diff.css
new file mode 100644 (file)
index 0000000..6afa373
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+** Diff rendering
+*/
+table.diff, td.diff-otitle, td.diff-ntitle {
+       background-color: white;
+}
+td.diff-otitle,
+td.diff-ntitle {
+       text-align: center;
+}
+td.diff-marker {
+       text-align: right;
+}
+.rtl td.diff-marker {
+       text-align: left;
+}
+td.diff-lineno {
+       font-weight: bold;
+}
+td.diff-addedline {
+       background: #cfc;
+       font-size: smaller;
+}
+td.diff-deletedline {
+       background: #ffa;
+       font-size: smaller;
+}
+td.diff-context {
+       background: #eee;
+       font-size: smaller;
+}
+.diffchange {
+       color: red;
+       font-weight: bold;
+       text-decoration: none;
+       white-space: pre-wrap;
+       white-space: -moz-pre-wrap;
+}
+
+table.diff {
+       border: none;
+       width: 98%;
+       border-spacing: 4px;
+       
+       /* Fixed layout is required to ensure that cells containing long URLs
+          don't widen in Safari, Internet Explorer, or iCab */
+       table-layout: fixed;
+}
+table.diff td {
+       padding: 0;
+}
+table.diff col.diff-marker {
+       width: 2%;
+}
+table.diff col.diff-content {
+       width: 48%;
+}
+table.diff td div {
+       /* Force-wrap very long lines such as URLs or page-widening char strings.
+          CSS 3 draft..., but Gecko doesn't support it yet:
+          https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */
+       word-wrap: break-word;
+       
+       /* As fallback, scrollbars will be added for very wide cells
+          instead of text overflowing or widening */
+       overflow: auto;
+       
+       /* The above rule breaks on very old versions of Mozilla due
+          to a bug which collapses the table cells to a single line.
+          
+          In Mozilla 1.1 and below with JavaScript enabled, the rule
+          will be overridden with this by diff.js; wide cell contents
+          then spill horizontally without widening the rest of the
+          table: */
+       /* overflow: visible; */
+}
+
+/*
+ * Styles for the HTML Diff
+ */
+div.diff-switchtype{
+       text-align: center;
+       font-weight: bold;
+       font-size: smaller;
+}
+
+span.diff-html-added {
+  font-size: 100%;
+  background-color: #20ff20
+}
+
+span.diff-html-removed {
+  font-size: 100%;
+  text-decoration: line-through;
+  background-color: #ff2020
+}
+
+span.diff-html-changed {
+  background: url(images/diffunderline.gif) bottom repeat-x;
+  /* Hack for IE5.5, see http://lists.wikimedia.org/pipermail/wikitech-l/2008-November/040273.html */
+  *background-color: #c6c6fd; /* light blue */
+}
+
+span.diff-html-added img{
+ border: 5px solid #ccffcc;
+}
+
+span.diff-html-removed img{
+ border: 5px solid #fdc6c6;
+}
+
+span.diff-html-changed img{
+ border: 5px dotted #000099;
+}
+
+span.diff-html-changed  {
+  position: relative;   /* this is key */
+  cursor: help;
+}
+span.diff-html-changed span.tip {
+  display: none;        /* so is this */
+}
+
+/* tooltip will display on :hover event */
+span.diff-html-changed:hover span.tip {
+  display: block;
+  z-index: 95;
+  position: absolute;
+  top: 2.5em;
+  left: 0;
+  width: auto;
+  line-height: 1.2em;
+  padding: 3px 7px 4px 6px;
+  border: 1px solid #336;
+  background-color: #f7f7ee;
+  font-size: 10px;
+  text-align: left;
+}
+
+
diff --git a/skins/common/diff.js b/skins/common/diff.js
new file mode 100644 (file)
index 0000000..5fd151f
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling
+<div>s in <td> cells collapse their height to a single line.
+
+Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried
+with overflow-x disable the scrolling all the way until Mozilla 1.8 / FF 1.5
+and break Opera as well.
+
+So... we check for reaaaally old Gecko and hack in an alternate rule to let
+the wide cells spill instead of scrolling them. Not ideal as it won't work
+if JS is disabled, of course.
+*/
+
+if (navigator && navigator.product == "Gecko" && navigator.productSub < "20021130") {
+       var sheets = document.styleSheets;
+       var lastSheet = sheets[sheets.length-1];
+       lastSheet.insertRule(
+               "table.diff td div { overflow: visible; }",
+               lastSheet.cssRules.length);
+}
diff --git a/skins/common/edit.js b/skins/common/edit.js
new file mode 100644 (file)
index 0000000..945059e
--- /dev/null
@@ -0,0 +1,156 @@
+// this function generates the actual toolbar buttons with localized text
+// we use it to avoid creating the toolbar where javascript is not enabled
+function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) {
+       // Don't generate buttons for browsers which don't fully
+       // support it.
+       mwEditButtons[mwEditButtons.length] =
+               {"imageId": imageId,
+                "imageFile": imageFile,
+                "speedTip": speedTip,
+                "tagOpen": tagOpen,
+                "tagClose": tagClose,
+                "sampleText": sampleText};
+}
+
+// this function generates the actual toolbar buttons with localized text
+// we use it to avoid creating the toolbar where javascript is not enabled
+function mwInsertEditButton(parent, item) {
+       var image = document.createElement("img");
+       image.width = 23;
+       image.height = 22;
+       image.className = "mw-toolbar-editbutton";
+       if (item.imageId) image.id = item.imageId;
+       image.src = item.imageFile;
+       image.border = 0;
+       image.alt = item.speedTip;
+       image.title = item.speedTip;
+       image.style.cursor = "pointer";
+       image.onclick = function() {
+               insertTags(item.tagOpen, item.tagClose, item.sampleText);
+               return false;
+       };
+
+       parent.appendChild(image);
+       return true;
+}
+
+function mwSetupToolbar() {
+       var toolbar = document.getElementById('toolbar');
+       if (!toolbar) { return false; }
+
+       var textbox = document.getElementById('wpTextbox1');
+       if (!textbox) { return false; }
+
+       // Don't generate buttons for browsers which don't fully
+       // support it.
+       if (!(document.selection && document.selection.createRange)
+               && textbox.selectionStart === null) {
+               return false;
+       }
+
+       for (var i = 0; i < mwEditButtons.length; i++) {
+               mwInsertEditButton(toolbar, mwEditButtons[i]);
+       }
+       for (var i = 0; i < mwCustomEditButtons.length; i++) {
+               mwInsertEditButton(toolbar, mwCustomEditButtons[i]);
+       }
+       return true;
+}
+
+// apply tagOpen/tagClose to selection in textarea,
+// use sampleText instead of selection if there is none
+function insertTags(tagOpen, tagClose, sampleText) {
+       var txtarea;
+       if (document.editform) {
+               txtarea = document.editform.wpTextbox1;
+       } else {
+               // some alternate form? take the first one we can find
+               var areas = document.getElementsByTagName('textarea');
+               txtarea = areas[0];
+       }
+       var selText, isSample = false;
+
+       if (document.selection  && document.selection.createRange) { // IE/Opera
+
+               //save window scroll position
+               if (document.documentElement && document.documentElement.scrollTop)
+                       var winScroll = document.documentElement.scrollTop
+               else if (document.body)
+                       var winScroll = document.body.scrollTop;
+               //get current selection  
+               txtarea.focus();
+               var range = document.selection.createRange();
+               selText = range.text;
+               //insert tags
+               checkSelectedText();
+               range.text = tagOpen + selText + tagClose;
+               //mark sample text as selected
+               if (isSample && range.moveStart) {
+                       if (window.opera)
+                               tagClose = tagClose.replace(/\n/g,'');
+                       range.moveStart('character', - tagClose.length - selText.length); 
+                       range.moveEnd('character', - tagClose.length); 
+               }
+               range.select();   
+               //restore window scroll position
+               if (document.documentElement && document.documentElement.scrollTop)
+                       document.documentElement.scrollTop = winScroll
+               else if (document.body)
+                       document.body.scrollTop = winScroll;
+
+       } else if (txtarea.selectionStart || txtarea.selectionStart == '0') { // Mozilla
+
+               //save textarea scroll position
+               var textScroll = txtarea.scrollTop;
+               //get current selection
+               txtarea.focus();
+               var startPos = txtarea.selectionStart;
+               var endPos = txtarea.selectionEnd;
+               selText = txtarea.value.substring(startPos, endPos);
+               //insert tags
+               checkSelectedText();
+               txtarea.value = txtarea.value.substring(0, startPos)
+                       + tagOpen + selText + tagClose
+                       + txtarea.value.substring(endPos, txtarea.value.length);
+               //set new selection
+               if (isSample) {
+                       txtarea.selectionStart = startPos + tagOpen.length;
+                       txtarea.selectionEnd = startPos + tagOpen.length + selText.length;
+               } else {
+                       txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length;
+                       txtarea.selectionEnd = txtarea.selectionStart;
+               }
+               //restore textarea scroll position
+               txtarea.scrollTop = textScroll;
+       } 
+
+       function checkSelectedText(){
+               if (!selText) {
+                       selText = sampleText;
+                       isSample = true;
+               } else if (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char
+                       selText = selText.substring(0, selText.length - 1);
+                       tagClose += ' '
+               } 
+       }
+
+}
+
+/**
+ * Restore the edit box scroll state following a preview operation,
+ * and set up a form submission handler to remember this state
+ */
+function scrollEditBox() {
+       var editBox = document.getElementById( 'wpTextbox1' );
+       var scrollTop = document.getElementById( 'wpScrolltop' );
+       var editForm = document.getElementById( 'editform' );
+       if( editBox && scrollTop ) {
+               if( scrollTop.value )
+                       editBox.scrollTop = scrollTop.value;
+               addHandler( editForm, 'submit', function() {
+                       document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop; 
+               } );
+       }
+}
+hookEvent( 'load', scrollEditBox );
+hookEvent( 'load', mwSetupToolbar );
diff --git a/skins/common/enhancedchanges.js b/skins/common/enhancedchanges.js
new file mode 100644 (file)
index 0000000..b1789c9
--- /dev/null
@@ -0,0 +1,40 @@
+/* 
+  JavaScript file for enhanced recentchanges
+ */
+/*
+  * Add the CSS to hide parts that should be collapsed
+  *
+  * We do this with JS so everything will be expanded by default
+  * if JS is disabled
+ */
+appendCSS('.mw-changeslist-hidden {'+
+       '       display:none;'+
+       '}'+
+       'div.mw-changeslist-expanded {'+
+       '       display:block;'+
+       '}'+
+       'span.mw-changeslist-expanded {'+
+       '       display:inline !important;'+
+       '       visibility:visible !important;'+
+       '}'
+);
+
+/*
+ * Switch an RC line between hidden/shown
+ * @param int idNumber : the id number of the RC group
+*/ 
+function toggleVisibility(idNumber) {
+       var openarrow = document.getElementById("mw-rc-openarrow-"+idNumber);
+       var closearrow = document.getElementById("mw-rc-closearrow-"+idNumber);
+       var subentries = document.getElementById("mw-rc-subentries-"+idNumber);
+       if (openarrow.className == 'mw-changeslist-expanded') {
+               openarrow.className = 'mw-changeslist-hidden';
+               closearrow.className = 'mw-changeslist-expanded';
+               subentries.className = 'mw-changeslist-expanded';
+       } else {
+               openarrow.className = 'mw-changeslist-expanded';
+               closearrow.className = 'mw-changeslist-hidden';
+               subentries.className = 'mw-changeslist-hidden';
+       }
+}
diff --git a/skins/common/feed.css b/skins/common/feed.css
new file mode 100644 (file)
index 0000000..9439663
--- /dev/null
@@ -0,0 +1,95 @@
+/*
+Make RSS and Atom feeds at least semi-legible to folk who accidentally
+load them in a browser...
+
+Compatibility:
+* Mozilla is fine.
+* Safari 1.2: the RSS <link> text isn't shown
+* Opera 7.5 uses the style sheet instead of its native RSS mode.
+* IE/Mac 5.2: none of the :before content works; doesn't get the charset right and displays garbage for non-ASCII.
+* IE/Win 6.0: No background color, borders, font size, font weight, or :before content.
+
+*/
+
+/* RSS: */ rss, channel, title, link, description, language, generator, lastBuildDate, item, pubDate, author, comments, creator,
+/* Atom: */ feed, id, modified, tagline, entry, issued, created, updated, summary, comment {
+       display: block;
+}
+
+rss, feed {
+       background: white;
+       color: black;
+       margin: 1em;
+       font-family: "Verdana", "Tahoma", "Arial", "Helvetica", sans-serif;
+       line-height: 1.5em;
+       font-size: 76%;
+}
+
+rss:before {
+       content: "This RSS feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
+}
+
+feed:before {
+       content: "This Atom feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser.";
+}
+rss:before, feed:before {
+       color: red;
+       text-align: center;
+       line-height: 2em;
+}
+
+channel>title,
+item>title,
+feed>title,
+entry>title {
+       font-weight: bold;
+       border-bottom: solid 1px #aaa;
+       margin-left: -0.5em;
+}
+channel>title, feed>title {
+       font-size: larger;
+}
+item>title, entry>title {
+       font-size: large;
+}
+item, entry {
+       margin-top: 1em;
+       margin-left: 2em;
+}
+
+item>description, entry>summary {
+       white-space: pre;
+       overflow: auto;
+       background: #f8f8ff;
+}
+
+pubDate:before { content: "Date: " }
+link:before { content: "Link: " }
+author:before, creator:before { content: "Author: " }
+description:before { content: "Description: " }
+id:before { content: "Id: " }
+
+generator:before { content: "Generator: " }
+language:before { content: "Language: " }
+lastBuildDate:before { content: "Updated: " }
+comments:before { content: "Comments page: " }
+
+tagline:before { content: "Tagline: " }
+issued:before { content: "Issued: " }
+created:before { content: "Created: " }
+modified:before { content: "Modified: " }
+updated:before { content: "Updated: " }
+summary:before { content: "Summary: " }
+comment:before { content: "Comment: " }
+
+pubDate:before, link:before, author:before, description:before,
+language:before, generator:before, lastBuildDate:before, comments:before,
+tagline:before, issued:before, created:before, modified:before,
+summary:before, comment:before, creator:before, id:before, updated:before {
+       color: #224;
+       font-weight: bold;
+}
+
+feed link:after {
+       content: attr(href);
+}
diff --git a/skins/common/history.js b/skins/common/history.js
new file mode 100644 (file)
index 0000000..57e6184
--- /dev/null
@@ -0,0 +1,83 @@
+function historyRadios(parent) {
+       var inputs = parent.getElementsByTagName('input');
+       var radios = [];
+       for (var i = 0; i < inputs.length; i++) {
+               if (inputs[i].name == "diff" || inputs[i].name == "oldid") {
+                       radios[radios.length] = inputs[i];
+               }
+       }
+       return radios;
+}
+
+// check selection and tweak visibility/class onclick
+function diffcheck() {
+       var dli = false; // the li where the diff radio is checked
+       var oli = false; // the li where the oldid radio is checked
+       var hf = document.getElementById('pagehistory');
+       if (!hf) {
+               return true;
+       }
+       var lis = hf.getElementsByTagName('li');
+       for (var i=0;i<lis.length;i++) {
+               var inputs = historyRadios(lis[i]);
+               if (inputs[1] && inputs[0]) {
+                       if (inputs[1].checked || inputs[0].checked) { // this row has a checked radio button
+                               if (inputs[1].checked && inputs[0].checked && inputs[0].value == inputs[1].value) {
+                                       return false;
+                               }
+                               if (oli) { // it's the second checked radio
+                                       if (inputs[1].checked) {
+                                               oli.className = "selected";
+                                               return false;
+                                       }
+                               } else if (inputs[0].checked) {
+                                       return false;
+                               }
+                               if (inputs[0].checked) {
+                                       dli = lis[i];
+                               }
+                               if (!oli) {
+                                       inputs[0].style.visibility = 'hidden';
+                               }
+                               if (dli) {
+                                       inputs[1].style.visibility = 'hidden';
+                               }
+                               lis[i].className = "selected";
+                               oli = lis[i];
+                       }  else { // no radio is checked in this row
+                               if (!oli) {
+                                       inputs[0].style.visibility = 'hidden';
+                               } else {
+                                       inputs[0].style.visibility = 'visible';
+                               }
+                               if (dli) {
+                                       inputs[1].style.visibility = 'hidden';
+                               } else {
+                                       inputs[1].style.visibility = 'visible';
+                               }
+                               lis[i].className = "";
+                       }
+               }
+       }
+       return true;
+}
+
+// page history stuff
+// attach event handlers to the input elements on history page
+function histrowinit() {
+       var hf = document.getElementById('pagehistory');
+       if (!hf) {
+               return;
+       }
+       var lis = hf.getElementsByTagName('li');
+       for (var i = 0; i < lis.length; i++) {
+               var inputs = historyRadios(lis[i]);
+               if (inputs[0] && inputs[1]) {
+                       inputs[0].onclick = diffcheck;
+                       inputs[1].onclick = diffcheck;
+               }
+       }
+       diffcheck();
+}
+
+hookEvent("load", histrowinit);
diff --git a/skins/common/images/Arr_.png b/skins/common/images/Arr_.png
new file mode 100644 (file)
index 0000000..83fafc7
Binary files /dev/null and b/skins/common/images/Arr_.png differ
diff --git a/skins/common/images/Arr_d.png b/skins/common/images/Arr_d.png
new file mode 100644 (file)
index 0000000..421dd10
Binary files /dev/null and b/skins/common/images/Arr_d.png differ
diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png
new file mode 100644 (file)
index 0000000..9db6623
Binary files /dev/null and b/skins/common/images/Arr_l.png differ
diff --git a/skins/common/images/Arr_r.png b/skins/common/images/Arr_r.png
new file mode 100644 (file)
index 0000000..d1b161b
Binary files /dev/null and b/skins/common/images/Arr_r.png differ
diff --git a/skins/common/images/Arr_r.xcf b/skins/common/images/Arr_r.xcf
new file mode 100644 (file)
index 0000000..83b7b2a
Binary files /dev/null and b/skins/common/images/Arr_r.xcf differ
diff --git a/skins/common/images/Arr_u.png b/skins/common/images/Arr_u.png
new file mode 100644 (file)
index 0000000..b8e3b6c
Binary files /dev/null and b/skins/common/images/Arr_u.png differ
diff --git a/skins/common/images/Checker-16x16.png b/skins/common/images/Checker-16x16.png
new file mode 100644 (file)
index 0000000..3e9e3d0
Binary files /dev/null and b/skins/common/images/Checker-16x16.png differ
diff --git a/skins/common/images/Zoom_sans.gif b/skins/common/images/Zoom_sans.gif
new file mode 100644 (file)
index 0000000..6ba0adc
Binary files /dev/null and b/skins/common/images/Zoom_sans.gif differ
diff --git a/skins/common/images/ar/button_bold.png b/skins/common/images/ar/button_bold.png
new file mode 100644 (file)
index 0000000..93b1783
Binary files /dev/null and b/skins/common/images/ar/button_bold.png differ
diff --git a/skins/common/images/ar/button_headline.png b/skins/common/images/ar/button_headline.png
new file mode 100644 (file)
index 0000000..3cf2a70
Binary files /dev/null and b/skins/common/images/ar/button_headline.png differ
diff --git a/skins/common/images/ar/button_italic.png b/skins/common/images/ar/button_italic.png
new file mode 100644 (file)
index 0000000..0421846
Binary files /dev/null and b/skins/common/images/ar/button_italic.png differ
diff --git a/skins/common/images/ar/button_link.png b/skins/common/images/ar/button_link.png
new file mode 100644 (file)
index 0000000..ed66a7f
Binary files /dev/null and b/skins/common/images/ar/button_link.png differ
diff --git a/skins/common/images/ar/button_nowiki.png b/skins/common/images/ar/button_nowiki.png
new file mode 100644 (file)
index 0000000..97d0585
Binary files /dev/null and b/skins/common/images/ar/button_nowiki.png differ
diff --git a/skins/common/images/arrow_disabled_first_25.png b/skins/common/images/arrow_disabled_first_25.png
new file mode 100644 (file)
index 0000000..aaa4bec
Binary files /dev/null and b/skins/common/images/arrow_disabled_first_25.png differ
diff --git a/skins/common/images/arrow_disabled_last_25.png b/skins/common/images/arrow_disabled_last_25.png
new file mode 100644 (file)
index 0000000..7882fd8
Binary files /dev/null and b/skins/common/images/arrow_disabled_last_25.png differ
diff --git a/skins/common/images/arrow_disabled_left_25.png b/skins/common/images/arrow_disabled_left_25.png
new file mode 100644 (file)
index 0000000..e0c3004
Binary files /dev/null and b/skins/common/images/arrow_disabled_left_25.png differ
diff --git a/skins/common/images/arrow_disabled_right_25.png b/skins/common/images/arrow_disabled_right_25.png
new file mode 100644 (file)
index 0000000..bfec3e2
Binary files /dev/null and b/skins/common/images/arrow_disabled_right_25.png differ
diff --git a/skins/common/images/arrow_first.svg b/skins/common/images/arrow_first.svg
new file mode 100644 (file)
index 0000000..c1d8e36
--- /dev/null
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="512.85712"
+   height="600"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   version="1.0"
+   sodipodi:docbase="C:\htdocs\w\skins\common\images"
+   sodipodi:docname="big_arrow_first.svg"
+   inkscape:export-filename="C:\htdocs\w\skins\common\images\big_arrow_left.png"
+   inkscape:export-xdpi="5.0520902"
+   inkscape:export-ydpi="5.0520902">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="375"
+     inkscape:cy="520"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="600.24px"
+     height="600.88px"
+     inkscape:window-width="853"
+     inkscape:window-height="573"
+     inkscape:window-x="66"
+     inkscape:window-y="87" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-239.3783,-208.0743)">
+    <path
+       sodipodi:type="star"
+       style="fill:#00a;fill-opacity:1;fill-rule:evenodd;stroke:#00a;stroke-width:10.35552788;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path1874"
+       sodipodi:sides="3"
+       sodipodi:cx="94.285713"
+       sodipodi:cy="343.79074"
+       sodipodi:r1="75.484825"
+       sodipodi:r2="37.742413"
+       sodipodi:arg1="1.056345"
+       sodipodi:arg2="2.1035426"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 131.42857,409.50502 L 18.804046,343.10026 L 132.62452,278.76694 L 131.42857,409.50502 z "
+       transform="matrix(3.596688,0,0,4.278606,254.9147,-964.348)" />
+    <rect
+       style="fill:#00a;fill-opacity:1;stroke:#00a;stroke-width:39.31948471;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="rect3737"
+       width="20.680517"
+       height="560.68054"
+       x="259.03799"
+       y="227.73401" />
+  </g>
+</svg>
diff --git a/skins/common/images/arrow_first_25.png b/skins/common/images/arrow_first_25.png
new file mode 100644 (file)
index 0000000..b6351c5
Binary files /dev/null and b/skins/common/images/arrow_first_25.png differ
diff --git a/skins/common/images/arrow_last_25.png b/skins/common/images/arrow_last_25.png
new file mode 100644 (file)
index 0000000..d416ab3
Binary files /dev/null and b/skins/common/images/arrow_last_25.png differ
diff --git a/skins/common/images/arrow_left.svg b/skins/common/images/arrow_left.svg
new file mode 100644 (file)
index 0000000..bd4bbc7
--- /dev/null
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="450"
+   height="600"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   version="1.0"
+   sodipodi:docbase="C:\htdocs\w\skins\common\images"
+   sodipodi:docname="big_arrow_left.svg"
+   inkscape:export-filename="C:\htdocs\w\skins\common\images\big_arrow_left.png"
+   inkscape:export-xdpi="5.0520902"
+   inkscape:export-ydpi="5.0520902">
+  <defs
+     id="defs4" />
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="10000"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="0.35"
+     inkscape:cx="375"
+     inkscape:cy="520"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     width="600.24px"
+     height="600.88px"
+     inkscape:window-width="853"
+     inkscape:window-height="573"
+     inkscape:window-x="66"
+     inkscape:window-y="87" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-302.2354,-208.0743)">
+    <path
+       sodipodi:type="star"
+       style="fill:#00a;fill-opacity:1;fill-rule:evenodd;stroke:#00a;stroke-width:10.35552788;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       id="path1874"
+       sodipodi:sides="3"
+       sodipodi:cx="94.285713"
+       sodipodi:cy="343.79074"
+       sodipodi:r1="75.484825"
+       sodipodi:r2="37.742413"
+       sodipodi:arg1="1.056345"
+       sodipodi:arg2="2.1035426"
+       inkscape:flatsided="true"
+       inkscape:rounded="0"
+       inkscape:randomized="0"
+       d="M 131.42857,409.50502 L 18.804046,343.10026 L 132.62452,278.76694 L 131.42857,409.50502 z "
+       transform="matrix(3.596688,0,0,4.278606,254.9147,-964.348)" />
+  </g>
+</svg>
diff --git a/skins/common/images/arrow_left_25.png b/skins/common/images/arrow_left_25.png
new file mode 100644 (file)
index 0000000..fd05fa6
Binary files /dev/null and b/skins/common/images/arrow_left_25.png differ
diff --git a/skins/common/images/arrow_right_25.png b/skins/common/images/arrow_right_25.png
new file mode 100644 (file)
index 0000000..cf1845c
Binary files /dev/null and b/skins/common/images/arrow_right_25.png differ
diff --git a/skins/common/images/be-tarask/button_bold.png b/skins/common/images/be-tarask/button_bold.png
new file mode 100644 (file)
index 0000000..f662c76
Binary files /dev/null and b/skins/common/images/be-tarask/button_bold.png differ
diff --git a/skins/common/images/be-tarask/button_italic.png b/skins/common/images/be-tarask/button_italic.png
new file mode 100644 (file)
index 0000000..88e1b3b
Binary files /dev/null and b/skins/common/images/be-tarask/button_italic.png differ
diff --git a/skins/common/images/be-tarask/button_link.png b/skins/common/images/be-tarask/button_link.png
new file mode 100644 (file)
index 0000000..f68d5d5
Binary files /dev/null and b/skins/common/images/be-tarask/button_link.png differ
diff --git a/skins/common/images/bullet.gif b/skins/common/images/bullet.gif
new file mode 100644 (file)
index 0000000..b43de48
Binary files /dev/null and b/skins/common/images/bullet.gif differ
diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png
new file mode 100644 (file)
index 0000000..5e52dee
Binary files /dev/null and b/skins/common/images/button_bold.png differ
diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png
new file mode 100644 (file)
index 0000000..12ec5f2
Binary files /dev/null and b/skins/common/images/button_extlink.png differ
diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png
new file mode 100644 (file)
index 0000000..aa0ca54
Binary files /dev/null and b/skins/common/images/button_headline.png differ
diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png
new file mode 100644 (file)
index 0000000..19cfc48
Binary files /dev/null and b/skins/common/images/button_hr.png differ
diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png
new file mode 100644 (file)
index 0000000..6c3c330
Binary files /dev/null and b/skins/common/images/button_image.png differ
diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png
new file mode 100644 (file)
index 0000000..96b1fb9
Binary files /dev/null and b/skins/common/images/button_italic.png differ
diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png
new file mode 100644 (file)
index 0000000..e9507b9
Binary files /dev/null and b/skins/common/images/button_link.png differ
diff --git a/skins/common/images/button_math.png b/skins/common/images/button_math.png
new file mode 100644 (file)
index 0000000..e91fb61
Binary files /dev/null and b/skins/common/images/button_math.png differ
diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png
new file mode 100644 (file)
index 0000000..0207079
Binary files /dev/null and b/skins/common/images/button_media.png differ
diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png
new file mode 100644 (file)
index 0000000..7b2d539
Binary files /dev/null and b/skins/common/images/button_nowiki.png differ
diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png
new file mode 100644 (file)
index 0000000..ef3a46d
Binary files /dev/null and b/skins/common/images/button_sig.png differ
diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png
new file mode 100644 (file)
index 0000000..8e9cc26
Binary files /dev/null and b/skins/common/images/button_template.png differ
diff --git a/skins/common/images/cyrl/button_bold.png b/skins/common/images/cyrl/button_bold.png
new file mode 100644 (file)
index 0000000..1c932f8
Binary files /dev/null and b/skins/common/images/cyrl/button_bold.png differ
diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png
new file mode 100644 (file)
index 0000000..f5e588e
Binary files /dev/null and b/skins/common/images/cyrl/button_italic.png differ
diff --git a/skins/common/images/cyrl/button_link.png b/skins/common/images/cyrl/button_link.png
new file mode 100644 (file)
index 0000000..a690cb3
Binary files /dev/null and b/skins/common/images/cyrl/button_link.png differ
diff --git a/skins/common/images/de/button_bold.png b/skins/common/images/de/button_bold.png
new file mode 100644 (file)
index 0000000..8386828
Binary files /dev/null and b/skins/common/images/de/button_bold.png differ
diff --git a/skins/common/images/de/button_italic.png b/skins/common/images/de/button_italic.png
new file mode 100644 (file)
index 0000000..ec71999
Binary files /dev/null and b/skins/common/images/de/button_italic.png differ
diff --git a/skins/common/images/diffunderline.gif b/skins/common/images/diffunderline.gif
new file mode 100644 (file)
index 0000000..e062c56
Binary files /dev/null and b/skins/common/images/diffunderline.gif differ
diff --git a/skins/common/images/fa/button_bold.png b/skins/common/images/fa/button_bold.png
new file mode 100644 (file)
index 0000000..2f269a8
Binary files /dev/null and b/skins/common/images/fa/button_bold.png differ
diff --git a/skins/common/images/fa/button_headline.png b/skins/common/images/fa/button_headline.png
new file mode 100644 (file)
index 0000000..ef9d109
Binary files /dev/null and b/skins/common/images/fa/button_headline.png differ
diff --git a/skins/common/images/fa/button_italic.png b/skins/common/images/fa/button_italic.png
new file mode 100644 (file)
index 0000000..8498584
Binary files /dev/null and b/skins/common/images/fa/button_italic.png differ
diff --git a/skins/common/images/fa/button_link.png b/skins/common/images/fa/button_link.png
new file mode 100644 (file)
index 0000000..4ad5ef5
Binary files /dev/null and b/skins/common/images/fa/button_link.png differ
diff --git a/skins/common/images/fa/button_nowiki.png b/skins/common/images/fa/button_nowiki.png
new file mode 100644 (file)
index 0000000..97d0585
Binary files /dev/null and b/skins/common/images/fa/button_nowiki.png differ
diff --git a/skins/common/images/fileicon.xcf b/skins/common/images/fileicon.xcf
new file mode 100644 (file)
index 0000000..85a0a61
Binary files /dev/null and b/skins/common/images/fileicon.xcf differ
diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png
new file mode 100644 (file)
index 0000000..1371aba
Binary files /dev/null and b/skins/common/images/gnu-fdl.png differ
diff --git a/skins/common/images/gnu-fdl.xcf b/skins/common/images/gnu-fdl.xcf
new file mode 100644 (file)
index 0000000..364440d
Binary files /dev/null and b/skins/common/images/gnu-fdl.xcf differ
diff --git a/skins/common/images/groups-logo.png b/skins/common/images/groups-logo.png
new file mode 100644 (file)
index 0000000..f8ace60
Binary files /dev/null and b/skins/common/images/groups-logo.png differ
diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png
new file mode 100644 (file)
index 0000000..6da6916
Binary files /dev/null and b/skins/common/images/icons/fileicon-c.png differ
diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png
new file mode 100644 (file)
index 0000000..ba54e77
Binary files /dev/null and b/skins/common/images/icons/fileicon-cpp.png differ
diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png
new file mode 100644 (file)
index 0000000..ac1e2cf
Binary files /dev/null and b/skins/common/images/icons/fileicon-deb.png differ
diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png
new file mode 100644 (file)
index 0000000..2e1e2c9
Binary files /dev/null and b/skins/common/images/icons/fileicon-djvu.png differ
diff --git a/skins/common/images/icons/fileicon-djvu.xcf b/skins/common/images/icons/fileicon-djvu.xcf
new file mode 100644 (file)
index 0000000..8043dcd
Binary files /dev/null and b/skins/common/images/icons/fileicon-djvu.xcf differ
diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png
new file mode 100644 (file)
index 0000000..6c7aa1a
Binary files /dev/null and b/skins/common/images/icons/fileicon-dvi.png differ
diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png
new file mode 100644 (file)
index 0000000..6ccf182
Binary files /dev/null and b/skins/common/images/icons/fileicon-exe.png differ
diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png
new file mode 100644 (file)
index 0000000..d091aff
Binary files /dev/null and b/skins/common/images/icons/fileicon-h.png differ
diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png
new file mode 100644 (file)
index 0000000..7c47952
Binary files /dev/null and b/skins/common/images/icons/fileicon-html.png differ
diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png
new file mode 100644 (file)
index 0000000..b4192e9
Binary files /dev/null and b/skins/common/images/icons/fileicon-iso.png differ
diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png
new file mode 100644 (file)
index 0000000..757c6ae
Binary files /dev/null and b/skins/common/images/icons/fileicon-java.png differ
diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png
new file mode 100644 (file)
index 0000000..aa82607
Binary files /dev/null and b/skins/common/images/icons/fileicon-mid.png differ
diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png
new file mode 100644 (file)
index 0000000..2c0da0d
Binary files /dev/null and b/skins/common/images/icons/fileicon-mov.png differ
diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png
new file mode 100644 (file)
index 0000000..bf051cb
Binary files /dev/null and b/skins/common/images/icons/fileicon-o.png differ
diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png
new file mode 100644 (file)
index 0000000..b8ba771
Binary files /dev/null and b/skins/common/images/icons/fileicon-ogg.png differ
diff --git a/skins/common/images/icons/fileicon-ogg.xcf b/skins/common/images/icons/fileicon-ogg.xcf
new file mode 100644 (file)
index 0000000..a91024b
Binary files /dev/null and b/skins/common/images/icons/fileicon-ogg.xcf differ
diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png
new file mode 100644 (file)
index 0000000..ee39b6c
Binary files /dev/null and b/skins/common/images/icons/fileicon-pdf.png differ
diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png
new file mode 100644 (file)
index 0000000..f1f504d
Binary files /dev/null and b/skins/common/images/icons/fileicon-ps.png differ
diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png
new file mode 100644 (file)
index 0000000..5ba04e5
Binary files /dev/null and b/skins/common/images/icons/fileicon-rm.png differ
diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png
new file mode 100644 (file)
index 0000000..0f1c3b8
Binary files /dev/null and b/skins/common/images/icons/fileicon-rpm.png differ
diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png
new file mode 100644 (file)
index 0000000..8dc6d30
Binary files /dev/null and b/skins/common/images/icons/fileicon-svg.png differ
diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png
new file mode 100644 (file)
index 0000000..a4b15d7
Binary files /dev/null and b/skins/common/images/icons/fileicon-tar.png differ
diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png
new file mode 100644 (file)
index 0000000..ee8c022
Binary files /dev/null and b/skins/common/images/icons/fileicon-tex.png differ
diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png
new file mode 100644 (file)
index 0000000..1b53066
Binary files /dev/null and b/skins/common/images/icons/fileicon-ttf.png differ
diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png
new file mode 100644 (file)
index 0000000..76e9890
Binary files /dev/null and b/skins/common/images/icons/fileicon-txt.png differ
diff --git a/skins/common/images/icons/fileicon.png b/skins/common/images/icons/fileicon.png
new file mode 100644 (file)
index 0000000..5675170
Binary files /dev/null and b/skins/common/images/icons/fileicon.png differ
diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png
new file mode 100644 (file)
index 0000000..0761a1e
Binary files /dev/null and b/skins/common/images/ksh/button_S_italic.png differ
diff --git a/skins/common/images/link_icon.gif b/skins/common/images/link_icon.gif
new file mode 100644 (file)
index 0000000..815ccb1
Binary files /dev/null and b/skins/common/images/link_icon.gif differ
diff --git a/skins/common/images/magnify-clip.png b/skins/common/images/magnify-clip.png
new file mode 100644 (file)
index 0000000..50abcb6
Binary files /dev/null and b/skins/common/images/magnify-clip.png differ
diff --git a/skins/common/images/mediawiki-small.xcf b/skins/common/images/mediawiki-small.xcf
new file mode 100644 (file)
index 0000000..7535517
Binary files /dev/null and b/skins/common/images/mediawiki-small.xcf differ
diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png
new file mode 100644 (file)
index 0000000..69fce98
Binary files /dev/null and b/skins/common/images/mediawiki.png differ
diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png
new file mode 100644 (file)
index 0000000..ce1765d
Binary files /dev/null and b/skins/common/images/poweredby_mediawiki_88x31.png differ
diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png
new file mode 100644 (file)
index 0000000..e5fb33c
Binary files /dev/null and b/skins/common/images/public-domain.png differ
diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png
new file mode 100644 (file)
index 0000000..9110ca1
Binary files /dev/null and b/skins/common/images/redirectltr.png differ
diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png
new file mode 100644 (file)
index 0000000..60fd59d
Binary files /dev/null and b/skins/common/images/redirectrtl.png differ
diff --git a/skins/common/images/sort_down.gif b/skins/common/images/sort_down.gif
new file mode 100644 (file)
index 0000000..5ff0816
Binary files /dev/null and b/skins/common/images/sort_down.gif differ
diff --git a/skins/common/images/sort_none.gif b/skins/common/images/sort_none.gif
new file mode 100644 (file)
index 0000000..6bb0282
Binary files /dev/null and b/skins/common/images/sort_none.gif differ
diff --git a/skins/common/images/sort_up.gif b/skins/common/images/sort_up.gif
new file mode 100644 (file)
index 0000000..5300296
Binary files /dev/null and b/skins/common/images/sort_up.gif differ
diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif
new file mode 100644 (file)
index 0000000..bdd59d5
Binary files /dev/null and b/skins/common/images/spinner.gif differ
diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png
new file mode 100644 (file)
index 0000000..6b3160e
Binary files /dev/null and b/skins/common/images/tooltip_icon.png differ
diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png
new file mode 100644 (file)
index 0000000..49913f6
Binary files /dev/null and b/skins/common/images/wiki.png differ
diff --git a/skins/common/metadata.js b/skins/common/metadata.js
new file mode 100644 (file)
index 0000000..a73b693
--- /dev/null
@@ -0,0 +1,49 @@
+// Exif metadata display for MediaWiki file uploads
+//
+// Add an expand/collapse link and collapse by default if set to
+// (with JS disabled, user will see all items)
+//
+// attachMetadataToggle("mw_metadata", "More...", "Fewer...");
+
+
+function attachMetadataToggle(tableId, showText, hideText) {
+       if (document.createTextNode) {
+               var box = document.getElementById(tableId);
+               if (!box)
+                       return false;
+
+               var tbody = box.getElementsByTagName('tbody')[0];
+
+               var row = document.createElement('tr');
+
+               var col = document.createElement('td');
+               col.colSpan = 2;
+
+               var link = document.createElement('a');
+               link.href = '#';
+
+               link.onclick = function() {
+                       if (box.className == 'mw_metadata collapsed') {
+                               changeText(link, hideText);
+                               box.className = 'mw_metadata expanded';
+                       } else {
+                               changeText(link, showText);
+                               box.className = 'mw_metadata collapsed';
+                       }
+                       return false;
+               }
+
+               var text = document.createTextNode(hideText);
+
+               link.appendChild(text);
+               col.appendChild(link);
+               row.appendChild(col);
+               tbody.appendChild(row);
+
+               // And collapse!
+               link.onclick();
+
+               return true;
+       }
+       return false;
+}
diff --git a/skins/common/mwsuggest.js b/skins/common/mwsuggest.js
new file mode 100644 (file)
index 0000000..061a645
--- /dev/null
@@ -0,0 +1,851 @@
+/*
+ * OpenSearch ajax suggestion engine for MediaWiki
+ *
+ * uses core MediaWiki open search support to fetch suggestions
+ * and show them below search boxes and other inputs
+ *
+ * by Robert Stojnic (April 2008)
+ */
+
+// search_box_id -> Results object
+var os_map = {};
+// cached data, url -> json_text
+var os_cache = {};
+// global variables for suggest_keypress
+var os_cur_keypressed = 0;
+var os_last_keypress = 0;
+var os_keypressed_count = 0;
+// type: Timer
+var os_timer = null;
+// tie mousedown/up events
+var os_mouse_pressed = false;
+var os_mouse_num = -1;
+// if true, the last change was made by mouse (and not keyboard)
+var os_mouse_moved = false;
+// delay between keypress and suggestion (in ms)
+var os_search_timeout = 250;
+// these pairs of inputs/forms will be autoloaded at startup
+var os_autoload_inputs = new Array('searchInput', 'searchInput2', 'powerSearchText', 'searchText');
+var os_autoload_forms = new Array('searchform', 'searchform2', 'powersearch', 'search' );
+// if we stopped the service
+var os_is_stopped = false;
+// max lines to show in suggest table
+var os_max_lines_per_suggest = 7;
+// number of steps to animate expansion/contraction of container width
+var os_animation_steps = 6;
+// num of pixels of smallest step
+var os_animation_min_step = 2;
+// delay between steps (in ms)
+var os_animation_delay = 30;
+// max width of container in percent of normal size (1 == 100%)
+var os_container_max_width = 2;
+// currently active animation timer
+var os_animation_timer = null;
+
+/** Timeout timer class that will fetch the results */
+function os_Timer(id,r,query){
+       this.id = id;
+       this.r = r;
+       this.query = query;
+}
+
+/** Timer user to animate expansion/contraction of container width */
+function os_AnimationTimer(r, target){
+       this.r = r;
+       var current = document.getElementById(r.container).offsetWidth;
+       this.inc = Math.round((target-current) / os_animation_steps);
+       if(this.inc < os_animation_min_step && this.inc >=0)
+               this.inc = os_animation_min_step; // minimal animation step
+       if(this.inc > -os_animation_min_step && this.inc <0)
+               this.inc = -os_animation_min_step;
+       this.target = target;
+}
+
+/** Property class for single search box */
+function os_Results(name, formname){
+       this.searchform = formname; // id of the searchform
+       this.searchbox = name; // id of the searchbox
+       this.container = name+"Suggest"; // div that holds results
+       this.resultTable = name+"Result"; // id base for the result table (+num = table row)
+       this.resultText = name+"ResultText"; // id base for the spans within result tables (+num)
+       this.toggle = name+"Toggle"; // div that has the toggle (enable/disable) link
+       this.query = null; // last processed query
+       this.results = null;  // parsed titles
+       this.resultCount = 0; // number of results
+       this.original = null; // query that user entered
+       this.selected = -1; // which result is selected
+       this.containerCount = 0; // number of results visible in container
+       this.containerRow = 0; // height of result field in the container
+       this.containerTotal = 0; // total height of the container will all results
+       this.visible = false; // if container is visible
+}
+
+/** Hide results div */
+function os_hideResults(r){
+       var c = document.getElementById(r.container);
+       if(c != null)
+               c.style.visibility = "hidden";
+       r.visible = false;
+       r.selected = -1;
+}
+
+/** Show results div */
+function os_showResults(r){
+       if(os_is_stopped)
+               return;
+       os_fitContainer(r);
+       var c = document.getElementById(r.container);
+       r.selected = -1;
+       if(c != null){
+               c.scrollTop = 0;
+               c.style.visibility = "visible";
+               r.visible = true;
+       }
+}
+
+function os_operaWidthFix(x){
+       // TODO: better css2 incompatibility detection here
+       if(is_opera || is_khtml || navigator.userAgent.toLowerCase().indexOf('firefox/1')!=-1){
+               return 30; // opera&konqueror & old firefox don't understand overflow-x, estimate scrollbar width
+       }
+       return 0;
+}
+
+function os_encodeQuery(value){
+  if (encodeURIComponent) {
+    return encodeURIComponent(value);
+  }
+  if(escape) {
+    return escape(value);
+  }
+  return null;
+}
+function os_decodeValue(value){
+  if (decodeURIComponent) {
+    return decodeURIComponent(value);
+  }
+  if(unescape){
+       return unescape(value);
+  }
+  return null;
+}
+
+/** Brower-dependent functions to find window inner size, and scroll status */
+function f_clientWidth() {
+       return f_filterResults (
+               window.innerWidth ? window.innerWidth : 0,
+               document.documentElement ? document.documentElement.clientWidth : 0,
+               document.body ? document.body.clientWidth : 0
+       );
+}
+function f_clientHeight() {
+       return f_filterResults (
+               window.innerHeight ? window.innerHeight : 0,
+               document.documentElement ? document.documentElement.clientHeight : 0,
+               document.body ? document.body.clientHeight : 0
+       );
+}
+function f_scrollLeft() {
+       return f_filterResults (
+               window.pageXOffset ? window.pageXOffset : 0,
+               document.documentElement ? document.documentElement.scrollLeft : 0,
+               document.body ? document.body.scrollLeft : 0
+       );
+}
+function f_scrollTop() {
+       return f_filterResults (
+               window.pageYOffset ? window.pageYOffset : 0,
+               document.documentElement ? document.documentElement.scrollTop : 0,
+               document.body ? document.body.scrollTop : 0
+       );
+}
+function f_filterResults(n_win, n_docel, n_body) {
+       var n_result = n_win ? n_win : 0;
+       if (n_docel && (!n_result || (n_result > n_docel)))
+               n_result = n_docel;
+       return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
+}
+
+/** Get the height available for the results container */
+function os_availableHeight(r){
+       var absTop = document.getElementById(r.container).style.top;
+       var px = absTop.lastIndexOf("px");
+       if(px > 0)
+               absTop = absTop.substring(0,px);
+       return f_clientHeight() - (absTop - f_scrollTop());
+}
+
+
+/** Get element absolute position {left,top} */
+function os_getElementPosition(elemID){
+       var offsetTrail = document.getElementById(elemID);
+       var offsetLeft = 0;
+       var offsetTop = 0;
+       while (offsetTrail){
+               offsetLeft += offsetTrail.offsetLeft;
+               offsetTop += offsetTrail.offsetTop;
+               offsetTrail = offsetTrail.offsetParent;
+       }
+       if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){
+               offsetLeft += document.body.leftMargin;
+               offsetTop += document.body.topMargin;
+       }
+       return {left:offsetLeft,top:offsetTop};
+}
+
+/** Create the container div that will hold the suggested titles */
+function os_createContainer(r){
+       var c = document.createElement("div");
+       var s = document.getElementById(r.searchbox);
+       var pos = os_getElementPosition(r.searchbox);
+       var left = pos.left;
+       var top = pos.top + s.offsetHeight;
+       c.className = "os-suggest";
+       c.setAttribute("id", r.container);
+       document.body.appendChild(c);
+
+       // dynamically generated style params
+       // IE workaround, cannot explicitely set "style" attribute
+       c = document.getElementById(r.container);
+       c.style.top = top+"px";
+       c.style.left = left+"px";
+       c.style.width = s.offsetWidth+"px";
+
+       // mouse event handlers
+       c.onmouseover = function(event) { os_eventMouseover(r.searchbox, event); };
+       c.onmousemove = function(event) { os_eventMousemove(r.searchbox, event); };
+       c.onmousedown = function(event) { return os_eventMousedown(r.searchbox, event); };
+       c.onmouseup = function(event) { os_eventMouseup(r.searchbox, event); };
+       return c;
+}
+
+/** change container height to fit to screen */
+function os_fitContainer(r){
+       var c = document.getElementById(r.container);
+       var h = os_availableHeight(r) - 20;
+       var inc = r.containerRow;
+       h = parseInt(h/inc) * inc;
+       if(h < (2 * inc) && r.resultCount > 1) // min: two results
+               h = 2 * inc;
+       if((h/inc) > os_max_lines_per_suggest )
+               h = inc * os_max_lines_per_suggest;
+       if(h < r.containerTotal){
+               c.style.height = h +"px";
+               r.containerCount = parseInt(Math.round(h/inc));
+       } else{
+               c.style.height = r.containerTotal+"px";
+               r.containerCount = r.resultCount;
+       }
+}
+/** If some entries are longer than the box, replace text with "..." */
+function os_trimResultText(r){
+       // find max width, first see if we could expand the container to fit it
+       var maxW = 0;
+       for(var i=0;i<r.resultCount;i++){
+               var e = document.getElementById(r.resultText+i);
+               if(e.offsetWidth > maxW)
+                       maxW = e.offsetWidth;
+       }
+       var w = document.getElementById(r.container).offsetWidth;
+       var fix = 0;
+       if(r.containerCount < r.resultCount){
+               fix = 20; // give 20px for scrollbar
+       } else
+               fix = os_operaWidthFix(w);
+       if(fix < 4)
+               fix = 4; // basic padding
+       maxW += fix;
+
+       // resize container to fit more data if permitted
+       var normW = document.getElementById(r.searchbox).offsetWidth;
+       var prop = maxW / normW;
+       if(prop > os_container_max_width)
+               prop = os_container_max_width;
+       else if(prop < 1)
+               prop = 1;
+       var newW = Math.round( normW * prop );
+       if( w != newW ){
+               w = newW;
+               if( os_animation_timer != null )
+                       clearInterval(os_animation_timer.id)
+               os_animation_timer = new os_AnimationTimer(r,w);
+               os_animation_timer.id = setInterval("os_animateChangeWidth()",os_animation_delay);
+               w -= fix; // this much is reserved
+       }
+
+       // trim results
+       if(w < 10)
+               return;
+       for(var i=0;i<r.resultCount;i++){
+               var e = document.getElementById(r.resultText+i);
+               var replace = 1;
+               var lastW = e.offsetWidth+1;
+               var iteration = 0;
+               var changedText = false;
+               while(e.offsetWidth > w && (e.offsetWidth < lastW || iteration<2)){
+                       changedText = true;
+                       lastW = e.offsetWidth;
+                       var l = e.innerHTML;
+                       e.innerHTML = l.substring(0,l.length-replace)+"...";
+                       iteration++;
+                       replace = 4; // how many chars to replace
+               }
+               if(changedText){
+                       // show hint for trimmed titles
+                       document.getElementById(r.resultTable+i).setAttribute("title",r.results[i]);
+               }
+       }
+}
+
+/** Invoked on timer to animate change in container width */
+function os_animateChangeWidth(){
+       var r = os_animation_timer.r;
+       var c = document.getElementById(r.container);
+       var w = c.offsetWidth;
+       var normW = document.getElementById(r.searchbox).offsetWidth;
+       var normL = os_getElementPosition(r.searchbox).left;
+       var inc = os_animation_timer.inc;
+       var target = os_animation_timer.target;
+       var nw = w + inc;
+       if( (inc > 0 && nw >= target) || (inc <= 0 && nw <= target) ){
+               // finished !
+               c.style.width = target+"px";
+               clearInterval(os_animation_timer.id)
+               os_animation_timer = null;
+       } else{
+               // in-progress
+               c.style.width = nw+"px";
+               if(document.documentElement.dir == "rtl")
+                       c.style.left = (normL + normW + (target - nw) - os_animation_timer.target - 1)+"px";
+       }
+}
+
+/** Handles data from XMLHttpRequest, and updates the suggest results */
+function os_updateResults(r, query, text, cacheKey){
+       os_cache[cacheKey] = text;
+       r.query = query;
+       r.original = query;
+       if(text == ""){
+               r.results = null;
+               r.resultCount = 0;
+               os_hideResults(r);
+       } else{
+               try {
+                       var p = eval('('+text+')'); // simple json parse, could do a safer one
+                       if(p.length<2 || p[1].length == 0){
+                               r.results = null;
+                               r.resultCount = 0;
+                               os_hideResults(r);
+                               return;
+                       }
+                       var c = document.getElementById(r.container);
+                       if(c == null)
+                               c = os_createContainer(r);
+                       c.innerHTML = os_createResultTable(r,p[1]);
+                       // init container table sizes
+                       var t = document.getElementById(r.resultTable);
+                       r.containerTotal = t.offsetHeight;
+                       r.containerRow = t.offsetHeight / r.resultCount;
+                       os_fitContainer(r);
+                       os_trimResultText(r);
+                       os_showResults(r);
+               } catch(e){
+                       // bad response from server or such
+                       os_hideResults(r);
+                       os_cache[cacheKey] = null;
+               }
+       }
+}
+
+/** Create the result table to be placed in the container div */
+function os_createResultTable(r, results){
+       var c = document.getElementById(r.container);
+       var width = c.offsetWidth - os_operaWidthFix(c.offsetWidth);
+       var html = "<table class=\"os-suggest-results\" id=\""+r.resultTable+"\" style=\"width: "+width+"px;\">";
+       r.results = new Array();
+       r.resultCount = results.length;
+       for(i=0;i<results.length;i++){
+               var title = os_decodeValue(results[i]);
+               r.results[i] = title;
+               html += "<tr><td class=\"os-suggest-result\" id=\""+r.resultTable+i+"\"><span id=\""+r.resultText+i+"\">"+title+"</span></td></tr>";
+       }
+       html+="</table>"
+       return html;
+}
+
+/** Fetch namespaces from checkboxes or hidden fields in the search form,
+    if none defined use wgSearchNamespaces global */
+function os_getNamespaces(r){
+       var namespaces = "";
+       var elements = document.forms[r.searchform].elements;
+       for(i=0; i < elements.length; i++){
+               var name = elements[i].name;
+               if(typeof name != 'undefined' && name.length > 2
+               && name[0]=='n' && name[1]=='s'
+               && ((elements[i].type=='checkbox' && elements[i].checked)
+                       || (elements[i].type=='hidden' && elements[i].value=="1")) ){
+                       if(namespaces!="")
+                               namespaces+="|";
+                       namespaces+=name.substring(2);
+               }
+       }
+       if(namespaces == "")
+               namespaces = wgSearchNamespaces.join("|");
+       return namespaces;
+}
+
+/** Update results if user hasn't already typed something else */
+function os_updateIfRelevant(r, query, text, cacheKey){
+       var t = document.getElementById(r.searchbox);
+       if(t != null && t.value == query){ // check if response is still relevant
+               os_updateResults(r, query, text, cacheKey);
+       }
+       r.query = query;
+}
+
+/** Fetch results after some timeout */
+function os_delayedFetch(){
+       if(os_timer == null)
+               return;
+       var r = os_timer.r;
+       var query = os_timer.query;
+       os_timer = null;
+       var path = wgMWSuggestTemplate.replace("{namespaces}",os_getNamespaces(r))
+                                                                 .replace("{dbname}",wgDBname)
+                                                                 .replace("{searchTerms}",os_encodeQuery(query));
+
+       // try to get from cache, if not fetch using ajax
+       var cached = os_cache[path];
+       if(cached != null){
+               os_updateIfRelevant(r, query, cached, path);
+       } else{
+               var xmlhttp = sajax_init_object();
+               if(xmlhttp){
+                       try {
+                               xmlhttp.open("GET", path, true);
+                               xmlhttp.onreadystatechange=function(){
+                               if (xmlhttp.readyState==4 && typeof os_updateIfRelevant == 'function') {
+                                       os_updateIfRelevant(r, query, xmlhttp.responseText, path);
+                               }
+                       };
+                       xmlhttp.send(null);
+               } catch (e) {
+                               if (window.location.hostname == "localhost") {
+                                       alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing.");
+                               }
+                               throw e;
+                       }
+               }
+       }
+}
+
+/** Init timed update via os_delayedUpdate() */
+function os_fetchResults(r, query, timeout){
+       if(query == ""){
+               os_hideResults(r);
+               return;
+       } else if(query == r.query)
+               return; // no change
+
+       os_is_stopped = false; // make sure we're running
+
+       /* var cacheKey = wgDBname+":"+query;
+       var cached = os_cache[cacheKey];
+       if(cached != null){
+               os_updateResults(r,wgDBname,query,cached);
+               return;
+       } */
+
+       // cancel any pending fetches
+       if(os_timer != null && os_timer.id != null)
+               clearTimeout(os_timer.id);
+       // schedule delayed fetching of results
+       if(timeout != 0){
+               os_timer = new os_Timer(setTimeout("os_delayedFetch()",timeout),r,query);
+       } else{
+               os_timer = new os_Timer(null,r,query);
+               os_delayedFetch(); // do it now!
+       }
+
+}
+/** Change the highlighted row (i.e. suggestion), from position cur to next */
+function os_changeHighlight(r, cur, next, updateSearchBox){
+       if (next >= r.resultCount)
+               next = r.resultCount-1;
+       if (next < -1)
+               next = -1;
+       r.selected = next;
+       if (cur == next)
+       return; // nothing to do.
+
+    if(cur >= 0){
+       var curRow = document.getElementById(r.resultTable + cur);
+       if(curRow != null)
+               curRow.className = "os-suggest-result";
+    }
+    var newText;
+    if(next >= 0){
+       var nextRow = document.getElementById(r.resultTable + next);
+       if(nextRow != null)
+               nextRow.className = os_HighlightClass();
+       newText = r.results[next];
+    } else
+       newText = r.original;
+
+    // adjust the scrollbar if any
+    if(r.containerCount < r.resultCount){
+       var c = document.getElementById(r.container);
+       var vStart = c.scrollTop / r.containerRow;
+       var vEnd = vStart + r.containerCount;
+       if(next < vStart)
+               c.scrollTop = next * r.containerRow;
+       else if(next >= vEnd)
+               c.scrollTop = (next - r.containerCount + 1) * r.containerRow;
+    }
+
+    // update the contents of the search box
+    if(updateSearchBox){
+       os_updateSearchQuery(r,newText);
+    }
+}
+
+function os_HighlightClass() {
+       var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
+       if (match) {
+               var webKitVersion = parseInt(match[1]);
+               if (webKitVersion < 523) {
+                       // CSS system highlight colors broken on old Safari
+                       // https://bugs.webkit.org/show_bug.cgi?id=6129
+                       // Safari 3.0.4, 3.1 known ok
+                       return "os-suggest-result-hl-webkit";
+               }
+       }
+       return "os-suggest-result-hl";
+}
+
+function os_updateSearchQuery(r,newText){
+       document.getElementById(r.searchbox).value = newText;
+    r.query = newText;
+}
+
+/** Find event target */
+function os_getTarget(e){
+       if (!e) e = window.event;
+       if (e.target) return e.target;
+       else if (e.srcElement) return e.srcElement;
+       else return null;
+}
+
+
+
+/********************
+ *  Keyboard events
+ ********************/
+
+/** Event handler that will fetch results on keyup */
+function os_eventKeyup(e){
+       var targ = os_getTarget(e);
+       var r = os_map[targ.id];
+       if(r == null)
+               return; // not our event
+
+       // some browsers won't generate keypressed for arrow keys, catch it
+       if(os_keypressed_count == 0){
+               os_processKey(r,os_cur_keypressed,targ);
+       }
+       var query = targ.value;
+       os_fetchResults(r,query,os_search_timeout);
+}
+
+/** catch arrows up/down and escape to hide the suggestions */
+function os_processKey(r,keypressed,targ){
+       if (keypressed == 40){ // Arrow Down
+       if (r.visible) {
+               os_changeHighlight(r, r.selected, r.selected+1, true);
+       } else if(os_timer == null){
+               // user wants to get suggestions now
+               r.query = "";
+                       os_fetchResults(r,targ.value,0);
+       }
+       } else if (keypressed == 38){ // Arrow Up
+               if (r.visible){
+                       os_changeHighlight(r, r.selected, r.selected-1, true);
+               }
+       } else if(keypressed == 27){ // Escape
+               document.getElementById(r.searchbox).value = r.original;
+               r.query = r.original;
+               os_hideResults(r);
+       } else if(r.query != document.getElementById(r.searchbox).value){
+               // os_hideResults(r); // don't show old suggestions
+       }
+}
+
+/** When keys is held down use a timer to output regular events */
+function os_eventKeypress(e){
+       var targ = os_getTarget(e);
+       var r = os_map[targ.id];
+       if(r == null)
+               return; // not our event
+
+       var keypressed = os_cur_keypressed;
+       if(keypressed == 38 || keypressed == 40){
+               var d = new Date()
+               var now = d.getTime();
+               if(now - os_last_keypress < 120){
+                       os_last_keypress = now;
+                       return;
+               }
+       }
+
+       os_keypressed_count++;
+       os_processKey(r,keypressed,targ);
+}
+
+/** Catch the key code (Firefox bug)  */
+function os_eventKeydown(e){
+       if (!e) e = window.event;
+       var targ = os_getTarget(e);
+       var r = os_map[targ.id];
+       if(r == null)
+               return; // not our event
+
+       os_mouse_moved = false;
+
+       os_cur_keypressed = (e.keyCode == undefined) ? e.which : e.keyCode;
+       os_last_keypress = 0;
+       os_keypressed_count = 0;
+}
+
+/** Event: loss of focus of input box */
+function os_eventBlur(e){
+       var targ = os_getTarget(e);
+       var r = os_map[targ.id];
+       if(r == null)
+               return; // not our event
+       if(!os_mouse_pressed)
+               os_hideResults(r);
+}
+
+/** Event: focus (catch only when stopped) */
+function os_eventFocus(e){
+       // nothing happens here?
+}
+
+
+
+/********************
+ *  Mouse events
+ ********************/
+
+/** Mouse over the container */
+function os_eventMouseover(srcId, e){
+       var targ = os_getTarget(e);
+       var r = os_map[srcId];
+       if(r == null || !os_mouse_moved)
+               return; // not our event
+       var num = os_getNumberSuffix(targ.id);
+       if(num >= 0)
+               os_changeHighlight(r,r.selected,num,false);
+
+}
+
+/* Get row where the event occured (from its id) */
+function os_getNumberSuffix(id){
+       var num = id.substring(id.length-2);
+       if( ! (num.charAt(0) >= '0' && num.charAt(0) <= '9') )
+               num = num.substring(1);
+       if(os_isNumber(num))
+               return parseInt(num);
+       else
+               return -1;
+}
+
+/** Save mouse move as last action */
+function os_eventMousemove(srcId, e){
+       os_mouse_moved = true;
+}
+
+/** Mouse button held down, register possible click  */
+function os_eventMousedown(srcId, e){
+       var targ = os_getTarget(e);
+       var r = os_map[srcId];
+       if(r == null)
+               return; // not our event
+       var num = os_getNumberSuffix(targ.id);
+
+       os_mouse_pressed = true;
+       if(num >= 0){
+               os_mouse_num = num;
+               // os_updateSearchQuery(r,r.results[num]);
+       }
+       // keep the focus on the search field
+       document.getElementById(r.searchbox).focus();
+
+       return false; // prevents selection
+}
+
+/** Mouse button released, check for click on some row */
+function os_eventMouseup(srcId, e){
+       var targ = os_getTarget(e);
+       var r = os_map[srcId];
+       if(r == null)
+               return; // not our event
+       var num = os_getNumberSuffix(targ.id);
+
+       if(num >= 0 && os_mouse_num == num){
+               os_updateSearchQuery(r,r.results[num]);
+               os_hideResults(r);
+               document.getElementById(r.searchform).submit();
+       }
+       os_mouse_pressed = false;
+       // keep the focus on the search field
+       document.getElementById(r.searchbox).focus();
+}
+
+/** Check if x is a valid integer */
+function os_isNumber(x){
+       if(x == "" || isNaN(x))
+               return false;
+       for(var i=0;i<x.length;i++){
+               var c = x.charAt(i);
+               if( ! (c >= '0' && c <= '9') )
+                       return false;
+       }
+       return true;
+}
+
+
+/** When the form is submitted hide everything, cancel updates... */
+function os_eventOnsubmit(e){
+       var targ = os_getTarget(e);
+
+       os_is_stopped = true;
+       // kill timed requests
+       if(os_timer != null && os_timer.id != null){
+               clearTimeout(os_timer.id);
+               os_timer = null;
+       }
+       // Hide all suggestions
+       for(i=0;i<os_autoload_inputs.length;i++){
+               var r = os_map[os_autoload_inputs[i]];
+               if(r != null){
+                       var b = document.getElementById(r.searchform);
+                       if(b != null && b == targ){
+                               // set query value so the handler won't try to fetch additional results
+                               r.query = document.getElementById(r.searchbox).value;
+                       }
+                       os_hideResults(r);
+               }
+       }
+       return true;
+}
+
+function os_hookEvent(element, hookName, hookFunct) {
+       if (element.addEventListener) {
+               element.addEventListener(hookName, hookFunct, false);
+       } else if (window.attachEvent) {
+               element.attachEvent("on" + hookName, hookFunct);
+       }
+}
+
+/** Init Result objects and event handlers */
+function os_initHandlers(name, formname, element){
+       var r = new os_Results(name, formname);
+       // event handler
+       os_hookEvent(element, "keyup", function(event) { os_eventKeyup(event); });
+       os_hookEvent(element, "keydown", function(event) { os_eventKeydown(event); });
+       os_hookEvent(element, "keypress", function(event) { os_eventKeypress(event); });
+       os_hookEvent(element, "blur", function(event) { os_eventBlur(event); });
+       os_hookEvent(element, "focus", function(event) { os_eventFocus(event); });
+       element.setAttribute("autocomplete","off");
+       // stopping handler
+       os_hookEvent(document.getElementById(formname), "submit", function(event){ return os_eventOnsubmit(event); });
+       os_map[name] = r;
+       // toggle link
+       if(document.getElementById(r.toggle) == null){
+               // TODO: disable this while we figure out a way for this to work in all browsers
+               /* if(name=='searchInput'){
+                       // special case: place above the main search box
+                       var t = os_createToggle(r,"os-suggest-toggle");
+                       var searchBody = document.getElementById('searchBody');
+                       var first = searchBody.parentNode.firstChild.nextSibling.appendChild(t);
+               } else{
+                       // default: place below search box to the right
+                       var t = os_createToggle(r,"os-suggest-toggle-def");
+                       var top = element.offsetTop + element.offsetHeight;
+                       var left = element.offsetLeft + element.offsetWidth;
+                       t.style.position = "absolute";
+                       t.style.top = top + "px";
+                       t.style.left = left + "px";
+                       element.parentNode.appendChild(t);
+                       // only now width gets calculated, shift right
+                       left -= t.offsetWidth;
+                       t.style.left = left + "px";
+                       t.style.visibility = "visible";
+               } */
+       }
+
+}
+
+/** Return the span element that contains the toggle link */
+function os_createToggle(r,className){
+       var t = document.createElement("span");
+       t.className = className;
+       t.setAttribute("id", r.toggle);
+       var link = document.createElement("a");
+       link.setAttribute("href","javascript:void(0);");
+       link.onclick = function(){ os_toggle(r.searchbox,r.searchform) };
+       var msg = document.createTextNode(wgMWSuggestMessages[0]);
+       link.appendChild(msg);
+       t.appendChild(link);
+       return t;
+}
+
+/** Call when user clicks on some of the toggle links */
+function os_toggle(inputId,formName){
+       r = os_map[inputId];
+       var msg = '';
+       if(r == null){
+               os_enableSuggestionsOn(inputId,formName);
+               r = os_map[inputId];
+               msg = wgMWSuggestMessages[0];
+       } else{
+               os_disableSuggestionsOn(inputId,formName);
+               msg = wgMWSuggestMessages[1];
+       }
+       // change message
+       var link = document.getElementById(r.toggle).firstChild;
+       link.replaceChild(document.createTextNode(msg),link.firstChild);
+}
+
+/** Call this to enable suggestions on input (id=inputId), on a form (name=formName) */
+function os_enableSuggestionsOn(inputId, formName){
+       os_initHandlers( inputId, formName, document.getElementById(inputId) );
+}
+
+/** Call this to disable suggestios on input box (id=inputId) */
+function os_disableSuggestionsOn(inputId){
+       r = os_map[inputId];
+       if(r != null){
+               // cancel/hide results
+               os_timer = null;
+               os_hideResults(r);
+               // turn autocomplete on !
+               document.getElementById(inputId).setAttribute("autocomplete","on");
+               // remove descriptor
+               os_map[inputId] = null;
+       }
+}
+
+/** Initialization, call upon page onload */
+function os_MWSuggestInit() {
+       for(i=0;i<os_autoload_inputs.length;i++){
+               var id = os_autoload_inputs[i];
+               var form = os_autoload_forms[i];
+               element = document.getElementById( id );
+               if(element != null)
+                       os_initHandlers(id,form,element);
+       }
+}
+
+hookEvent("load", os_MWSuggestInit);
diff --git a/skins/common/nostalgia.css b/skins/common/nostalgia.css
new file mode 100644 (file)
index 0000000..c9b36a7
--- /dev/null
@@ -0,0 +1,17 @@
+body {
+       /* Background color is set separately on page type */
+       color: black;
+}
+#specialform { display: inline; }
+#powersearch {
+  background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px;
+}
+a.interwiki, a.external { color: #3366BB; }
+a.printable { text-decoration: underline; }
+a.stub { color:#772233; text-decoration:none; }
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; }
+h2, h3, h4, h5, h6 { margin-bottom: 0; }
+textarea { overflow: auto; }
+p.subtitle { padding-top: 0; margin-top: 0; }
+
+
diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css
new file mode 100644 (file)
index 0000000..3acd5e2
--- /dev/null
@@ -0,0 +1,418 @@
+/*
+ * oldshared.css
+ * This file contains CSS settings common to Wikistandard, Nostalgia and
+ * CologneBlue, the old pre-Monobook skins
+ */
+
+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
+   TR/CSS21/sample.html> to make sure the editsection links scale right */
+
+h1 { font-size: 2em; }
+h2 { font-size: 1.5em; }
+h3 { font-size: 1.17em; }
+h5 { font-size: .83em; }
+h6 { font-size: .75em; }
+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
+
+/* Now the custom parts */
+
+/* Make edit sections (which are inside h# tags) normal-sized */
+.editsection {
+       font-weight: normal;
+}
+h1 .editsection { font-size: 50% }
+h2 .editsection { font-size: 66.7% }
+h3 .editsection { font-size: 85.5% }
+h5 .editsection { font-size: 120% }
+h6 .editsection { font-size: 133% }
+
+#footer { clear: both }
+/* images */
+div.floatright { float: right; clear: right; margin: 0 0 1em 1em; }
+div.floatright p { font-style: italic; }
+div.floatleft { float: left; clear: left; margin: 0.3em 0.5em 0.5em 0; }
+div.floatleft p { font-style: italic; }
+
+
+/* Print-specific things to hide */
+.printfooter {
+        display: none;
+}
+
+/* table standards */
+table.rimage {
+        float:right;
+        margin-left:1em;
+        margin-bottom:1em;
+        text-align:center;
+        font-size:smaller;
+}
+
+/* thumbnails */
+div.thumb {
+       margin-bottom: .5em;
+       border-style: solid;
+       border-color: white;
+       width: auto;
+}
+div.thumbinner {
+       border: 1px solid #ccc;
+       padding: 3px !important;
+       background-color: #f9f9f9;
+       font-size: 94%;
+       text-align: center;
+       overflow: hidden;
+}
+html .thumbimage {
+       border: 1px solid #ccc;
+}
+html .thumbcaption {
+       border: none;
+       text-align: left;
+       line-height: 1.4em;
+       padding: 3px !important;
+       font-size: 94%;
+}
+div.magnify {
+       float: right;
+       border: none !important;
+       background: none !important;
+}
+div.magnify a, div.magnify img {
+       display: block;
+       border: none !important;
+       background: none !important;
+}
+div.tright {
+       clear: right;
+       float: right;
+       border-width: .5em 0 .8em 1.4em;
+}
+div.tleft {
+       float: left;
+       clear: left;
+       margin-right: .5em;
+       border-width: .5em 1.4em .8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+
+/* Page history styling */
+/* the auto-generated edit comments */
+.autocomment { color: #4b4b4b; }
+
+img { border: none; }
+
+#toc,
+.toc {
+       border: 1px solid #bba;
+       background-color: #f7f8ff;
+       padding: 5px;
+       font-size: 95%;
+       text-align: center;
+}
+#toc h2,
+.toc h2 {
+       display: inline;
+       border: none;
+       padding: 0;
+       font-size: 100%;
+       font-weight: bold;
+}
+#toc ul,
+.toc ul {
+       list-style-type: none;
+       list-style-image: none;
+       margin-left: 0;
+       padding-left: 0;
+       text-align: left;
+}
+#toc ul ul,
+.toc ul ul {
+       margin: 0 0 0 2em;
+}
+#toc .toctoggle,
+.toc .toctoggle {
+       font-size: 94%;
+}
+
+
+.error {
+       color: red;
+       font-size: larger;
+}
+
+/* preference page with js-genrated toc */
+#preftoc {
+    float: left;
+    margin: 1em 1em 1em 1em;
+    width: 13em;
+}
+#preftoc li { border: 1px solid White; }
+#preftoc li.selected {
+    background-color:#f9f9f9;
+    border:1px dashed #aaaaaa;
+}
+#preftoc a,
+#preftoc a:active {
+    display: block;
+    color: #005189;
+}
+#prefcontrol {
+    clear: left;
+    float: left;
+    margin-top: 1em;
+}
+div.prefsectiontip {
+    font-size: 94%;
+    margin-top: 0.4em;
+    color: #666;
+}
+fieldset.prefsection { margin-top: 1em }
+fieldset.operaprefsection { margin-left: 15em }
+
+/* emulate center */
+.center {
+    width: 100%;
+    text-align: center;
+}
+*.center * {
+    margin-left: auto;
+    margin-right: auto;
+}
+/* small for tables and similar */
+.small, .small * { font-size: 94%; }
+table.small { font-size: 100% }
+
+/* use this instead of #toc for page content */
+.toccolours {
+    border:1px solid #aaaaaa;
+    background-color:#f9f9f9;
+    padding:5px;
+    font-size: 95%;
+}
+#siteNotice {
+    border:1px solid #aaaaaa;
+    padding-left: 0.5em;
+    padding-right: 0.5em;
+}
+.redirectText {
+       font-size:150%;
+       margin:5px;
+}
+.sharedUploadNotice {
+       font-style: italic;
+}
+span.unpatrolled {
+       font-weight:bold;
+       color:red;
+}
+
+span.updatedmarker {
+       color:black;
+       background-color:#00FF00;
+}
+
+table.gallery {
+        border:  1px solid #cccccc;
+        margin:  2px;
+        padding: 2px;
+        background-color:#ffffff;
+}
+
+table.gallery tr {
+    vertical-align:top;
+}
+
+table.gallery td {
+      vertical-align:top;
+      background-color:#f9f9f9;
+      border: solid 2px white;
+}
+
+div.gallerybox {
+        margin: 2px;
+        width:  150px;
+}
+
+div.gallerybox div.thumb {
+        text-align: center;
+        border: 1px solid #cccccc;
+        margin: 2px;
+}
+
+div.gallerytext {
+       overflow: hidden;
+        font-size: 94%;
+        padding: 2px 4px;
+}
+
+span.comment {
+       font-style: italic;
+}
+
+span.changedby {
+       font-size: 95%;
+}
+
+.previewnote {
+       text-align: center;
+       color: #cc0000;
+}
+.editExternally {
+        border-style:solid;
+        border-width:1px;
+        border-color:gray;
+        background: #ffffff;
+        padding:3px;
+        margin-top:0.5em;
+        float:left;
+        font-size:small;
+        text-align:center;
+}
+.editExternallyHelp {
+        font-style:italic;
+        color:gray;
+}
+
+li span.deleted {
+       text-decoration: line-through;
+       color: #888;
+       font-style: italic;
+}
+
+/* Classes for EXIF data display */
+table.mw_metadata {
+       margin-left: 0.5em;
+}
+
+table.mw_metadata caption { font-weight: bold; }
+table.mw_metadata th { font-weight: normal; }
+table.mw_metadata td { padding: 0.1em; }
+
+table.mw_metadata {
+       border: none;
+       border-collapse: collapse;
+}
+table.mw_metadata td, table.mw_metadata th {
+       border: 1px solid #aaaaaa;
+       padding-left: 4px;
+       padding-right: 4px;
+}
+table.mw_metadata th {
+       background-color: #f9f9f9;
+}
+table.mw_metadata td {
+       background-color: #fcfcfc;
+}
+table.mw_metadata td.spacer {
+       background: inherit;
+       border-top: none;
+       border-bottom: none;
+}
+table.collapsed tr.collapsable {
+       display: none;
+}
+
+.visualClear {
+    clear: both;
+}
+
+#mw_trackbacks {
+       border: solid 1px #bbbbff;
+       background-color: #eeeeff;
+       padding: 0.2em;
+}
+
+/* Allmessages table */
+
+#allmessagestable th {
+       background-color: #b2b2ff;
+}
+
+#allmessagestable tr.orig {
+       background-color: #ffe2e2;
+}
+
+#allmessagestable tr.new {
+       background-color: #e2ffe2;
+}
+
+#allmessagestable tr.def {
+       background-color: #f0f0ff;
+}
+
+#jump-to-nav {
+  display: none;
+}
+
+/* Keep this temporarily so that cached pages will display right */
+table.gallery td.galleryheader {
+    text-align: center;
+       font-weight: bold;
+}
+table.gallery caption {
+       font-weight: bold;
+}
+
+div.multipageimagenavbox {
+   border: solid 1px silver;
+   padding: 4px;
+   margin: 1em;
+   background: #f0f0f0;
+}
+
+div.multipageimagenavbox div.thumb {
+   border: none;
+   margin-left: 2em;
+   margin-right: 2em;
+}
+
+div.multipageimagenavbox hr {
+   margin: 6px;
+}
+
+table.multipageimage td {
+   text-align: center;
+}
+
+/*
+  Table pager (e.g. Special:Imagelist)
+  - remove underlines from the navigation link
+  - collapse borders
+  - set the borders to outsets (similar to Special:Allmessages)
+  - remove line wrapping for all td and th, set background color
+  - restore line wrapping for the last two table cells (description and size)
+*/
+.TablePager_nav a { text-decoration: none; }
+.TablePager { border-collapse: collapse; }
+.TablePager, .TablePager td, .TablePager th { 
+       border: 0.15em solid #777777;
+       padding: 0 0.15em 0 0.15em;
+}
+.TablePager th { background-color: #eeeeff }
+.TablePager td { background-color: #ffffff }
+.TablePager tr:hover td { background-color: #eeeeff }
+
+.imagelist td, .imagelist th { white-space: nowrap }
+.imagelist .TablePager_col_links { background-color: #eeeeff }
+.imagelist .TablePager_col_img_description { white-space: normal }
+.imagelist th.TablePager_sort { background-color: #ccccff }
+
+.templatesUsed { margin-top: 1em; }
+
+.MediaTransformError {
+       border: thin solid #777;
+       background-color: #ccc;
+       padding: 0.1em;
+}
+.MediaTransformError td {
+       text-align: center;
+       vertical-align: middle;
+       font-size: 90%;
+}
+
+form#specialpages {
+       display: inline;
+}
diff --git a/skins/common/prefs.js b/skins/common/prefs.js
new file mode 100644 (file)
index 0000000..c2554c0
--- /dev/null
@@ -0,0 +1,164 @@
+
+// generate toc from prefs form, fold sections
+// XXX: needs testing on IE/Mac and safari
+// more comments to follow
+function tabbedprefs() {
+       var prefform = document.getElementById('preferences');
+       if (!prefform || !document.createElement) {
+               return;
+       }
+       if (prefform.nodeName.toLowerCase() == 'a') {
+               return; // Occasional IE problem
+       }
+       prefform.className = prefform.className + 'jsprefs';
+       var sections = [];
+       var children = prefform.childNodes;
+       var seci = 0;
+       for (var i = 0; i < children.length; i++) {
+               if (children[i].nodeName.toLowerCase() == 'fieldset') {
+                       children[i].id = 'prefsection-' + seci;
+                       children[i].className = 'prefsection';
+                       if (is_opera || is_khtml) {
+                               children[i].className = 'prefsection operaprefsection';
+                       }
+                       var legends = children[i].getElementsByTagName('legend');
+                       sections[seci] = {};
+                       if (legends[0]) legends[0].className = 'mainLegend';
+                       if (legends[0] && legends[0].firstChild.nodeValue) {
+                               sections[seci].text = legends[0].firstChild.nodeValue;
+                       } else {
+                               sections[seci].text = '# ' + seci;
+                       }
+                       sections[seci].secid = children[i].id;
+                       seci++;
+                       if (sections.length != 1) {
+                               children[i].style.display = 'none';
+                       } else {
+                               var selectedid = children[i].id;
+                       }
+               }
+       }
+       var toc = document.createElement('ul');
+       toc.id = 'preftoc';
+       toc.selectedid = selectedid;
+       for (i = 0; i < sections.length; i++) {
+               var li = document.createElement('li');
+               if (i === 0) {
+                       li.className = 'selected';
+               }
+               var a = document.createElement('a');
+               a.href = '#' + sections[i].secid;
+               a.onmousedown = a.onclick = uncoversection;
+               a.appendChild(document.createTextNode(sections[i].text));
+               a.secid = sections[i].secid;
+               li.appendChild(a);
+               toc.appendChild(li);
+       }
+       prefform.parentNode.insertBefore(toc, prefform.parentNode.childNodes[0]);
+       document.getElementById('prefsubmit').id = 'prefcontrol';
+}
+
+function uncoversection() {
+       var oldsecid = this.parentNode.parentNode.selectedid;
+       var newsec = document.getElementById(this.secid);
+       if (oldsecid != this.secid) {
+               var ul = document.getElementById('preftoc');
+               document.getElementById(oldsecid).style.display = 'none';
+               newsec.style.display = 'block';
+               ul.selectedid = this.secid;
+               var lis = ul.getElementsByTagName('li');
+               for (var i = 0; i< lis.length; i++) {
+                       lis[i].className = '';
+               }
+               this.parentNode.className = 'selected';
+       }
+       return false;
+}
+
+// Timezone stuff
+// tz in format [+-]HHMM
+function checkTimezone(tz, msg) {
+       var localclock = new Date();
+       // returns negative offset from GMT in minutes
+       var tzRaw = localclock.getTimezoneOffset();
+       var tzHour = Math.floor( Math.abs(tzRaw) / 60);
+       var tzMin = Math.abs(tzRaw) % 60;
+       var tzString = ((tzRaw >= 0) ? "-" : "+") + ((tzHour < 10) ? "0" : "") + tzHour + ((tzMin < 10) ? "0" : "") + tzMin;
+       if (tz != tzString) {
+               var junk = msg.split('$1');
+               document.write(junk[0] + "UTC" + tzString + junk[1]);
+       }
+}
+
+function unhidetzbutton() {
+       var tzb = document.getElementById('guesstimezonebutton');
+       if (tzb) {
+               tzb.style.display = 'inline';
+       }
+       updateTimezoneSelection(false);
+}
+
+// in [-]HH:MM format...
+// won't yet work with non-even tzs
+function fetchTimezone() {
+       // FIXME: work around Safari bug
+       var localclock = new Date();
+       // returns negative offset from GMT in minutes
+       var tzRaw = localclock.getTimezoneOffset();
+       var tzHour = Math.floor( Math.abs(tzRaw) / 60);
+       var tzMin = Math.abs(tzRaw) % 60;
+       var tzString = ((tzRaw >= 0) ? "-" : "") + ((tzHour < 10) ? "0" : "") + tzHour +
+               ":" + ((tzMin < 10) ? "0" : "") + tzMin;
+       return tzString;
+}
+
+function guessTimezone(box) {
+       document.getElementsByName("wpHourDiff")[0].value = fetchTimezone();
+       updateTimezoneSelection(true);
+}
+
+function updateTimezoneSelection(force_offset) {
+       var wpTimeZone = document.getElementsByName("wpTimeZone")[0];
+       var wpHourDiff = document.getElementsByName("wpHourDiff")[0];
+       var wpLocalTime = document.getElementById("wpLocalTime");
+       var wpServerTime = document.getElementsByName("wpServerTime")[0];
+       var minDiff = 0;
+
+       if (force_offset) wpTimeZone.selectedIndex = 1;
+       if (wpTimeZone.selectedIndex == 1) {
+               wpHourDiff.disabled = false;
+               var diffArr = wpHourDiff.value.split(':');
+               if (diffArr.length == 1) {
+                       minDiff = parseInt(diffArr[0], 10) * 60;
+               } else {
+                       minDiff = Math.abs(parseInt(diffArr[0], 10))*60 + parseInt(diffArr[1], 10);
+                       if (parseInt(diffArr[0], 10) < 0) minDiff = -minDiff;
+               }
+       } else {
+               wpHourDiff.disabled = true;
+               var diffArr = wpTimeZone.options[wpTimeZone.selectedIndex].value.split('|');
+               minDiff = parseInt(diffArr[1], 10);
+       }
+       if (isNaN(minDiff)) minDiff = 0;
+       var localTime = parseInt(wpServerTime.value, 10) + minDiff;
+       while (localTime < 0) localTime += 1440;
+       while (localTime >= 1440) localTime -= 1440;
+
+       var hour = String(Math.floor(localTime/60));
+       if (hour.length<2) hour = '0'+hour;
+       var min = String(localTime%60);
+       if (min.length<2) min = '0'+min;
+       changeText(wpLocalTime, hour+':'+min);
+
+       if (wpTimeZone.selectedIndex != 1) {
+               hour = String(Math.abs(Math.floor(minDiff/60)));
+               if (hour.length<2) hour = '0'+hour;
+               if (minDiff < 0) hour = '-'+hour;
+               min = String(minDiff%60);
+               if (min.length<2) min = '0'+min;
+               wpHourDiff.value = hour+':'+min;
+       }
+}
+
+hookEvent("load", unhidetzbutton);
+hookEvent("load", tabbedprefs);
diff --git a/skins/common/preview.js b/skins/common/preview.js
new file mode 100644 (file)
index 0000000..faf611f
--- /dev/null
@@ -0,0 +1,175 @@
+/**
+ * Live preview script for MediaWiki
+ *
+ * 2007-04-25 â€“ Nikerabbit:
+ *   Worked around text cutoff in mozilla-based browsers
+ *   Support for categories
+ */
+
+
+lpIdPreview = 'wikiPreview';
+lpIdCategories = 'catlinks';
+lpIdDiff = 'wikiDiff';
+
+/*
+ * Returns XMLHttpRequest based on browser support or null
+ */
+function openXMLHttpRequest() {
+       if( window.XMLHttpRequest ) {
+               return new XMLHttpRequest();
+       } else if( window.ActiveXObject && navigator.platform != 'MacPPC' ) {
+               // IE/Mac has an ActiveXObject but it doesn't work.
+               return new ActiveXObject("Microsoft.XMLHTTP");
+       } else {
+               return null;
+       }
+}
+
+/**
+ * Returns true if could open the request,
+ * false otherwise (eg no browser support).
+ */
+function lpDoPreview(text, postUrl) {
+       lpRequest = openXMLHttpRequest();
+       if( !lpRequest ) return false;
+
+       lpRequest.onreadystatechange = lpStatusUpdate;
+       lpRequest.open("POST", postUrl, true);
+
+       var postData = 'wpTextbox1=' + encodeURIComponent(text);
+       lpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
+       lpRequest.send(postData);
+       return true;
+}
+
+function lpStatusUpdate() {
+
+       /* We are at some stage of loading */
+       if (lpRequest.readyState > 0 && lpRequest.readyState < 4) {
+               notify(i18n(wgLivepreviewMessageLoading));
+       }
+
+       /* Not loaded yet */
+       if(lpRequest.readyState != 4) {
+               return;
+       }
+
+       /* We got response, bug it not what we wanted */
+       if( lpRequest.status != 200 ) {
+               var keys = new Array();
+               keys[0] = lpRequest.status;
+               keys[1] = lpRequest.statusText;
+               window.alert(i18n(wgLivepreviewMessageError, keys));
+               lpShowNormalPreview();
+               return;
+       }
+
+       /* All good */
+       dismissNotify(i18n(wgLivepreviewMessageReady), 750);
+
+       
+       var XMLObject = lpRequest.responseXML.documentElement;
+
+
+       /* Work around Firefox (Gecko?) limitation where it shows only the first 4096
+        * bytes of data. Ref: http://www.thescripts.com/forum/thread482760.html
+        */
+       XMLObject.normalize();
+
+       var previewElement = XMLObject.getElementsByTagName('preview')[0];
+       var categoryElement = XMLObject.getElementsByTagName('category')[0];
+
+       /* Hide the active diff if it exists */
+       var diff = document.getElementById(lpIdDiff);
+       if ( diff ) { diff.style.display = 'none'; }
+
+       /* Inject preview */
+       var previewContainer = document.getElementById( lpIdPreview );
+       if ( previewContainer && previewElement ) {
+               previewContainer.innerHTML = previewElement.firstChild.data;
+               previewContainer.style.display = 'block';
+       } else {
+               /* Should never happen */
+               window.alert(i18n(wgLivepreviewMessageFailed));
+               lpShowNormalPreview();
+               return;
+       }
+               
+
+       /* Inject categories */
+       var categoryContainer  = document.getElementById( lpIdCategories );
+       if ( categoryElement && categoryElement.firstChild ) {
+               if ( categoryContainer ) {
+                       categoryContainer.innerHTML = categoryElement.firstChild.data;
+                       /* May be hidden */
+                       categoryContainer.style.display = 'block';
+               } else {
+                       /* Just dump them somewhere */
+       /*              previewContainer.innerHTML += categoryElement.firstChild.data;*/
+               }
+       } else {
+               /* Nothing to show, hide old data */
+               if ( categoryContainer ) {
+                       categoryContainer.style.display = 'none';
+               }
+       }
+
+}
+
+function lpShowNormalPreview() {
+       var fallback = document.getElementById('wpPreview');
+       if ( fallback ) { fallback.style.display = 'inline'; }
+}
+
+
+// TODO: move elsewhere
+/* Small non-intrusive popup which can be used for example to notify the user
+ * about completed AJAX action. Supports only one notify at a time.
+ */
+function notify(message) {
+       var notifyElement = document.getElementById('mw-js-notify');
+       if ( !notifyElement ) {
+               createNotify();
+               var notifyElement = document.getElementById('mw-js-notify');
+       }
+       notifyElement.style.display = 'block';
+       notifyElement.innerHTML = message;
+}
+
+function dismissNotify(message, timeout) {
+       var notifyElement = document.getElementById('mw-js-notify');
+       if ( notifyElement ) {
+               if ( timeout == 0 ) {
+                       notifyElement.style.display = 'none';
+               } else {
+                       notify(message);
+                       setTimeout("dismissNotify('', 0)", timeout);
+               }
+       }
+}
+
+function createNotify() {
+       var div = document.createElement("div");
+       var txt = '###PLACEHOLDER###'
+       var txtNode = document.createTextNode(txt);
+       div.appendChild(txtNode);
+       div.id = 'mw-js-notify';
+       // TODO: move styles to css
+       div.setAttribute('style',
+               'display: none; position: fixed; bottom: 0px; right: 0px; color: white; background-color: DarkRed; z-index: 5; padding: 0.1em 1em 0.1em 1em; font-size: 120%;');
+       var body = document.getElementsByTagName('body')[0];
+       body.appendChild(div);
+}
+
+
+
+/* Helper function similar to wfMsgReplaceArgs() */
+function i18n(message, keys) {
+       var localMessage = message;
+       if ( !keys ) { return localMessage; }
+       for( var i = 0; i < keys.length; i++) {
+               var myregexp = new RegExp("\\$"+(i+1), 'g');
+               localMessage = localMessage.replace(myregexp, keys[i]);
+       }
+       return localMessage;
+}
\ No newline at end of file
diff --git a/skins/common/protect.js b/skins/common/protect.js
new file mode 100644 (file)
index 0000000..d9650c8
--- /dev/null
@@ -0,0 +1,351 @@
+
+var ProtectionForm = {
+       'existingMatch': false,
+
+       /**
+        * Set up the protection chaining interface (i.e. "unlock move permissions" checkbox)
+        * on the protection form
+        *
+        * @param Object opts : parameters with members:
+        *     tableId              Identifier of the table containing UI bits
+        *     labelText            Text to use for the checkbox label
+        *     numTypes             The number of protection types
+        *     existingMatch        True if all the existing expiry times match
+        */
+       'init': function( opts ) {
+               if( !( document.createTextNode && document.getElementById && document.getElementsByTagName ) )
+                       return false;
+
+               var box = document.getElementById( opts.tableId );
+               if( !box )
+                       return false;
+               
+               var boxbody = box.getElementsByTagName('tbody')[0]
+               var row = document.createElement( 'tr' );
+               boxbody.insertBefore( row, boxbody.firstChild );
+
+               this.existingMatch = opts.existingMatch;
+
+               var cell = document.createElement( 'td' );
+               row.appendChild( cell );
+               // If there is only one protection type, there is nothing to chain
+               if( opts.numTypes > 1 ) {
+                       var check = document.createElement( 'input' );
+                       check.id = 'mwProtectUnchained';
+                       check.type = 'checkbox';
+                       cell.appendChild( check );
+                       addClickHandler( check, function() { ProtectionForm.onChainClick(); } );
+
+                       cell.appendChild( document.createTextNode( ' ' ) );
+                       var label = document.createElement( 'label' );
+                       label.htmlFor = 'mwProtectUnchained';
+                       label.appendChild( document.createTextNode( opts.labelText ) );
+                       cell.appendChild( label );
+
+                       check.checked = !this.areAllTypesMatching();
+                       this.enableUnchainedInputs( check.checked );
+               }
+
+               this.updateCascadeCheckbox();
+
+               return true;
+       },
+
+       /**
+        * Sets the disabled attribute on the cascade checkbox depending on the current selected levels
+        */
+       'updateCascadeCheckbox': function() {
+               // For non-existent titles, there is no cascade option
+               if( !document.getElementById( 'mwProtect-cascade' ) ) {
+                       return;
+               }
+               var lists = this.getLevelSelectors();
+               for( var i = 0; i < lists.length; i++ ) {
+                       if( lists[i].selectedIndex > -1 ) {
+                               var items = lists[i].getElementsByTagName( 'option' );
+                               var selected = items[ lists[i].selectedIndex ].value;
+                               if( !this.isCascadeableLevel(selected) ) {
+                                       document.getElementById( 'mwProtect-cascade' ).checked = false;
+                                       document.getElementById( 'mwProtect-cascade' ).disabled = true;
+                                       return;
+                               }
+                       }
+               }
+               document.getElementById( 'mwProtect-cascade' ).disabled = false;
+       },
+
+       /**
+        * Is this protection level cascadeable?
+        * @param String level
+        *
+        * @return boolean
+        *
+        */
+       'isCascadeableLevel': function( level ) {
+               for (var k = 0; k < wgCascadeableLevels.length; k++) {
+                       if ( wgCascadeableLevels[k] == level ) {
+                               return true;
+                       }
+               }
+               return false;
+       },
+
+       /**
+        * When protection levels are locked together, update the rest
+        * when one action's level changes
+        *
+        * @param Element source Level selector that changed
+        */
+       'updateLevels': function(source) {
+               if( !this.isUnchained() )
+                       this.setAllSelectors( source.selectedIndex );
+               this.updateCascadeCheckbox();
+       },
+
+       /**
+        * When protection levels are locked together, update the
+        * expiries when one changes
+        *
+        * @param Element source expiry input that changed
+        */
+
+       'updateExpiry': function(source) {
+               if( !this.isUnchained() ) {
+                       var expiry = source.value;
+                       this.forEachExpiryInput(function(element) {
+                               element.value = expiry;
+                       });
+               }
+               var listId = source.id.replace( /^mwProtect-(\w+)-expires$/, 'mwProtectExpirySelection-$1' );
+               var list = document.getElementById( listId );
+               if (list && list.value != 'othertime' ) {
+                       if ( this.isUnchained() ) {
+                               list.value = 'othertime';
+                       } else {
+                               this.forEachExpirySelector(function(element) {
+                                       element.value = 'othertime';
+                               });
+                       }
+               }
+       },
+
+       /**
+        * When protection levels are locked together, update the
+        * expiry lists when one changes and clear the custom inputs
+        *
+        * @param Element source expiry selector that changed
+        */
+       'updateExpiryList': function(source) {
+               if( !this.isUnchained() ) {
+                       var expiry = source.value;
+                       this.forEachExpirySelector(function(element) {
+                               element.value = expiry;
+                       });
+                       this.forEachExpiryInput(function(element) {
+                               element.value = '';
+                       });
+               }
+       },
+
+       /**
+        * Update chain status and enable/disable various bits of the UI
+        * when the user changes the "unlock move permissions" checkbox
+        */
+       'onChainClick': function() {
+               if( this.isUnchained() ) {
+                       this.enableUnchainedInputs( true );
+               } else {
+                       this.setAllSelectors( this.getMaxLevel() );
+                       this.enableUnchainedInputs( false );
+               }
+               this.updateCascadeCheckbox();
+       },
+
+       /**
+        * Returns true if the named attribute in all objects in the given array are matching
+        */
+       'matchAttribute' : function( objects, attrName ) {
+               var value = null;
+
+               // Check levels
+               for ( var i = 0; i < objects.length; i++ ) {
+                       var element = objects[i];
+                       if ( value == null ) {
+                               value = element[attrName];
+                       } else {
+                               if ( value != element[attrName] ) {
+                                       return false;
+                               }
+                       }
+               }
+               return true;
+       },
+
+       /**
+        * Are all actions protected at the same level, with the same expiry time?
+        *
+        * @return boolean
+        */
+       'areAllTypesMatching': function() {
+               return this.existingMatch
+                       && this.matchAttribute( this.getLevelSelectors(), 'selectedIndex' )
+                       && this.matchAttribute( this.getExpirySelectors(), 'selectedIndex' )
+                       && this.matchAttribute( this.getExpiryInputs(), 'value' );
+       },
+
+       /**
+        * Is protection chaining off?
+        *
+        * @return bool
+        */
+       'isUnchained': function() {
+               var element = document.getElementById( 'mwProtectUnchained' );
+               return element
+                       ? element.checked
+                       : true; // No control, so we need to let the user set both levels
+       },
+
+       /**
+        * Find the highest protection level in any selector
+        */
+       'getMaxLevel': function() {
+               var maxIndex = -1;
+               this.forEachLevelSelector(function(element) {
+                       if (element.selectedIndex > maxIndex) {
+                               maxIndex = element.selectedIndex;
+                       }
+               });
+               return maxIndex;
+       },
+
+       /**
+        * Protect all actions at the specified level
+        *
+        * @param int index Protection level
+        */
+       'setAllSelectors': function(index) {
+               this.forEachLevelSelector(function(element) {
+                       if (element.selectedIndex != index) {
+                               element.selectedIndex = index;
+                       }
+               });
+       },
+
+       /**
+        * Apply a callback to each protection selector
+        *
+        * @param callable func Callback function
+        */
+       'forEachLevelSelector': function(func) {
+               var selectors = this.getLevelSelectors();
+               for (var i = 0; i < selectors.length; i++) {
+                       func(selectors[i]);
+               }
+       },
+
+       /**
+        * Get a list of all protection selectors on the page
+        *
+        * @return Array
+        */
+       'getLevelSelectors': function() {
+               var all = document.getElementsByTagName("select");
+               var ours = new Array();
+               for (var i = 0; i < all.length; i++) {
+                       var element = all[i];
+                       if (element.id.match(/^mwProtect-level-/)) {
+                               ours[ours.length] = element;
+                       }
+               }
+               return ours;
+       },
+
+       /**
+        * Apply a callback to each expiry input
+        *
+        * @param callable func Callback function
+        */
+       'forEachExpiryInput': function(func) {
+               var inputs = this.getExpiryInputs();
+               for (var i = 0; i < inputs.length; i++) {
+                       func(inputs[i]);
+               }
+       },
+
+       /**
+        * Get a list of all expiry inputs on the page
+        *
+        * @return Array
+        */
+       'getExpiryInputs': function() {
+               var all = document.getElementsByTagName("input");
+               var ours = new Array();
+               for (var i = 0; i < all.length; i++) {
+                       var element = all[i];
+                       if (element.name.match(/^mwProtect-expiry-/)) {
+                               ours[ours.length] = element;
+                       }
+               }
+               return ours;
+       },
+
+       /**
+        * Apply a callback to each expiry selector list
+        * @param callable func Callback function
+        */
+       'forEachExpirySelector': function(func) {
+               var inputs = this.getExpirySelectors();
+               for (var i = 0; i < inputs.length; i++) {
+                       func(inputs[i]);
+               }
+       },
+
+       /**
+        * Get a list of all expiry selector lists on the page
+        *
+        * @return Array
+        */
+       'getExpirySelectors': function() {
+               var all = document.getElementsByTagName("select");
+               var ours = new Array();
+               for (var i = 0; i < all.length; i++) {
+                       var element = all[i];
+                       if (element.id.match(/^mwProtectExpirySelection-/)) {
+                               ours[ours.length] = element;
+                       }
+               }
+               return ours;
+       },
+
+       /**
+        * Enable/disable protection selectors and expiry inputs
+        *
+        * @param boolean val Enable?
+        */
+       'enableUnchainedInputs': function(val) {
+               var first = true;
+               this.forEachLevelSelector(function(element) {
+                       if (first) {
+                               first = false;
+                       } else {
+                               element.disabled = !val;
+                       }
+               });
+               first = true;
+               this.forEachExpiryInput(function(element) {
+                       if (first) {
+                               first = false;
+                       } else {
+                               element.disabled = !val;
+                       }
+               });
+               first = true;
+               this.forEachExpirySelector(function(element) {
+                       if (first) {
+                               first = false;
+                       } else {
+                               element.disabled = !val;
+                       }
+               });
+       }
+}
diff --git a/skins/common/quickbar-right.css b/skins/common/quickbar-right.css
new file mode 100644 (file)
index 0000000..43bd427
--- /dev/null
@@ -0,0 +1 @@
+#quickbar { position: fixed; right: 0px; top: 0px; padding: 4px;}
diff --git a/skins/common/quickbar.css b/skins/common/quickbar.css
new file mode 100644 (file)
index 0000000..d7930c2
--- /dev/null
@@ -0,0 +1 @@
+#quickbar { position: fixed; padding: 4px; }
diff --git a/skins/common/rightclickedit.js b/skins/common/rightclickedit.js
new file mode 100644 (file)
index 0000000..83d552a
--- /dev/null
@@ -0,0 +1,48 @@
+function setupRightClickEdit() {
+       if (document.getElementsByTagName) {
+               var spans = document.getElementsByTagName('span');
+               for (var i = 0; i < spans.length; i++) {
+                       var el = spans[i];
+                       if(el.className == 'editsection') {
+                               addRightClickEditHandler(el);
+                       }
+               }
+       }
+}
+
+function addRightClickEditHandler(el) {
+       for (var i = 0; i < el.childNodes.length; i++) {
+               var link = el.childNodes[i];
+               if (link.nodeType == 1 && link.nodeName.toLowerCase() == 'a') {
+                       var editHref = link.getAttribute('href');
+                       // find the enclosing (parent) header
+                       var prev = el.parentNode;
+                       if (prev && prev.nodeType == 1 &&
+                       prev.nodeName.match(/^[Hh][1-6]$/)) {
+                               prev.oncontextmenu = function(e) {
+                                       if (!e) { e = window.event; }
+                                       // e is now the event in all browsers
+                                       var targ;
+                                       if (e.target) { targ = e.target; }
+                                       else if (e.srcElement) { targ = e.srcElement; }
+                                       if (targ.nodeType == 3) { // defeat Safari bug
+                                               targ = targ.parentNode;
+                                       }
+                                       // targ is now the target element
+
+                                       // We don't want to deprive the noble reader of a context menu
+                                       // for the section edit link, do we?  (Might want to extend this
+                                       // to all <a>'s?)
+                                       if (targ.nodeName.toLowerCase() != 'a'
+                                       || targ.parentNode.className != 'editsection') {
+                                               document.location = editHref;
+                                               return false;
+                                       }
+                                       return true;
+                               };
+                       }
+               }
+       }
+}
+
+hookEvent("load", setupRightClickEdit);
diff --git a/skins/common/shared.css b/skins/common/shared.css
new file mode 100644 (file)
index 0000000..bd30616
--- /dev/null
@@ -0,0 +1,313 @@
+/**
+ * CSS in this file is used by *all* skins (that have any CSS at all).  Be
+ * careful what you put in here, since what looks good in one skin may not in
+ * another, but don't ignore the poor non-Monobook users either.
+ */
+.mw-plusminus-null { color: #aaa; }
+
+.texvc { direction: ltr; unicode-bidi: embed; }
+img.tex { vertical-align: middle; }
+span.texhtml { font-family: serif; }
+
+/* add a bit of margin space between the preview and the toolbar */
+/* this replaces the ugly <p><br /></p> we used to insert into the page source */
+#wikiPreview.ontop { margin-bottom: 1em; }
+
+/* Stop floats from intruding into edit area in previews */
+#toolbar, #wpTextbox1 { clear: both; }
+
+div#mw-js-message {
+       margin: 1em 5%;
+       padding: 0.5em 2.5%;
+       border: solid 1px #ddd;
+       background-color: #fcfcfc;
+}
+
+/* Edit section links */
+.editsection {
+       float: right;
+       margin-left: 5px;
+}
+
+/**
+ * File histories
+ */
+table.filehistory {
+       border:1px solid #ccc;
+       border-collapse:collapse;
+}
+
+table.filehistory th,
+table.filehistory td {
+       padding: 0 0.2em 0 0.2em;
+       vertical-align:top;
+       border:1px solid #ccc;
+}
+table.filehistory th {
+       text-align: left;
+}
+table.filehistory td.mw-imagepage-filesize,
+table.filehistory th.mw-imagepage-filesize {
+       white-space:nowrap;
+}
+
+table.filehistory td.filehistory-selected {
+       font-weight: bold;
+}
+
+/*
+ * rev_deleted stuff
+ */
+li span.deleted, span.history-deleted {
+       text-decoration: line-through;
+       color: #888;
+       font-style: italic;
+}
+
+/**
+ * Forms
+ */
+body.ltr td.mw-label { text-align: right; }
+body.ltr td.mw-input { text-align: left; }
+body.ltr td.mw-submit { text-align: left; }
+body.rtl td.mw-label { text-align: left; }
+body.rtl td.mw-input { text-align: right; }
+body.rtl td.mw-submit { text-align: right; }
+
+td.mw-label { vertical-align: top; }
+td.mw-submit { white-space: nowrap; }
+
+/**
+ * Image captions
+ */
+body.rtl .thumbcaption { text-align:right; }
+body.rtl .magnify { float:left; }
+
+body.ltr .thumbcaption { text-align:left; }
+body.ltr .magnify { float:right; }
+
+/**
+ * Hidden categories
+ */
+.mw-hidden-cats-hidden { display: none; }
+.catlinks-allhidden { display: none; }
+
+/* Convenience links to edit block, delete and protect reasons */
+p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
+p.mw-filedelete-editreasons, p.mw-delete-editreasons {
+       font-size: 90%;
+       float: right;
+}
+
+/* Search results */
+div.searchresult {
+       font-size: 95%;
+       width:38em;
+}
+.mw-search-results li {
+       padding-bottom: 1em;
+       list-style:none;
+}
+.mw-search-result-data {
+       color: green;
+       font-size: 97%;
+}
+
+td#mw-search-menu {
+       padding-left:6em;
+       font-size:85%;
+}
+
+div#mw-search-interwiki {
+       float: right;
+       width: 18em;
+       border-style: solid;
+       border-color: #AAAAAA;
+       border-width: 1px;
+       margin-top: 2ex;
+}
+
+div#mw-search-interwiki li {
+       font-size: 95%;
+}
+
+.mw-search-interwiki-more {
+       float: right;
+       font-size: 90%;
+}
+
+span.searchalttitle {
+       font-size: 95%;
+}
+
+div.searchdidyoumean {
+       font-size: 127%;
+       margin-bottom: 1ex;
+       margin-top: 1ex;
+       /* Note that this color won't affect the link, as desired. */
+       color: #c00;
+}
+
+div.searchdidyoumean em {
+       font-weight: bold;
+}
+
+.searchmatch {
+       font-weight: bold;
+}
+
+div.searchresults {
+       border:1px solid darkblue;
+       padding-top: 10px;
+       padding-bottom: 10px;
+       padding-left: 20px;
+       padding-right: 20px;
+}
+
+/*
+ * UserRights stuff
+ */
+.mw-userrights-disabled {
+       color: #888;
+}
+
+table.mw-userrights-groups * td,table.mw-userrights-groups * th {
+       padding-right: 1.5em;
+}
+
+/* 
+ * OpenSearch ajax suggestions
+ */
+.os-suggest {
+       overflow: auto; 
+       overflow-x: hidden; 
+       position: absolute;
+       top: 0px;
+       left: 0px;
+       width: 0px;
+       background-color: white; 
+       background-color: Window;
+       border-style: solid;
+       border-color: #AAAAAA;
+       border-width: 1px;
+       z-index:99; 
+       visibility:hidden; 
+       font-size:95%;  
+}
+
+table.os-suggest-results {
+       font-size: 95%;
+       cursor: pointer; 
+       border: 0;
+       border-collapse: collapse;
+       width: 100%;
+}
+
+td.os-suggest-result, td.os-suggest-result-hl {
+       white-space: nowrap;
+       background-color: white; 
+       background-color: Window;
+       color: black;
+       color: WindowText;
+       padding: 2px;
+}
+td.os-suggest-result-hl,
+td.os-suggest-result-hl-webkit {
+       background-color: #4C59A6; 
+       color: white;
+}
+td.os-suggest-result-hl {
+       /* System colors are misimplemented in Safari 3.0 and earlier,
+          making highlighted text illegible... */
+       background-color: Highlight;
+       color: HighlightText;
+}
+
+.os-suggest-toggle {
+       position: relative; 
+       left: 1ex;
+       font-size: 65%;
+}
+.os-suggest-toggle-def {
+       position: absolute;
+       top: 0px;
+       left: 0px;
+       font-size: 65%;
+       visibility: hidden;
+}
+
+/* Page history styling */
+/* the auto-generated edit comments */
+.autocomment { color: gray; }
+#pagehistory .history-user {
+    margin-left: 0.4em;
+    margin-right: 0.2em;
+}
+#pagehistory span.minor { font-weight: bold; }
+#pagehistory li { border: 1px solid white; }
+#pagehistory li.selected {
+    background-color: #f9f9f9;
+    border: 1px dashed #aaa;
+}
+
+/*
+ * Special:ListGroupRights styling
+ * Special:Statistics styling 
+*/
+
+table.mw-listgrouprights-table,
+table.mw-statistics-table {
+       border: 1px solid #ccc;
+       border-collapse: collapse;
+}
+
+table.mw-listgrouprights-table tr  {
+       vertical-align: top;
+}
+
+table.mw-listgrouprights-table td, table.mw-listgrouprights-table th,
+table.mw-statistics-table td, table.mw-statistics-table th {
+       padding: 0.5em 0.2em 0.5em 0.2em;
+       border: 1px solid #ccc;
+}
+
+td.mw-statistics-numbers {
+       text-align: right;
+}
+
+/* Special:SpecialPages styling */
+h4.mw-specialpagesgroup {
+       background-color: #dcdcdc;
+       padding: 2px;
+       margin: .3em 0em 0em 0em;
+}
+.mw-specialpagerestricted {
+       font-weight: bold;
+}
+
+#shared-image-dup, #shared-image-conflict {
+       font-style: italic;
+}
+
+/* Special:EmailUser styling */
+table.mw-emailuser-table {
+       width: 98%;
+}
+td#mw-emailuser-sender, td#mw-emailuser-recipient {
+       font-weight: bold;
+}
+
+/*
+ * Recreating deleted page warning
+ * Reupload file warning
+ * Page protection warning
+ * incl. log entries for these warnings
+ */
+div.mw-warning-with-logexcerpt {
+       padding: 3px;
+       margin-bottom: 3px;
+       border: 2px solid #2F6FAB;
+}
+div.mw-warning-with-logexcerpt ul li {
+       font-size: 90%;
+}
diff --git a/skins/common/sticky.js b/skins/common/sticky.js
new file mode 100644 (file)
index 0000000..a4904c0
--- /dev/null
@@ -0,0 +1,124 @@
+// Make a layer that stays in the same place on screen when scrolling the browser window.
+// Version 1.2
+// See http://www.mark.ac/help for browser support.
+
+var mySticky;
+var theLayer;
+
+// Setup variables for sliding.
+// lastY and staticYOffset should match your CSS top definition.
+
+lastY=10;YOffset=0;staticYOffset=10;refreshMS=25;
+
+
+// Setup function that runs when the page loads.
+       function setup(eID){
+               bw=new checkBrowser;
+               if(bw.ns4||bw.opera){MM_reloadPage(true);}
+               var noFix=bw.ie4||bw.ns4||(bw.macie50)?true:false;
+               if (window.attachEvent){fix_bind()}
+               else if(noFix){ 
+                       if(bw.ns6){document.getElementById(eID).style.position="absolute";}
+                       if(bw.macie50){document.getElementById(eID).style.position="absolute";document.getElementById(eID).style.backgroundColor="#ccffcc";}
+                       if(bw.ns6&&YOffset==0){YOffset=-15}
+                       mySticky=new makeLayerObj(eID);
+                       layerSlide(eID)}
+               else{
+                       mySticky=new makeLayerObj(eID);
+                       mySticky.css.position="fixed";}
+
+               if(!mySticky){mySticky=new makeLayerObj(eID);}
+               //mySticky.css.visibility="visible";
+       }
+
+
+// -------------------------
+// emulate css 'position: fixed' in IE5+ Win
+// code by aclover@1value.com
+       fix_elements = new Array();
+
+       function fix_event(){
+               var i;
+               for (i=0; i < fix_elements.length; i++){
+                       fix_elements[i].style.left = parseInt(fix_elements[i].fix_left)+document.getElementsByTagName('html')[0].scrollLeft+document.getElementsByTagName('body')[0].scrollLeft+'px';
+                       fix_elements[i].style.top = parseInt(fix_elements[i].fix_top)+document.getElementsByTagName('html')[0].scrollTop+document.getElementsByTagName('body')[0].scrollTop+'px';
+               }
+       }
+
+       function fix_bind(){
+               var i;
+               for (i=0; i < document.all.length; i++){
+                       if (document.all[i].currentStyle.position=='fixed'){
+                               document.all[i].fix_left = document.all[i].currentStyle.left;
+                               document.all[i].fix_top = document.all[i].currentStyle.top;
+                               document.all[i].style.position = 'absolute';
+                               fix_elements[fix_elements.length] = document.all[i];
+                               window.attachEvent('onscroll', fix_event);
+                               window.attachEvent('onresize', fix_event);
+                       } 
+               }
+       }
+// -------------------------
+
+
+// -------------------------
+// DHTML menu sliding. Requires checkBrowser()
+// Based on source at http://www.simplythebest.net/
+       function layerSlide(layerID) {
+               if(bw.dhtml){
+                       if(!mySticky){mySticky=new makeLayerObj(layerID);}
+                       if (bw.ns) {winY = window.pageYOffset;}
+                       else if (bw.ie) {winY = document.body.scrollTop;}
+                       if (bw.ie||bw.ns) {
+                               if (winY!=lastY&&winY>YOffset-staticYOffset){smooth = .3 * (winY - lastY - YOffset + staticYOffset);}
+                               else if (YOffset-staticYOffset+lastY>YOffset-staticYOffset){smooth = .3 * (winY - lastY - (YOffset-(YOffset-winY)));}
+                               else{smooth=0}
+                               if(smooth > 0) {smooth = Math.ceil(smooth);}
+                               else{smooth = Math.floor(smooth);}
+                               if (bw.ie){mySticky.css.pixelTop+=smooth;}
+                               else if (bw.ns){mySticky.css.top=parseInt(mySticky.css.top)+smooth;}
+                               lastY = lastY+smooth;
+                               top.window.status=new Date()
+                               setTimeout('layerSlide("'+layerID+'")', refreshMS)}}}
+// -------------------------
+
+// Netscape 4.x browser resize fix
+       function MM_reloadPage(init) {
+       if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
+       document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; top.onresize=MM_reloadPage; }}
+       else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) {location.reload();}}
+
+// Create browser-independent layer and browser objects
+       function makeLayerObj(eID){
+               if(document.getElementById){this.css=document.getElementById(eID).style}
+               else if(document.layers){this.css=document.layers[eID];}
+               else if(document.all){this.css=document.all[eID].style;}
+               return this
+       }
+
+       function checkBrowser(){
+               this.ver=navigator.appVersion;
+               this.name=navigator.appName;
+               this.mac=(navigator.platform.toLowerCase().indexOf('mac')>-1)?true:false;
+               this.opera=(navigator.userAgent.toLowerCase().indexOf('opera')>-1)?true:false;
+               this.dom=document.getElementById?true:false;
+               this.ns=(this.name=='Netscape');
+               this.ie4=(document.all && !this.dom)?true:false;
+               this.ie=(this.name =='Microsoft Internet Explorer'&&!this.opera)?true:false;
+               this.ie5=(this.ie && (navigator.userAgent.indexOf("MSIE 5")!=-1))?true:false;
+               this.macie50=(this.mac&&this.ie5&&(navigator.userAgent.indexOf("MSIE 5.0")!=-1))?true:false
+               this.ns4=(this.ns && parseInt(this.ver) == 4)?true:false;
+               this.ns6=((this.name=="Netscape")&&(parseInt(this.ver)==5))?true:false
+               this.standards=document.getElementById?true:false;
+               this.dhtml=this.standards||this.ie4||this.ns4;
+       }
+
+       function showMe(eID){
+               myFloater=new makeLayerObj(eID)
+               myFloater.css.visibility="visible";
+       }
+
+       function hideMe(eID){
+               myFloater=new makeLayerObj(eID)
+               myFloater.css.visibility="hidden";
+       }
diff --git a/skins/common/upload.js b/skins/common/upload.js
new file mode 100644 (file)
index 0000000..d1cf4b3
--- /dev/null
@@ -0,0 +1,190 @@
+function licenseSelectorCheck() {
+       var selector = document.getElementById( "wpLicense" );
+       var selection = selector.options[selector.selectedIndex].value;
+       if( selector.selectedIndex > 0 ) {
+               if( selection == "" ) {
+                       // Option disabled, but browser is broken and doesn't respect this
+                       selector.selectedIndex = 0;
+               }
+       }
+       // We might show a preview
+       wgUploadLicenseObj.fetchPreview( selection );
+}
+
+function licenseSelectorFixup() {
+       // for MSIE/Mac; non-breaking spaces cause the <option> not to render
+       // but, for some reason, setting the text to itself works
+       var selector = document.getElementById("wpLicense");
+       if (selector) {
+               var ua = navigator.userAgent;
+               var isMacIe = (ua.indexOf("MSIE") != -1) && (ua.indexOf("Mac") != -1);
+               if (isMacIe) {
+                       for (var i = 0; i < selector.options.length; i++) {
+                               selector.options[i].text = selector.options[i].text;
+                       }
+               }
+       }
+}
+
+var wgUploadWarningObj = {
+       'responseCache' : { '' : '&nbsp;' },
+       'nameToCheck' : '',
+       'typing': false,
+       'delay': 500, // ms
+       'timeoutID': false,
+
+       'keypress': function () {
+               if ( !wgAjaxUploadDestCheck || !sajax_init_object() ) return;
+
+               // Find file to upload
+               var destFile = document.getElementById('wpDestFile');
+               var warningElt = document.getElementById( 'wpDestFile-warning' );
+               if ( !destFile || !warningElt ) return ;
+
+               this.nameToCheck = destFile.value ;
+
+               // Clear timer 
+               if ( this.timeoutID ) {
+                       window.clearTimeout( this.timeoutID );
+               }
+               // Check response cache
+               for (cached in this.responseCache) {
+                       if (this.nameToCheck == cached) {
+                               this.setWarning(this.responseCache[this.nameToCheck]);
+                               return;
+                       }
+               }
+
+               this.timeoutID = window.setTimeout( 'wgUploadWarningObj.timeout()', this.delay );
+       },
+
+       'checkNow': function (fname) {
+               if ( !wgAjaxUploadDestCheck || !sajax_init_object() ) return;
+               if ( this.timeoutID ) {
+                       window.clearTimeout( this.timeoutID );
+               }
+               this.nameToCheck = fname;
+               this.timeout();
+       },
+       
+       'timeout' : function() {
+               if ( !wgAjaxUploadDestCheck || !sajax_init_object() ) return;
+               injectSpinner( document.getElementById( 'wpDestFile' ), 'destcheck' );
+
+               // Get variables into local scope so that they will be preserved for the 
+               // anonymous callback. fileName is copied so that multiple overlapping 
+               // ajax requests can be supported.
+               var obj = this;
+               var fileName = this.nameToCheck;
+               sajax_do_call( 'UploadForm::ajaxGetExistsWarning', [this.nameToCheck], 
+                       function (result) {
+                               obj.processResult(result, fileName)
+                       }
+               );
+       },
+
+       'processResult' : function (result, fileName) {
+               removeSpinner( 'destcheck' );
+               this.setWarning(result.responseText);
+               this.responseCache[fileName] = result.responseText;
+       },
+
+       'setWarning' : function (warning) {
+               var warningElt = document.getElementById( 'wpDestFile-warning' );
+               var ackElt = document.getElementById( 'wpDestFileWarningAck' );
+               this.setInnerHTML(warningElt, warning);
+
+               // Set a value in the form indicating that the warning is acknowledged and 
+               // doesn't need to be redisplayed post-upload
+               if ( warning == '' || warning == '&nbsp;' ) {
+                       ackElt.value = '';
+               } else {
+                       ackElt.value = '1';
+               }
+       },
+
+       'setInnerHTML' : function (element, text) {
+               // Check for no change to avoid flicker in IE 7
+               if (element.innerHTML != text) {
+                       element.innerHTML = text;
+               }
+       }
+}
+
+function fillDestFilename(id) {
+       if (!wgUploadAutoFill) {
+               return;
+       }
+       if (!document.getElementById) {
+               return;
+       }
+       var path = document.getElementById(id).value;
+       // Find trailing part
+       var slash = path.lastIndexOf('/');
+       var backslash = path.lastIndexOf('\\');
+       var fname;
+       if (slash == -1 && backslash == -1) {
+               fname = path;
+       } else if (slash > backslash) {
+               fname = path.substring(slash+1, 10000);
+       } else {
+               fname = path.substring(backslash+1, 10000);
+       }
+
+       // Capitalise first letter and replace spaces by underscores
+       fname = fname.charAt(0).toUpperCase().concat(fname.substring(1,10000)).replace(/ /g, '_');
+
+       // Output result
+       var destFile = document.getElementById('wpDestFile');
+       if (destFile) {
+               destFile.value = fname;
+               wgUploadWarningObj.checkNow(fname) ;
+       }
+}
+
+function toggleFilenameFiller() {
+       if(!document.getElementById) return;
+       var upfield = document.getElementById('wpUploadFile');
+       var destName = document.getElementById('wpDestFile').value;
+       if (destName=='' || destName==' ') {
+               wgUploadAutoFill = true;
+       } else {
+               wgUploadAutoFill = false;
+       }
+}
+
+var wgUploadLicenseObj = {
+       
+       'responseCache' : { '' : '' },
+
+       'fetchPreview': function( license ) {
+               if( !wgAjaxLicensePreview || !sajax_init_object() ) return;
+               for (cached in this.responseCache) {
+                       if (cached == license) {
+                               this.showPreview( this.responseCache[license] );
+                               return;
+                       }
+               }
+               injectSpinner( document.getElementById( 'wpLicense' ), 'license' );
+               sajax_do_call( 'UploadForm::ajaxGetLicensePreview', [license],
+                       function( result ) {
+                               wgUploadLicenseObj.processResult( result, license );
+                       }
+               );
+       },
+
+       'processResult' : function( result, license ) {
+               removeSpinner( 'license' );
+               this.showPreview( result.responseText );
+               this.responseCache[license] = result.responseText;
+       },
+
+       'showPreview' : function( preview ) {
+               var previewPanel = document.getElementById( 'mw-license-preview' );
+               if( previewPanel.innerHTML != preview )
+                       previewPanel.innerHTML = preview;
+       }
+       
+}
+
+addOnloadHook( licenseSelectorFixup );
\ No newline at end of file
diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js
new file mode 100644 (file)
index 0000000..089d22d
--- /dev/null
@@ -0,0 +1,995 @@
+// MediaWiki JavaScript support functions
+
+var clientPC = navigator.userAgent.toLowerCase(); // Get client info
+var is_gecko = /gecko/.test( clientPC ) &&
+       !/khtml|spoofer|netscape\/7\.0/.test(clientPC);
+var webkit_match = clientPC.match(/applewebkit\/(\d+)/);
+if (webkit_match) {
+       var is_safari = clientPC.indexOf('applewebkit') != -1 &&
+               clientPC.indexOf('spoofer') == -1;
+       var is_safari_win = is_safari && clientPC.indexOf('windows') != -1;
+       var webkit_version = parseInt(webkit_match[1]);
+}
+var is_khtml = navigator.vendor == 'KDE' ||
+       ( document.childNodes && !document.all && !navigator.taintEnabled );
+// For accesskeys; note that FF3+ is included here!
+var is_ff2 = /firefox\/[2-9]|minefield\/3/.test( clientPC );
+// These aren't used here, but some custom scripts rely on them
+var is_ff2_win = is_ff2 && clientPC.indexOf('windows') != -1;
+var is_ff2_x11 = is_ff2 && clientPC.indexOf('x11') != -1;
+if (clientPC.indexOf('opera') != -1) {
+       var is_opera = true;
+       var is_opera_preseven = window.opera && !document.childNodes;
+       var is_opera_seven = window.opera && document.childNodes;
+       var is_opera_95 = /opera\/(9.[5-9]|[1-9][0-9])/.test( clientPC );
+}
+
+// Global external objects used by this script.
+/*extern ta, stylepath, skin */
+
+// add any onload functions in this hook (please don't hard-code any events in the xhtml source)
+var doneOnloadHook;
+
+if (!window.onloadFuncts) {
+       var onloadFuncts = [];
+}
+
+function addOnloadHook(hookFunct) {
+       // Allows add-on scripts to add onload functions
+       if(!doneOnloadHook) {
+               onloadFuncts[onloadFuncts.length] = hookFunct;
+       } else {
+               hookFunct();  // bug in MSIE script loading
+       }
+}
+
+function hookEvent(hookName, hookFunct) {
+       addHandler(window, hookName, hookFunct);
+}
+
+function importScript(page) {
+       var uri = wgScript + '?title=' +
+               encodeURIComponent(page.replace(/ /g,'_')).replace('%2F','/').replace('%3A',':') +
+               '&action=raw&ctype=text/javascript';
+       return importScriptURI(uri);
+}
+var loadedScripts = {}; // included-scripts tracker
+function importScriptURI(url) {
+       if (loadedScripts[url]) {
+               return null;
+       }
+       loadedScripts[url] = true;
+       var s = document.createElement('script');
+       s.setAttribute('src',url);
+       s.setAttribute('type','text/javascript');
+       document.getElementsByTagName('head')[0].appendChild(s);
+       return s;
+}
+function importStylesheet(page) {
+       return importStylesheetURI(wgScript + '?action=raw&ctype=text/css&title=' + encodeURIComponent(page.replace(/ /g,'_')));
+}
+function importStylesheetURI(url) {
+       return document.createStyleSheet ? document.createStyleSheet(url) : appendCSS('@import "' + url + '";');
+}
+function appendCSS(text) {
+       var s = document.createElement('style');
+       s.type = 'text/css';
+       s.rel = 'stylesheet';
+       if (s.styleSheet) s.styleSheet.cssText = text //IE
+       else s.appendChild(document.createTextNode(text + '')) //Safari sometimes borks on null
+       document.getElementsByTagName('head')[0].appendChild(s);
+       return s;
+}
+
+// special stylesheet links
+if (typeof stylepath != 'undefined' && typeof skin != 'undefined') {
+       if (is_opera_preseven) {
+               importStylesheetURI(stylepath+'/'+skin+'/Opera6Fixes.css');
+       } else if (is_opera_seven && !is_opera_95) {
+               importStylesheetURI(stylepath+'/'+skin+'/Opera7Fixes.css');
+       } else if (is_khtml) {
+               importStylesheetURI(stylepath+'/'+skin+'/KHTMLFixes.css');
+       }
+}
+
+if (wgBreakFrames) {
+       // Un-trap us from framesets
+       if (window.top != window) {
+               window.top.location = window.location;
+       }
+}
+
+function showTocToggle() {
+       if (document.createTextNode) {
+               // Uses DOM calls to avoid document.write + XHTML issues
+
+               var linkHolder = document.getElementById('toctitle');
+               if (!linkHolder) {
+                       return;
+               }
+
+               var outerSpan = document.createElement('span');
+               outerSpan.className = 'toctoggle';
+
+               var toggleLink = document.createElement('a');
+               toggleLink.id = 'togglelink';
+               toggleLink.className = 'internal';
+               toggleLink.href = 'javascript:toggleToc()';
+               toggleLink.appendChild(document.createTextNode(tocHideText));
+
+               outerSpan.appendChild(document.createTextNode('['));
+               outerSpan.appendChild(toggleLink);
+               outerSpan.appendChild(document.createTextNode(']'));
+
+               linkHolder.appendChild(document.createTextNode(' '));
+               linkHolder.appendChild(outerSpan);
+
+               var cookiePos = document.cookie.indexOf("hidetoc=");
+               if (cookiePos > -1 && document.cookie.charAt(cookiePos + 8) == 1) {
+                       toggleToc();
+               }
+       }
+}
+
+function changeText(el, newText) {
+       // Safari work around
+       if (el.innerText) {
+               el.innerText = newText;
+       } else if (el.firstChild && el.firstChild.nodeValue) {
+               el.firstChild.nodeValue = newText;
+       }
+}
+
+function toggleToc() {
+       var toc = document.getElementById('toc').getElementsByTagName('ul')[0];
+       var toggleLink = document.getElementById('togglelink');
+
+       if (toc && toggleLink && toc.style.display == 'none') {
+               changeText(toggleLink, tocHideText);
+               toc.style.display = 'block';
+               document.cookie = "hidetoc=0";
+       } else {
+               changeText(toggleLink, tocShowText);
+               toc.style.display = 'none';
+               document.cookie = "hidetoc=1";
+       }
+}
+
+var mwEditButtons = [];
+var mwCustomEditButtons = []; // eg to add in MediaWiki:Common.js
+
+function escapeQuotes(text) {
+       var re = new RegExp("'","g");
+       text = text.replace(re,"\\'");
+       re = new RegExp("\\n","g");
+       text = text.replace(re,"\\n");
+       return escapeQuotesHTML(text);
+}
+
+function escapeQuotesHTML(text) {
+       var re = new RegExp('&',"g");
+       text = text.replace(re,"&amp;");
+       re = new RegExp('"',"g");
+       text = text.replace(re,"&quot;");
+       re = new RegExp('<',"g");
+       text = text.replace(re,"&lt;");
+       re = new RegExp('>',"g");
+       text = text.replace(re,"&gt;");
+       return text;
+}
+
+
+/**
+ * Set the accesskey prefix based on browser detection.
+ */
+var tooltipAccessKeyPrefix = 'alt-';
+if (is_opera) {
+       tooltipAccessKeyPrefix = 'shift-esc-';
+} else if (!is_safari_win && is_safari && webkit_version > 526) {
+       tooltipAccessKeyPrefix = 'ctrl-alt-';
+} else if (!is_safari_win && (is_safari
+               || clientPC.indexOf('mac') != -1
+               || clientPC.indexOf('konqueror') != -1 )) {
+       tooltipAccessKeyPrefix = 'ctrl-';
+} else if (is_ff2) {
+       tooltipAccessKeyPrefix = 'alt-shift-';
+}
+var tooltipAccessKeyRegexp = /\[(ctrl-)?(alt-)?(shift-)?(esc-)?(.)\]$/;
+
+/**
+ * Add the appropriate prefix to the accesskey shown in the tooltip.
+ * If the nodeList parameter is given, only those nodes are updated;
+ * otherwise, all the nodes that will probably have accesskeys by
+ * default are updated.
+ *
+ * @param Array nodeList -- list of elements to update
+ */
+function updateTooltipAccessKeys( nodeList ) {
+       if ( !nodeList ) {
+               // skins without a "column-one" element don't seem to have links with accesskeys either
+               var columnOne = document.getElementById("column-one");
+               if ( columnOne )
+                       updateTooltipAccessKeys( columnOne.getElementsByTagName("a") );
+               // these are rare enough that no such optimization is needed
+               updateTooltipAccessKeys( document.getElementsByTagName("input") );
+               updateTooltipAccessKeys( document.getElementsByTagName("label") );
+               return;
+       }
+
+       for ( var i = 0; i < nodeList.length; i++ ) {
+               var element = nodeList[i];
+               var tip = element.getAttribute("title");
+               if ( tip && tooltipAccessKeyRegexp.exec(tip) ) {
+                       tip = tip.replace(tooltipAccessKeyRegexp,
+                                         "["+tooltipAccessKeyPrefix+"$5]");
+                       element.setAttribute("title", tip );
+               }
+       }
+}
+
+/**
+ * Add a link to one of the portlet menus on the page, including:
+ *
+ * p-cactions: Content actions (shown as tabs above the main content in Monobook)
+ * p-personal: Personal tools (shown at the top right of the page in Monobook)
+ * p-navigation: Navigation
+ * p-tb: Toolbox
+ *
+ * This function exists for the convenience of custom JS authors.  All
+ * but the first three parameters are optional, though providing at
+ * least an id and a tooltip is recommended.
+ *
+ * By default the new link will be added to the end of the list.  To
+ * add the link before a given existing item, pass the DOM node of
+ * that item (easily obtained with document.getElementById()) as the
+ * nextnode parameter; to add the link _after_ an existing item, pass
+ * the node's nextSibling instead.
+ *
+ * @param String portlet -- id of the target portlet ("p-cactions", "p-personal", "p-navigation" or "p-tb")
+ * @param String href -- link URL
+ * @param String text -- link text (will be automatically lowercased by CSS for p-cactions in Monobook)
+ * @param String id -- id of the new item, should be unique and preferably have the appropriate prefix ("ca-", "pt-", "n-" or "t-")
+ * @param String tooltip -- text to show when hovering over the link, without accesskey suffix
+ * @param String accesskey -- accesskey to activate this link (one character, try to avoid conflicts)
+ * @param Node nextnode -- the DOM node before which the new item should be added, should be another item in the same list
+ *
+ * @return Node -- the DOM node of the new item (an LI element) or null
+ */
+function addPortletLink(portlet, href, text, id, tooltip, accesskey, nextnode) {
+       var node = document.getElementById(portlet);
+       if ( !node ) return null;
+       node = node.getElementsByTagName( "ul" )[0];
+       if ( !node ) return null;
+
+       var link = document.createElement( "a" );
+       link.appendChild( document.createTextNode( text ) );
+       link.href = href;
+
+       var item = document.createElement( "li" );
+       item.appendChild( link );
+       if ( id ) item.id = id;
+
+       if ( accesskey ) {
+               link.setAttribute( "accesskey", accesskey );
+               tooltip += " ["+accesskey+"]";
+       }
+       if ( tooltip ) {
+               link.setAttribute( "title", tooltip );
+       }
+       if ( accesskey && tooltip ) {
+               updateTooltipAccessKeys( new Array( link ) );
+       }
+
+       if ( nextnode && nextnode.parentNode == node )
+               node.insertBefore( item, nextnode );
+       else
+               node.appendChild( item );  // IE compatibility (?)
+
+       return item;
+}
+
+function getInnerText(el) {
+       if (typeof el == "string") return el;
+       if (typeof el == "undefined") { return el };
+       if (el.textContent) return el.textContent; // not needed but it is faster
+       if (el.innerText) return el.innerText;     // IE doesn't have textContent
+       var str = "";
+
+       var cs = el.childNodes;
+       var l = cs.length;
+       for (var i = 0; i < l; i++) {
+               switch (cs[i].nodeType) {
+                       case 1: //ELEMENT_NODE
+                               str += ts_getInnerText(cs[i]);
+                               break;
+                       case 3: //TEXT_NODE
+                               str += cs[i].nodeValue;
+                               break;
+               }
+       }
+       return str;
+}
+
+
+/**
+ * Set up accesskeys/tooltips from the deprecated ta array.  If doId
+ * is specified, only set up for that id.  Note that this function is
+ * deprecated and will not be supported indefinitely -- use
+ * updateTooltipAccessKey() instead.
+ *
+ * @param mixed doId string or null
+ */
+function akeytt( doId ) {
+       // A lot of user scripts (and some of the code below) break if
+       // ta isn't defined, so we make sure it is.  Explictly using
+       // window.ta avoids a "ta is not defined" error.
+       if (!window.ta) window.ta = new Array;
+
+       // Make a local, possibly restricted, copy to avoid clobbering
+       // the original.
+       var ta;
+       if ( doId ) {
+               ta = [doId];
+       } else {
+               ta = window.ta;
+       }
+
+       // Now deal with evil deprecated ta
+       var watchCheckboxExists = document.getElementById( 'wpWatchthis' ) ? true : false;
+       for (var id in ta) {
+               var n = document.getElementById(id);
+               if (n) {
+                       var a = null;
+                       var ak = '';
+                       // Are we putting accesskey in it
+                       if (ta[id][0].length > 0) {
+                               // Is this object a object? If not assume it's the next child.
+
+                               if (n.nodeName.toLowerCase() == "a") {
+                                       a = n;
+                               } else {
+                                       a = n.childNodes[0];
+                               }
+                               // Don't add an accesskey for the watch tab if the watch
+                               // checkbox is also available.
+                               if (a && ((id != 'ca-watch' && id != 'ca-unwatch') || !watchCheckboxExists)) {
+                                       a.accessKey = ta[id][0];
+                                       ak = ' ['+tooltipAccessKeyPrefix+ta[id][0]+']';
+                               }
+                       } else {
+                               // We don't care what type the object is when assigning tooltip
+                               a = n;
+                               ak = '';
+                       }
+
+                       if (a) {
+                               a.title = ta[id][1]+ak;
+                       }
+               }
+       }
+}
+
+var checkboxes;
+var lastCheckbox;
+
+function setupCheckboxShiftClick() {
+       checkboxes = [];
+       lastCheckbox = null;
+       var inputs = document.getElementsByTagName('input');
+       addCheckboxClickHandlers(inputs);
+}
+
+function addCheckboxClickHandlers(inputs, start) {
+       if ( !start) start = 0;
+
+       var finish = start + 250;
+       if ( finish > inputs.length )
+               finish = inputs.length;
+
+       for ( var i = start; i < finish; i++ ) {
+               var cb = inputs[i];
+               if ( !cb.type || cb.type.toLowerCase() != 'checkbox' )
+                       continue;
+               var end = checkboxes.length;
+               checkboxes[end] = cb;
+               cb.index = end;
+               cb.onclick = checkboxClickHandler;
+       }
+
+       if ( finish < inputs.length ) {
+               setTimeout( function () {
+                       addCheckboxClickHandlers(inputs, finish);
+               }, 200 );
+       }
+}
+
+function checkboxClickHandler(e) {
+       if (typeof e == 'undefined') {
+               e = window.event;
+       }
+       if ( !e.shiftKey || lastCheckbox === null ) {
+               lastCheckbox = this.index;
+               return true;
+       }
+       var endState = this.checked;
+       var start, finish;
+       if ( this.index < lastCheckbox ) {
+               start = this.index + 1;
+               finish = lastCheckbox;
+       } else {
+               start = lastCheckbox;
+               finish = this.index - 1;
+       }
+       for (var i = start; i <= finish; ++i ) {
+               checkboxes[i].checked = endState;
+       }
+       lastCheckbox = this.index;
+       return true;
+}
+
+function toggle_element_activation(ida,idb) {
+       if (!document.getElementById) {
+               return;
+       }
+       document.getElementById(ida).disabled=true;
+       document.getElementById(idb).disabled=false;
+}
+
+function toggle_element_check(ida,idb) {
+       if (!document.getElementById) {
+               return;
+       }
+       document.getElementById(ida).checked=true;
+       document.getElementById(idb).checked=false;
+}
+
+/*
+       Written by Jonathan Snook, http://www.snook.ca/jonathan
+       Add-ons by Robert Nyman, http://www.robertnyman.com
+       Author says "The credit comment is all it takes, no license. Go crazy with it!:-)"
+       From http://www.robertnyman.com/2005/11/07/the-ultimate-getelementsbyclassname/
+*/
+function getElementsByClassName(oElm, strTagName, oClassNames){
+       var arrReturnElements = new Array();
+       if ( typeof( oElm.getElementsByClassName ) == "function" ) {
+               /* Use a native implementation where possible FF3, Saf3.2, Opera 9.5 */
+               var arrNativeReturn = oElm.getElementsByClassName( oClassNames );
+               if ( strTagName == "*" )
+                       return arrNativeReturn;
+               for ( var h=0; h < arrNativeReturn.length; h++ ) {
+                       if( arrNativeReturn[h].tagName.toLowerCase() == strTagName.toLowerCase() )
+                               arrReturnElements[arrReturnElements.length] = arrNativeReturn[h];
+               }
+               return arrReturnElements;
+       }
+       var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
+       var arrRegExpClassNames = new Array();
+       if(typeof oClassNames == "object"){
+               for(var i=0; i<oClassNames.length; i++){
+                       arrRegExpClassNames[arrRegExpClassNames.length] =
+                               new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)");
+               }
+       }
+       else{
+               arrRegExpClassNames[arrRegExpClassNames.length] =
+                       new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)");
+       }
+       var oElement;
+       var bMatchesAll;
+       for(var j=0; j<arrElements.length; j++){
+               oElement = arrElements[j];
+               bMatchesAll = true;
+               for(var k=0; k<arrRegExpClassNames.length; k++){
+                       if(!arrRegExpClassNames[k].test(oElement.className)){
+                               bMatchesAll = false;
+                               break;
+                       }
+               }
+               if(bMatchesAll){
+                       arrReturnElements[arrReturnElements.length] = oElement;
+               }
+       }
+       return (arrReturnElements)
+}
+
+function redirectToFragment(fragment) {
+       var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/);
+       if (match) {
+               var webKitVersion = parseInt(match[1]);
+               if (webKitVersion < 420) {
+                       // Released Safari w/ WebKit 418.9.1 messes up horribly
+                       // Nightlies of 420+ are ok
+                       return;
+               }
+       }
+       if (is_gecko) {
+               // Mozilla needs to wait until after load, otherwise the window doesn't scroll
+               addOnloadHook(function () {
+                       if (window.location.hash == "")
+                               window.location.hash = fragment;
+               });
+       } else {
+               if (window.location.hash == "")
+                       window.location.hash = fragment;
+       }
+}
+
+/*
+ * Table sorting script based on one (c) 1997-2006 Stuart Langridge and Joost
+ * de Valk:
+ * http://www.joostdevalk.nl/code/sortable-table/
+ * http://www.kryogenix.org/code/browser/sorttable/
+ *
+ * @todo don't break on colspans/rowspans (bug 8028)
+ * @todo language-specific digit grouping/decimals (bug 8063)
+ * @todo support all accepted date formats (bug 8226)
+ */
+
+var ts_image_path = stylepath+"/common/images/";
+var ts_image_up = "sort_up.gif";
+var ts_image_down = "sort_down.gif";
+var ts_image_none = "sort_none.gif";
+var ts_europeandate = wgContentLanguage != "en"; // The non-American-inclined can change to "true"
+var ts_alternate_row_colors = false;
+var ts_number_transform_table = null;
+var ts_number_regex = null;
+
+function sortables_init() {
+       var idnum = 0;
+       // Find all tables with class sortable and make them sortable
+       var tables = getElementsByClassName(document, "table", "sortable");
+       for (var ti = 0; ti < tables.length ; ti++) {
+               if (!tables[ti].id) {
+                       tables[ti].setAttribute('id','sortable_table_id_'+idnum);
+                       ++idnum;
+               }
+               ts_makeSortable(tables[ti]);
+       }
+}
+
+function ts_makeSortable(table) {
+       var firstRow;
+       if (table.rows && table.rows.length > 0) {
+               if (table.tHead && table.tHead.rows.length > 0) {
+                       firstRow = table.tHead.rows[table.tHead.rows.length-1];
+               } else {
+                       firstRow = table.rows[0];
+               }
+       }
+       if (!firstRow) return;
+
+       // We have a first row: assume it's the header, and make its contents clickable links
+       for (var i = 0; i < firstRow.cells.length; i++) {
+               var cell = firstRow.cells[i];
+               if ((" "+cell.className+" ").indexOf(" unsortable ") == -1) {
+                       cell.innerHTML += '&nbsp;&nbsp;'
+                               + '<a href="#" class="sortheader" '
+                               + 'onclick="ts_resortTable(this);return false;">'
+                               + '<span class="sortarrow">'
+                               + '<img src="'
+                               + ts_image_path
+                               + ts_image_none
+                               + '" alt="&darr;"/></span></a>';
+               }
+       }
+       if (ts_alternate_row_colors) {
+               ts_alternate(table);
+       }
+}
+
+function ts_getInnerText(el) {
+       return getInnerText( el );
+}
+
+function ts_resortTable(lnk) {
+       // get the span
+       var span = lnk.getElementsByTagName('span')[0];
+
+       var td = lnk.parentNode;
+       var tr = td.parentNode;
+       var column = td.cellIndex;
+
+       var table = tr.parentNode;
+       while (table && !(table.tagName && table.tagName.toLowerCase() == 'table'))
+               table = table.parentNode;
+       if (!table) return;
+
+       if (table.rows.length <= 1) return;
+
+       // Generate the number transform table if it's not done already
+       if (ts_number_transform_table == null) {
+               ts_initTransformTable();
+       }
+
+       // Work out a type for the column
+       // Skip the first row if that's where the headings are
+       var rowStart = (table.tHead && table.tHead.rows.length > 0 ? 0 : 1);
+
+       var itm = "";
+       for (var i = rowStart; i < table.rows.length; i++) {
+               if (table.rows[i].cells.length > column) {
+                       itm = ts_getInnerText(table.rows[i].cells[column]);
+                       itm = itm.replace(/^[\s\xa0]+/, "").replace(/[\s\xa0]+$/, "");
+                       if (itm != "") break;
+               }
+       }
+
+       // TODO: bug 8226, localised date formats
+       var sortfn = ts_sort_generic;
+       var preprocessor = ts_toLowerCase;
+       if (/^\d\d[\/. -][a-zA-Z]{3}[\/. -]\d\d\d\d$/.test(itm)) {
+               preprocessor = ts_dateToSortKey;
+       } else if (/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/.test(itm)) {
+               preprocessor = ts_dateToSortKey;
+       } else if (/^\d\d[\/.-]\d\d[\/.-]\d\d$/.test(itm)) {
+               preprocessor = ts_dateToSortKey;
+       // pound dollar euro yen currency cents
+       } else if (/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/.test(itm)) {
+               preprocessor = ts_currencyToSortKey;
+       } else if (ts_number_regex.test(itm)) {
+               preprocessor = ts_parseFloat;
+       }
+
+       var reverse = (span.getAttribute("sortdir") == 'down');
+
+       var newRows = new Array();
+       var staticRows = new Array();
+       for (var j = rowStart; j < table.rows.length; j++) {
+               var row = table.rows[j];
+               if((" "+row.className+" ").indexOf(" unsortable ") < 0) {
+                       var keyText = ts_getInnerText(row.cells[column]);
+                       var oldIndex = (reverse ? -j : j);
+                       var preprocessed = preprocessor( keyText );
+
+                       newRows[newRows.length] = new Array(row, preprocessed, oldIndex);
+               } else staticRows[staticRows.length] = new Array(row, false, j-rowStart);
+       }
+
+       newRows.sort(sortfn);
+
+       var arrowHTML;
+       if (reverse) {
+               arrowHTML = '<img src="'+ ts_image_path + ts_image_down + '" alt="&darr;"/>';
+               newRows.reverse();
+               span.setAttribute('sortdir','up');
+       } else {
+               arrowHTML = '<img src="'+ ts_image_path + ts_image_up + '" alt="&uarr;"/>';
+               span.setAttribute('sortdir','down');
+       }
+
+       for (var i = 0; i < staticRows.length; i++) {
+               var row = staticRows[i];
+               newRows.splice(row[2], 0, row);
+       }
+
+       // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones
+       // don't do sortbottom rows
+       for (var i = 0; i < newRows.length; i++) {
+               if ((" "+newRows[i][0].className+" ").indexOf(" sortbottom ") == -1)
+                       table.tBodies[0].appendChild(newRows[i][0]);
+       }
+       // do sortbottom rows only
+       for (var i = 0; i < newRows.length; i++) {
+               if ((" "+newRows[i][0].className+" ").indexOf(" sortbottom ") != -1)
+                       table.tBodies[0].appendChild(newRows[i][0]);
+       }
+
+       // Delete any other arrows there may be showing
+       var spans = getElementsByClassName(tr, "span", "sortarrow");
+       for (var i = 0; i < spans.length; i++) {
+               spans[i].innerHTML = '<img src="'+ ts_image_path + ts_image_none + '" alt="&darr;"/>';
+       }
+       span.innerHTML = arrowHTML;
+
+       if (ts_alternate_row_colors) {
+               ts_alternate(table);
+       }
+}
+
+function ts_initTransformTable() {
+       if ( typeof wgSeparatorTransformTable == "undefined"
+                       || ( wgSeparatorTransformTable[0] == '' && wgDigitTransformTable[2] == '' ) )
+       {
+               digitClass = "[0-9,.]";
+               ts_number_transform_table = false;
+       } else {
+               ts_number_transform_table = {};
+               // Unpack the transform table
+               // Separators
+               ascii = wgSeparatorTransformTable[0].split("\t");
+               localised = wgSeparatorTransformTable[1].split("\t");
+               for ( var i = 0; i < ascii.length; i++ ) { 
+                       ts_number_transform_table[localised[i]] = ascii[i];
+               }
+               // Digits
+               ascii = wgDigitTransformTable[0].split("\t");
+               localised = wgDigitTransformTable[1].split("\t");
+               for ( var i = 0; i < ascii.length; i++ ) { 
+                       ts_number_transform_table[localised[i]] = ascii[i];
+               }
+
+               // Construct regex for number identification
+               digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', '\\.'];
+               maxDigitLength = 1;
+               for ( var digit in ts_number_transform_table ) {
+                       // Escape regex metacharacters
+                       digits.push( 
+                               digit.replace( /[\\\\$\*\+\?\.\(\)\|\{\}\[\]\-]/,
+                                       function( s ) { return '\\' + s; } )
+                       );
+                       if (digit.length > maxDigitLength) {
+                               maxDigitLength = digit.length;
+                       }
+               }
+               if ( maxDigitLength > 1 ) {
+                       digitClass = '[' + digits.join( '', digits ) + ']';
+               } else {
+                       digitClass = '(' + digits.join( '|', digits ) + ')';
+               }
+       }
+
+       // We allow a trailing percent sign, which we just strip.  This works fine
+       // if percents and regular numbers aren't being mixed.
+       ts_number_regex = new RegExp(
+               "^(" +
+                       "[+-]?[0-9][0-9,]*(\\.[0-9,]*)?(E[+-]?[0-9][0-9,]*)?" + // Fortran-style scientific
+                       "|" +
+                       "[+-]?" + digitClass + "+%?" + // Generic localised
+               ")$", "i"
+       );
+}
+
+function ts_toLowerCase( s ) {
+       return s.toLowerCase();
+}
+
+function ts_dateToSortKey(date) {      
+       // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX
+       if (date.length == 11) {
+               switch (date.substr(3,3).toLowerCase()) {
+                       case "jan": var month = "01"; break;
+                       case "feb": var month = "02"; break;
+                       case "mar": var month = "03"; break;
+                       case "apr": var month = "04"; break;
+                       case "may": var month = "05"; break;
+                       case "jun": var month = "06"; break;
+                       case "jul": var month = "07"; break;
+                       case "aug": var month = "08"; break;
+                       case "sep": var month = "09"; break;
+                       case "oct": var month = "10"; break;
+                       case "nov": var month = "11"; break;
+                       case "dec": var month = "12"; break;
+                       // default: var month = "00";
+               }
+               return date.substr(7,4)+month+date.substr(0,2);
+       } else if (date.length == 10) {
+               if (ts_europeandate == false) {
+                       return date.substr(6,4)+date.substr(0,2)+date.substr(3,2);
+               } else {
+                       return date.substr(6,4)+date.substr(3,2)+date.substr(0,2);
+               }
+       } else if (date.length == 8) {
+               yr = date.substr(6,2);
+               if (parseInt(yr) < 50) { 
+                       yr = '20'+yr; 
+               } else { 
+                       yr = '19'+yr; 
+               }
+               if (ts_europeandate == true) {
+                       return yr+date.substr(3,2)+date.substr(0,2);
+               } else {
+                       return yr+date.substr(0,2)+date.substr(3,2);
+               }
+       }
+       return "00000000";
+}
+
+function ts_parseFloat( s ) {
+       if ( !s ) {
+               return 0;
+       }
+       if (ts_number_transform_table != false) {
+               var newNum = '', c;
+               
+               for ( var p = 0; p < s.length; p++ ) {
+                       c = s.charAt( p );
+                       if (c in ts_number_transform_table) {
+                               newNum += ts_number_transform_table[c];
+                       } else {
+                               newNum += c;
+                       }
+               }
+               s = newNum;
+       }
+
+       num = parseFloat(s.replace(/,/g, ""));
+       return (isNaN(num) ? s : num);
+}
+
+function ts_currencyToSortKey( s ) {
+       return ts_parseFloat(s.replace(/[^0-9.,]/g,''));
+}
+
+function ts_sort_generic(a, b) {
+       return a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2];
+}
+
+function ts_alternate(table) {
+       // Take object table and get all it's tbodies.
+       var tableBodies = table.getElementsByTagName("tbody");
+       // Loop through these tbodies
+       for (var i = 0; i < tableBodies.length; i++) {
+               // Take the tbody, and get all it's rows
+               var tableRows = tableBodies[i].getElementsByTagName("tr");
+               // Loop through these rows
+               // Start at 1 because we want to leave the heading row untouched
+               for (var j = 0; j < tableRows.length; j++) {
+                       // Check if j is even, and apply classes for both possible results
+                       var oldClasses = tableRows[j].className.split(" ");
+                       var newClassName = "";
+                       for (var k = 0; k < oldClasses.length; k++) {
+                               if (oldClasses[k] != "" && oldClasses[k] != "even" && oldClasses[k] != "odd")
+                                       newClassName += oldClasses[k] + " ";
+                       }
+                       tableRows[j].className = newClassName + (j % 2 == 0 ? "even" : "odd");
+               }
+       }
+}
+
+/*
+ * End of table sorting code
+ */
+/**
+ * Add a cute little box at the top of the screen to inform the user of
+ * something, replacing any preexisting message.
+ *
+ * @param String -or- Dom Object message HTML to be put inside the right div
+ * @param String className   Used in adding a class; should be different for each
+ *   call to allow CSS/JS to hide different boxes.  null = no class used.
+ * @return Boolean       True on success, false on failure
+ */
+function jsMsg( message, className ) {
+       if ( !document.getElementById ) {
+               return false;
+       }
+       // We special-case skin structures provided by the software.  Skins that
+       // choose to abandon or significantly modify our formatting can just define
+       // an mw-js-message div to start with.
+       var messageDiv = document.getElementById( 'mw-js-message' );
+       if ( !messageDiv ) {
+               messageDiv = document.createElement( 'div' );
+               if ( document.getElementById( 'column-content' )
+               && document.getElementById( 'content' ) ) {
+                       // MonoBook, presumably
+                       document.getElementById( 'content' ).insertBefore(
+                               messageDiv,
+                               document.getElementById( 'content' ).firstChild
+                       );
+               } else if ( document.getElementById('content')
+               && document.getElementById( 'article' ) ) {
+                       // Non-Monobook but still recognizable (old-style)
+                       document.getElementById( 'article').insertBefore(
+                               messageDiv,
+                               document.getElementById( 'article' ).firstChild
+                       );
+               } else {
+                       return false;
+               }
+       }
+
+       messageDiv.setAttribute( 'id', 'mw-js-message' );
+       messageDiv.style.display = 'block';
+       if( className ) {
+               messageDiv.setAttribute( 'class', 'mw-js-message-'+className );
+       }
+       
+       if (typeof message === 'object') {
+               while (messageDiv.hasChildNodes()) // Remove old content
+                       messageDiv.removeChild(messageDiv.firstChild);
+               messageDiv.appendChild (message); // Append new content
+       }
+       else {
+               messageDiv.innerHTML = message;
+       }
+       return true;
+}
+
+/**
+ * Inject a cute little progress spinner after the specified element
+ *
+ * @param element Element to inject after
+ * @param id Identifier string (for use with removeSpinner(), below)
+ */
+function injectSpinner( element, id ) {
+       var spinner = document.createElement( "img" );
+       spinner.id = "mw-spinner-" + id;
+       spinner.src = stylepath + "/common/images/spinner.gif";
+       spinner.alt = spinner.title = "...";
+       if( element.nextSibling ) {
+               element.parentNode.insertBefore( spinner, element.nextSibling );
+       } else {
+               element.parentNode.appendChild( spinner );
+       }
+}
+
+/**
+ * Remove a progress spinner added with injectSpinner()
+ *
+ * @param id Identifier string
+ */
+function removeSpinner( id ) {
+       var spinner = document.getElementById( "mw-spinner-" + id );
+       if( spinner ) {
+               spinner.parentNode.removeChild( spinner );
+       }
+}
+
+function runOnloadHook() {
+       // don't run anything below this for non-dom browsers
+       if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) {
+               return;
+       }
+
+       // set this before running any hooks, since any errors below
+       // might cause the function to terminate prematurely
+       doneOnloadHook = true;
+
+       updateTooltipAccessKeys( null );
+       akeytt( null );
+       setupCheckboxShiftClick();
+       sortables_init();
+
+       // Run any added-on functions
+       for (var i = 0; i < onloadFuncts.length; i++) {
+               onloadFuncts[i]();
+       }
+}
+
+/**
+ * Add an event handler to an element
+ *
+ * @param Element element Element to add handler to
+ * @param String attach Event to attach to
+ * @param callable handler Event handler callback
+ */
+function addHandler( element, attach, handler ) {
+       if( window.addEventListener ) {
+               element.addEventListener( attach, handler, false );
+       } else if( window.attachEvent ) {
+               element.attachEvent( 'on' + attach, handler );
+       }
+}
+
+/**
+ * Add a click event handler to an element
+ *
+ * @param Element element Element to add handler to
+ * @param callable handler Event handler callback
+ */
+function addClickHandler( element, handler ) {
+       addHandler( element, 'click', handler );
+}
+
+/**
+ * Removes an event handler from an element
+ *
+ * @param Element element Element to remove handler from
+ * @param String remove Event to remove
+ * @param callable handler Event handler callback to remove
+ */
+function removeHandler( element, remove, handler ) {
+       if( window.removeEventListener ) {
+               element.removeEventListener( remove, handler, false );
+       } else if( window.detachEvent ) {
+               element.detachEvent( 'on' + remove, handler );
+       }
+}
+//note: all skins should call runOnloadHook() at the end of html output,
+//      so the below should be redundant. It's there just in case.
+hookEvent("load", runOnloadHook);
diff --git a/skins/common/wikiprintable.css b/skins/common/wikiprintable.css
new file mode 100644 (file)
index 0000000..8b099bb
--- /dev/null
@@ -0,0 +1,46 @@
+/* MediaWiki print stylesheet */
+
+body {
+       color: #000000; background: #ffffff;
+}
+
+
+/* MSIE/Win doesn't understand 'inherit' */
+a, a.external, a.new, a.stub {
+       color: black ! important;
+       text-decoration: none ! important;
+}
+#article {
+       margin: 0 ! important;
+}
+
+/* Continue ... */
+a, a.external, a.new, a.stub {
+       color: inherit ! important;
+       text-decoration: inherit ! important;
+}
+
+/* Hide ugly UI stuff */
+#quickbar, #topbar, #logo, #footer, #siteNotice,
+.editsection, .toctoggle {
+       display: none;
+}
+
+/* */
+#article {
+       position: relative;
+       margin: inherit ! important;
+}
+
+.printfooter {
+       border-top: solid 1px black;
+       display: block ! important;
+}
+
+/* Old stuff, fixme:
+a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; }
+a.interwiki, a.external { color: #3333BB; text-decoration: none; }
+h1.pagetitle { padding-bottom: 0; margin-bottom: 0; }
+i.link, u.link { color: #000066; }
+p.subtitle { padding-top: 0; margin-top: 0; }
+*/
diff --git a/skins/common/wikistandard.css b/skins/common/wikistandard.css
new file mode 100644 (file)
index 0000000..5bf5924
--- /dev/null
@@ -0,0 +1,48 @@
+#article { padding: 4px; }
+#content { margin: 0; padding: 0; }
+#footer { padding: 4px;font-size:95%;clear: both; }
+#pagestats { font-size: 9pt; }
+#powersearch {
+  background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px;
+}
+#quickbar { width: 140px; height:100%; padding: 4px; visibility: visible; z-index:99;font-size:95%;}
+#topbar { padding: 4px;font-size:95%; }
+
+
+/* Table of contents */
+.toctoggle, .editsection { font-size: smaller; }
+
+/* ... */
+#toolbar { padding:0px; }
+#infobox { background:#eeeeff;color:black;}
+#editform { margin-top:1px; }
+a.interwiki, a.external { color: #3366BB; }
+a.printable { text-decoration: underline; }
+a.stub { color:#772233; text-decoration:none; }
+a:visited { color: #5A3696; }
+body { margin: 0px; padding: 4px; color: black; }
+form.inline { display: inline; }
+textarea { overflow: auto; }
+
+
+h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0;
+font-size:150%; }
+h1.pagetitle .editsection { font-size: 66.7%; }
+h2 { font-size: 120%; }
+h2 .editsection { font-size: 83.3%; }
+h2, h3, h4, h5, h6 { margin-bottom: 0;}
+h3 { font-size: 106.25%; }
+h3 .editsection { font-size: 94.1%; }
+h4 { font-size: 103.125%; }
+h4 .editsection { font-size: 97.0%; }
+h5 { font-size: 100%; }
+h5 .editsection { font-size: 100%; }
+h6 { font-size: 95%; }
+h6 .editsection { font-size: 105.3%; }
+hr.sep { color:gray;height:1px;background-color:gray;}
+p.subpages { font-size:small;}
+p.subtitle { padding-top: 0; margin-top: 0;}
+.catlinks { font-size:small; margin-top:0; text-align:right;}
+td { empty-cells:show; }
+td.bottom { border-top: 1px solid gray; }
+td.top { border-bottom: 1px solid gray; }
diff --git a/skins/disabled/MonoBook.tpl b/skins/disabled/MonoBook.tpl
new file mode 100644 (file)
index 0000000..58bc4f5
--- /dev/null
@@ -0,0 +1,200 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang}" lang="{lang}" dir="{dir}">
+<head>
+       <meta http-equiv="Content-Type" content="{~ mimetype}; charset={~ charset}" />
+       {headlinks}
+       {headscripts}
+       <title>{pagetitle}</title>
+       <style type="text/css" media="screen, projection">/*<![CDATA[*/ @import "{~ stylepath}/{~ stylename}/main.css?5"; /*]]>*/</style>
+       <link rel="stylesheet" type="text/css" {if notprintable {media="print"}} href="{~ stylepath}/common/commonPrint.css" />
+       <!--[if lt IE 5.5000]><style type="text/css">@import "{~ stylepath}/{~ stylename}/IE50Fixes.css";</style><![endif]-->
+       <!--[if IE 5.5000]><style type="text/css">@import "{~ stylepath}/{~ stylename}/IE55Fixes.css";</style><![endif]-->
+       <!--[if IE 6]><style type="text/css">@import "{~ stylepath}/{~ stylename}/IE60Fixes.css";</style><![endif]-->
+       <!--[if IE 7]><style type="text/css">@import "{~ stylepath}/{~ stylename}/IE70Fixes.css?1";</style><![endif]-->
+       <!--[if lt IE 7]><script type="{jsmimetype}" src="{~ stylepath}/common/IEFixes.js"></script>
+       <meta http-equiv="imagetoolbar" content="no" /><![endif]-->
+       <script type="{jsmimetype}">var skin = '{~ skinname}';var stylepath = '{~ stylepath}';</script>
+       <script type="{jsmimetype}" src="{~ stylepath}/common/wikibits.js"><!-- wikibits js --></script>
+       {if jsvarurl {<script type="{jsmimetype}" src="{jsvarurl}"><!-- site js --></script>}}
+       {if pagecss {<style type="text/css">{pagecss}</style>}}
+       {usercss}
+       {sitecss}
+       {gencss}
+       {if userjs {<script type="{jsmimetype}" src="{userjs}"></script>}}
+       {if userjsprev {<script type="{jsmimetype}">{userjsprev}</script>}}
+       {trackbackhtml}
+</head>
+<body {if body_ondblclick {ondblclick="{body_ondblclick}"}} {if body_onload {onload="{body_onload}" }} class="{~ nsclass} {~ dir}">
+<div id="globalWrapper">
+       <div id="column-content">
+               <div id="content">
+                       <a name="top" id="top"></a>
+                       {if sitenotice {<div id="siteNotice">{sitenotice}</div> }}
+                       <h1 class="firstHeading">{title}</h1>
+                       <div id="bodyContent">
+                               <h3 id="siteSub">{msg {tagline}}</h3>
+                               <div id="contentSub">{subtitle}</div>
+                               {if undelete {<div id="contentSub2"><span class="subpages">{undelete}</span></div> }}
+                               {if newtalk {<div class="usermessage">{newtalk}</div> }}
+                               {if showjumplinks {
+                                       <div id="jump-to-nav">{msg {jumpto}} <a href="#column-one">{msg {jumptonavigation}}</a>, 
+                                       <a href="#searchInput">{msg {jumptosearch}}</a></div> 
+                               }}
+                               <!-- start content -->
+                               {bodytext}
+                               {if catlinks {<div id="catlinks">{catlinks}</div> }}
+                               <!-- end content -->
+                               <div class="visualClear"></div>
+                       </div>
+               </div>
+       </div>
+       <div id="column-one">
+               <div id="p-cactions" class="portlet">
+                       <h5>{msg {views}}</h5>
+                       <ul>
+                               {if is_special {
+                                       <li id="ca-article" class="selected"><a href="{request_url}">{msg {specialpage}}</a></li>
+                               } {
+                                       <li id="ca-{nskey}" {selecttab {subject} subject_newclass}><a href="{subject_url}">{msg nskey}</a></li>
+                                       <li id="ca-talk" {selecttab {talk} talk_newclass}><a href="{talk_url}">{msg {talk}}</a></li>
+                                       {if can_edit {
+                                               {if is_talk {
+                                                       <li id="ca-edit" {selecttab {edit} {istalk}}><a href="{edit_url}">{msg {edit}}</a></li>
+                                                       <li id="ca-addsection" {selecttab {addsection}}><a href="{localurl {action=edit&section=new}}">{msg {addsection}}</a></li>
+                                               } {
+                                                       <li id="ca-edit" {selecttab {edit}}><a href="{edit_url}">{msg {edit}}</a></li>
+                                               }}
+                                       } {
+                                               <li id="ca-viewsource" {selecttab {edit}}><a href="{edit_url}">{msg {viewsource}}</a></li>
+                                       }}
+
+                                       {if article_exists {
+                                               <li id="ca-history" {selecttab {history}}><a href="{localurl {action=history}}">{msg {history_short}}</a></li>
+                                               {if {{ is_allowed {protect} }} {
+                                                       {if is_ns_mediawiki {} {
+                                                               {if is_protected {
+                                                                       <li id="ca-protect" {selecttab {protect}}><a href="{localurl {action=unprotect}}">{msg {unprotect}}</a></li>
+                                                               } {
+                                                                       <li id="ca-protect" {selecttab {protect}}><a href="{localurl {action=protect}}">{msg {protect}}</a></li>
+                                                               }}
+                                                       }}
+                                               }}
+                                               
+                                               {if {{ is_allowed {delete} }} {
+                                                               <li id="ca-delete" {selecttab {delete}}><a href="{localurl {action=delete}}">{msg {delete}}</a></li>
+                                               }}
+                                               {if {{ is_allowed {move} }} {
+                                                       {if can_move {
+                                                                       <li id="ca-move" {selecttab {move}}><a href="{move_url}">{msg {move}}</a></li>
+                                                       }}
+                                               }}
+                                               {if is_loggedin {
+                                                       {if is_watching {
+                                                               <li id="ca-unwatch" {selecttab {watch}}><a href="{localurl {action=unwatch}}">{msg {unwatch}}</a></li>
+                                                       } {
+                                                               <li id="ca-watch" {selecttab {watch}}><a href="{localurl {action=watch}}">{msg {watch}}</a></li>
+                                                       }}
+                                               }}
+                                       }}
+                               }}
+                               {extratabs {<li id="ca-$id" $class><a href="$href">$text</a></li>}}
+                       </ul>
+               </div>
+               <div class="portlet" id="p-personal">
+                       <h5>{msg {personaltools}}</h5>
+                       <div class="pBody">
+                               <ul>                                            
+                                       {personal_urls { <li id="pt-$key" $classactive ><a href="$href" $class>$text</a></li> }}
+                               </ul>
+                       </div>
+               </div>
+               <div class="portlet" id="p-logo">
+                       <a style="background-image: url({~ logopath});" href="{mainpage}" title="{msg {mainpage}}"></a>
+               </div>
+               <script type="{jsmimetype}"> if (window.isMSIE55) fixalpha(); </script>
+               {sidebar {
+                       <div class='portlet' id="p-$bar">
+                               <h5>$barname</h5>
+                               <div class='pBody'>
+                               <ul>
+               } {
+                               </ul>
+                               </div>
+                       </div>
+               } {<li id="$id" $classactive><a href="$href">$text</a></li>
+                       }
+               }
+
+               <div id="p-search" class="portlet">
+                       <h5><label for="searchInput">{msg {search}}</label></h5>
+                       <div id="searchBody" class="pBody">
+                               <form action="{searchaction}" id="searchform"><div>
+                                       <input id="searchInput" name="search" type="text" {
+                                               }{if {{fallbackmsg {accesskey-search} {} }} {accesskey="{fallbackmsg {accesskey-search} {} }"}}{
+                                               }{if search { value="{search}"}} />
+                                       <input type='submit' name="go" class="searchButton" id="searchGoButton" value="{msg {go}}" />&nbsp;
+                                       <input type='submit' name="fulltext" class="searchButton" value="{msg {search}}" />
+                               </div></form>
+                       </div>
+               </div>
+               <div class="portlet" id="p-tb">
+                       <h5>{msg {toolbox}}</h5>
+                       <div class="pBody">
+                               <ul>
+                                       {if notspecialpage    {<li id="t-whatlinkshere"><a href="{nav_whatlinkshere}">{msg {whatlinkshere}}</a></li> }}
+                                       {if article_exists {<li id="t-recentchangeslinked"><a href="{nav_recentchangeslinked}">{msg {recentchangeslinked}}</a></li> }}
+                                       {if nav_trackbacklink {<li id="t-trackbacklink"><a href="{nav_trackbacklink}">{msg {trackbacklink}}</a></li>}}
+                                       {if feeds
+                                               {<li id="feedlinks">{feeds {<span id="feed-$key"><a href="$href">$text</a>&nbsp;</span>}}
+                                       </li>}}
+                                       {if is_userpage {
+                                               <li id="t-contributions"><a href="{nav_contributions}">{msg {contributions}}</a></li>
+                                               {if {{is_allowed {block}}} {<li id="t-blockip"><a href="{nav_blockip}">{msg {blockip}}</a></li>}}
+                                               {if is_loggedin     {<li id="t-emailuser"><a href="{nav_emailuser}">{msg {emailuser}}</a></li>}}
+                                       }}
+                                       {if nav_upload        {<li id="t-upload"><a href="{nav_upload}">{msg {upload}}</a></li>}}
+                                       {if nav_specialpages  {<li id="t-specialpages"><a href="{nav_specialpages}">{msg {specialpages}}</a></li>}}
+                                       {if nav_print         {<li id="t-print"><a href="{nav_print}">{msg {printableversion}}</a></li>}}
+                                       {if nav_permalink     {<li id="t-permalink"><a href="{nav_permalink}">{msg {permalink}}</a></li>}}
+                                       {if is_permalink      {<li id="t-ispermalink">{msg {permalink}}</li>}}
+
+                                       {toolboxend}
+                               </ul>
+                       </div>
+               </div>
+               {language_urls {
+                       <div id="p-lang" class="portlet">
+                               <h5>{msg {otherlanguages}}</h5>
+                               <div class="pBody">
+                                       <ul>
+                                               $body
+                                       </ul>
+                               </div>
+                       </div>
+               } {
+                       <li class="$class"><a href="$href">$text</a></li>
+               }}      
+       </div><!-- end of the left (by default at least) column -->
+       <div class="visualClear"></div>
+       <div id="footer">
+               {if poweredbyico { <div id="f-poweredbyico">{poweredbyico}</div> }}
+               {if copyrightico { <div id="f-copyrightico">{copyrightico}</div> }}
+
+               <ul id="f-list">
+                       {if lastmod                {  <li id="lastmod">{lastmod}</li> }}
+                       {if viewcount              {  <li id="viewcount">{viewcount}</li> }}
+                       {if numberofwatchingusers  {  <li id="numberofwatchingusers">{numberofwatchingusers}</li> }}
+                       {if credits                {  <li id="credits">{credits}</li> }}
+                       {if is_currentview         {  <li id="copyright">{normalcopyright}</li> }}
+                       {if usehistorycopyright    {  <li id="copyright">{historycopyright}</li> }}
+                       {if privacy                {  <li id="privacy">{privacy}</li> }}
+                       {if about                  {  <li id="about">{about}</li> }}
+                       {if disclaimer             {  <li id="disclaimer">{disclaimer}</li> }}
+                       {if tagline                {  <li id="tagline">{tagline}</li> }}
+               </ul>
+       </div>
+       <script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script>
+</div>
+{reporttime}
+{if {} { vim: set syn=html ts=2 : }}
+</body></html>
diff --git a/skins/disabled/MonoBookCBT.php b/skins/disabled/MonoBookCBT.php
new file mode 100644 (file)
index 0000000..0d693a8
--- /dev/null
@@ -0,0 +1,1389 @@
+<?php
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+       die( "This file is part of MediaWiki, it is not a valid entry point\n" );
+}
+
+require_once( 'includes/cbt/CBTProcessor.php' );
+require_once( 'includes/cbt/CBTCompiler.php' );
+require_once( 'includes/SkinTemplate.php' );
+
+/**
+ * MonoBook clone using the new dependency-tracking template processor.
+ * EXPERIMENTAL - use only for testing and profiling at this stage.
+ *
+ * See includes/cbt/README for an explanation.
+ *
+ * The main thing that's missing is cache invalidation, on change of:
+ *   * messages
+ *   * user preferences
+ *   * source template
+ *   * source code and configuration files
+ *
+ * The other thing is that lots of dependencies that are declared in the callbacks
+ * are not intelligently handled. There's some room for improvement there.
+ *
+ * The class is derived from SkinTemplate, but that's only temporary. Eventually 
+ * it'll be derived from Skin, and I've avoided using SkinTemplate functions as 
+ * much as possible. In fact, the only SkinTemplate dependencies I know of at the 
+ * moment are the functions to generate the gen=css and gen=js files. 
+ * 
+ */
+class SkinMonoBookCBT extends SkinTemplate {
+       var $mOut, $mTitle;
+       var $mStyleName = 'monobook';
+       var $mCompiling = false;
+       var $mFunctionCache = array();
+
+       /******************************************************
+        * General functions                                  *
+        ******************************************************/
+       
+       /** Execute the template and write out the result */
+       function outputPage( &$out ) {
+               echo $this->execute( $out );
+       }
+
+       function execute( &$out ) {
+               global $wgTitle, $wgStyleDirectory, $wgParserCacheType;
+               $fname = 'SkinMonoBookCBT::execute';
+               wfProfileIn( $fname );
+               wfProfileIn( "$fname-setup" );
+               Skin::initPage( $out );
+               
+               $this->mOut =&  $out;
+               $this->mTitle =& $wgTitle;
+
+               $sourceFile = "$wgStyleDirectory/MonoBook.tpl";
+
+               wfProfileOut( "$fname-setup" );
+       
+               if ( $wgParserCacheType == CACHE_NONE ) {
+                       $template = file_get_contents( $sourceFile );
+                       $text = $this->executeTemplate( $template );
+               } else {
+                       $compiled = $this->getCompiledTemplate( $sourceFile );
+                       
+                       wfProfileIn( "$fname-eval" );
+                       $text = eval( $compiled );
+                       wfProfileOut( "$fname-eval" );
+               }
+               wfProfileOut( $fname );
+               return $text;
+       }
+
+       function getCompiledTemplate( $sourceFile ) {
+               global $wgDBname, $wgMemc, $wgRequest, $wgUser, $parserMemc;
+               $fname = 'SkinMonoBookCBT::getCompiledTemplate';
+
+               $expiry = 3600;
+               
+               // Sandbox template execution
+               if ( $this->mCompiling ) {
+                       return;
+               }
+               
+               wfProfileIn( $fname );
+
+               // Is the request an ordinary page view?
+               if ( $wgRequest->wasPosted() || 
+                               count( array_diff( array_keys( $_GET ), array( 'title', 'useskin', 'recompile' ) ) ) != 0 ) 
+               {
+                       $type = 'nonview';
+               } else {
+                       $type = 'view';
+               }
+
+               // Per-user compiled template
+               // Put all logged-out users on the same cache key
+               $cacheKey = "$wgDBname:monobookcbt:$type:" . $wgUser->getId();
+
+               $recompile = $wgRequest->getVal( 'recompile' );
+               if ( $recompile == 'user' ) {
+                       $recompileUser = true;
+                       $recompileGeneric = false;
+               } elseif ( $recompile ) {
+                       $recompileUser = true;
+                       $recompileGeneric = true;
+               } else {
+                       $recompileUser = false;
+                       $recompileGeneric = false;
+               }
+               
+               if ( !$recompileUser ) { 
+                       $php = $parserMemc->get( $cacheKey );
+               }
+               if ( $recompileUser || !$php ) {
+                       if ( $wgUser->isLoggedIn() ) {
+                               // Perform staged compilation
+                               // First compile a generic template for all logged-in users
+                               $genericKey = "$wgDBname:monobookcbt:$type:loggedin";
+                               if ( !$recompileGeneric ) {
+                                       $template = $parserMemc->get( $genericKey );
+                               }
+                               if ( $recompileGeneric || !$template ) {
+                                       $template = file_get_contents( $sourceFile );
+                                       $ignore = array( 'loggedin', '!loggedin dynamic' );
+                                       if ( $type == 'view' ) {
+                                               $ignore[] = 'nonview dynamic';
+                                       }
+                                       $template = $this->compileTemplate( $template, $ignore );
+                                       $parserMemc->set( $genericKey, $template, $expiry );
+                               }
+                       } else {
+                               $template = file_get_contents( $sourceFile );
+                       }
+
+                       $ignore = array( 'lang', 'loggedin', 'user' );
+                       if ( $wgUser->isLoggedIn() ) {
+                               $ignore[] = '!loggedin dynamic';
+                       } else {
+                               $ignore[] = 'loggedin dynamic';
+                       }
+                       if ( $type == 'view' ) {
+                               $ignore[] = 'nonview dynamic';
+                       }
+                       $compiled = $this->compileTemplate( $template, $ignore );
+
+                       // Reduce whitespace
+                       // This is done here instead of in CBTProcessor because we can be 
+                       // more sure it is safe here.
+                       $compiled = preg_replace( '/^[ \t]+/m', '', $compiled );
+                       $compiled = preg_replace( '/[\r\n]+/', "\n", $compiled );
+
+                       // Compile to PHP
+                       $compiler = new CBTCompiler( $compiled );
+                       $ret = $compiler->compile();
+                       if ( $ret !== true ) {
+                               echo $ret;
+                               wfErrorExit();
+                       }
+                       $php = $compiler->generatePHP( '$this' );
+
+                       $parserMemc->set( $cacheKey, $php, $expiry );
+               }
+               wfProfileOut( $fname );
+               return $php;
+       }
+
+       function compileTemplate( $template, $ignore ) {
+               $tp = new CBTProcessor( $template, $this, $ignore );
+               $tp->mFunctionCache = $this->mFunctionCache;
+
+               $this->mCompiling = true;
+               $compiled = $tp->compile();
+               $this->mCompiling = false;
+
+               if ( $tp->getLastError() ) {
+                       // If there was a compile error, don't save the template
+                       // Instead just print the error and exit
+                       echo $compiled;
+                       wfErrorExit();
+               }
+               $this->mFunctionCache = $tp->mFunctionCache;
+               return $compiled;
+       }
+
+       function executeTemplate( $template ) {
+               $fname = 'SkinMonoBookCBT::executeTemplate';
+               wfProfileIn( $fname );
+               $tp = new CBTProcessor( $template, $this );
+               $tp->mFunctionCache = $this->mFunctionCache;
+               
+               $this->mCompiling = true;
+               $text = $tp->execute();
+               $this->mCompiling = false;
+
+               $this->mFunctionCache = $tp->mFunctionCache;
+               wfProfileOut( $fname );
+               return $text;
+       }
+       
+       /******************************************************
+        * Callbacks                                          *
+        ******************************************************/
+
+       function lang() { return $GLOBALS['wgContLanguageCode']; }
+
+       function dir() {
+               global $wgContLang;
+               return $wgContLang->isRTL() ? 'rtl' : 'ltr';
+       }
+       
+       function mimetype() { return $GLOBALS['wgMimeType']; }
+       function charset() { return $GLOBALS['wgOutputEncoding']; }
+       function headlinks() { 
+               return cbt_value( $this->mOut->getHeadLinks(), 'dynamic' );
+       }
+       function headscripts() { 
+               return cbt_value( $this->mOut->getScript(), 'dynamic' );
+       }
+       
+       function pagetitle() { 
+               return cbt_value( $this->mOut->getHTMLTitle(), array( 'title', 'lang' ) ); 
+       }
+       
+       function stylepath() { return $GLOBALS['wgStylePath']; }
+       function stylename() { return $this->mStyleName; }
+       
+       function notprintable() {
+               global $wgRequest;
+               return cbt_value( !$wgRequest->getBool( 'printable' ), 'nonview dynamic' );
+       }
+       
+       function jsmimetype() { return $GLOBALS['wgJsMimeType']; }
+       
+       function jsvarurl() {
+               global $wgUseSiteJs, $wgUser;
+               if ( !$wgUseSiteJs ) return '';
+               
+               if ( $wgUser->isLoggedIn() ) {
+                       $url = self::makeUrl( '-','action=raw&smaxage=0&gen=js' );
+               } else {
+                       $url = self::makeUrl( '-','action=raw&gen=js' );
+               }
+               return cbt_value( $url, 'loggedin' );
+       }
+       
+       function pagecss() {
+               global $wgHooks;
+               
+               $out = false;
+               wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) );
+
+               // Unknown dependencies
+               return cbt_value( $out, 'dynamic' );
+       }
+       
+       function usercss() {
+               if ( $this->isCssPreview() ) {
+                       global $wgRequest;
+                       $usercss = $this->makeStylesheetCdata( $wgRequest->getText('wpTextbox1') );
+               } else {
+                       $usercss = $this->makeStylesheetLink( self::makeUrl($this->getUserPageText() . 
+                               '/'.$this->mStyleName.'.css', 'action=raw&ctype=text/css' ) );
+               }
+
+               // Dynamic when not an ordinary page view, also depends on the username
+               return cbt_value( $usercss, array( 'nonview dynamic', 'user' ) );
+       }
+       
+       function sitecss() {
+               global $wgUseSiteCss;
+               if ( !$wgUseSiteCss ) {
+                       return '';
+               }
+
+               global $wgSquidMaxage, $wgContLang, $wgStylePath;
+                       
+               $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
+               
+               $sitecss = '';
+               if ( $wgContLang->isRTL() ) {
+                       $sitecss .= $this->makeStylesheetLink( $wgStylePath . '/' . $this->mStyleName . '/rtl.css' ) . "\n";
+               }
+
+               $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) ) . "\n";
+               $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( ucfirst( $this->mStyleName ) . '.css', $query, NS_MEDIAWIKI ) ) . "\n";
+
+               // No deps
+               return $sitecss;
+       }
+
+       function gencss() {
+               global $wgUseSiteCss;
+               if ( !$wgUseSiteCss ) return '';
+               
+               global $wgSquidMaxage, $wgUser, $wgAllowUserCss;
+               if ( $this->isCssPreview() ) {
+                       $siteargs = '&smaxage=0&maxage=0';
+               } else {
+                       $siteargs = '&maxage=' . $wgSquidMaxage;
+               }
+               if ( $wgAllowUserCss && $wgUser->isLoggedIn() ) {
+                       $siteargs .= '&ts={user_touched}';
+                       $isTemplate = true;
+               } else {
+                       $isTemplate = false;
+               }
+               
+               $link = $this->makeStylesheetLink( self::makeUrl('-','action=raw&gen=css' . $siteargs) ) . "\n";
+
+               if ( $wgAllowUserCss ) {
+                       $deps = 'loggedin';
+               } else { 
+                       $deps = array();
+               }
+               return cbt_value( $link, $deps, $isTemplate );
+       }
+       
+       function user_touched() {
+               global $wgUser;
+               return cbt_value( $wgUser->mTouched, 'dynamic' );
+       }
+               
+       function userjs() {
+               global $wgAllowUserJs, $wgJsMimeType;
+               if ( !$wgAllowUserJs ) return '';
+               
+               if ( $this->isJsPreview() ) {
+                       $url = '';
+               } else {
+                       $url = self::makeUrl($this->getUserPageText().'/'.$this->mStyleName.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s');
+               }
+               return cbt_value( $url, array( 'nonview dynamic', 'user' ) );
+       }
+       
+       function userjsprev() {
+               global $wgAllowUserJs, $wgRequest;
+               if ( !$wgAllowUserJs ) return '';
+               if ( $this->isJsPreview() ) {
+                       $js = '/*<![CDATA[*/ ' . $wgRequest->getText('wpTextbox1') . ' /*]]>*/';
+               } else {
+                       $js = '';
+               }
+               return cbt_value( $js, array( 'nonview dynamic' ) );
+       }
+       
+       function trackbackhtml() {
+               global $wgUseTrackbacks;
+               if ( !$wgUseTrackbacks ) return '';
+
+               if ( $this->mOut->isArticleRelated() ) {
+                       $tb = $this->mTitle->trackbackRDF();
+               } else {
+                       $tb = '';
+               }
+               return cbt_value( $tb, 'dynamic' );
+       }
+       
+       function body_ondblclick() {
+               global $wgUser;
+               if( $this->isEditable() && $wgUser->getOption("editondblclick") ) {
+                       $js = 'document.location = "' . $this->getEditUrl() .'";';
+               } else {
+                       $js = '';
+               }
+
+               if ( User::getDefaultOption('editondblclick') ) {
+                       return cbt_value( $js, 'user', 'title' );
+               } else {
+                       // Optimise away for logged-out users
+                       return cbt_value( $js, 'loggedin dynamic' );
+               }
+       }
+       
+       function body_onload() {
+               global $wgUser;
+               if ( $this->isEditable() && $wgUser->getOption( 'editsectiononrightclick' ) ) {
+                       $js = 'setupRightClickEdit()';
+               } else {
+                       $js = '';
+               }
+               return cbt_value( $js, 'loggedin dynamic' );
+       }
+       
+       function nsclass() {
+               return cbt_value( 'ns-' . $this->mTitle->getNamespace(), 'title' );
+       }
+       
+       function sitenotice() {
+               // Perhaps this could be given special dependencies using our knowledge of what 
+               // wfGetSiteNotice() depends on.
+               return cbt_value( wfGetSiteNotice(), 'dynamic' );
+       }
+       
+       function title() {
+               return cbt_value( $this->mOut->getPageTitle(), array( 'title', 'lang' ) );
+       }
+
+       function title_urlform() {
+               return cbt_value( $this->getThisTitleUrlForm(), 'title' );
+       }
+
+       function title_userurl() {
+               return cbt_value( urlencode( $this->mTitle->getDBkey() ), 'title' );
+       }
+
+       function subtitle() {
+               $subpagestr = $this->subPageSubtitle();
+               if ( !empty( $subpagestr ) ) {
+                       $s = '<span class="subpages">'.$subpagestr.'</span>'.$this->mOut->getSubtitle();
+               } else {
+                       $s = $this->mOut->getSubtitle();
+               }
+               return cbt_value( $s, array( 'title', 'nonview dynamic' ) );
+       }
+       
+       function undelete() {
+               return cbt_value( $this->getUndeleteLink(), array( 'title', 'lang' ) );
+       }
+       
+       function newtalk() {
+               global $wgUser, $wgDBname;
+               $newtalks = $wgUser->getNewMessageLinks();
+
+               if (count($newtalks) == 1 && $newtalks[0]["wiki"] === $wgDBname) {
+                       $usertitle = $this->getUserPageTitle();
+                       $usertalktitle = $usertitle->getTalkPage();
+                       if( !$usertalktitle->equals( $this->mTitle ) ) {
+                               $ntl = wfMsg( 'youhavenewmessages',
+                                       $this->makeKnownLinkObj(
+                                               $usertalktitle,
+                                               wfMsgHtml( 'newmessageslink' ),
+                                               'redirect=no'
+                                       ),
+                                       $this->makeKnownLinkObj(
+                                               $usertalktitle,
+                                               wfMsgHtml( 'newmessagesdifflink' ),
+                                               'diff=cur'
+                                       )
+                               );
+                               # Disable Cache
+                               $this->mOut->setSquidMaxage(0);
+                       }
+               } else if (count($newtalks)) {
+                       $sep = str_replace("_", " ", wfMsgHtml("newtalkseparator"));
+                       $msgs = array();
+                       foreach ($newtalks as $newtalk) {
+                               $msgs[] = wfElement("a", 
+                                       array('href' => $newtalk["link"]), $newtalk["wiki"]);
+                       }
+                       $parts = implode($sep, $msgs);
+                       $ntl = wfMsgHtml('youhavenewmessagesmulti', $parts);
+                       $this->mOut->setSquidMaxage(0);
+               } else {
+                       $ntl = '';
+               }
+               return cbt_value( $ntl, 'dynamic' );
+       }
+       
+       function showjumplinks() {
+               global $wgUser;
+               return cbt_value( $wgUser->getOption( 'showjumplinks' ) ? 'true' : '', 'user' );
+       }
+       
+       function bodytext() {
+               return cbt_value( $this->mOut->getHTML(), 'dynamic' );
+       }
+       
+       function catlinks() {
+               if ( !isset( $this->mCatlinks ) ) {
+                       $this->mCatlinks = $this->getCategories();
+               }
+               return cbt_value( $this->mCatlinks, 'dynamic' );
+       }
+       
+       function extratabs( $itemTemplate ) {
+               global $wgContLang, $wgDisableLangConversion;
+               
+               $etpl = cbt_escape( $itemTemplate );
+
+               /* show links to different language variants */
+               $variants = $wgContLang->getVariants();
+               $s = '';
+               if ( !$wgDisableLangConversion && count( $wgContLang->getVariants() ) > 1 ) {
+                       $vcount=0;
+                       foreach ( $variants as $code ) {
+                               $name = $wgContLang->getVariantname( $code );
+                               if ( $name == 'disable' ) {
+                                       continue;
+                               }
+                               $code = cbt_escape( $code );
+                               $name = cbt_escape( $name );
+                               $s .= "{ca_variant {{$code}} {{$name}} {{$vcount}} {{$etpl}}}\n";
+                               $vcount ++;
+                       }
+               }
+               return cbt_value( $s, array(), true );
+       }
+
+       function is_special() { return cbt_value( $this->mTitle->getNamespace() == NS_SPECIAL, 'title' ); }
+       function can_edit() { return cbt_value( (string)($this->mTitle->userCan( 'edit' )), 'dynamic' ); }
+       function can_move() { return cbt_value( (string)($this->mTitle->userCan( 'move' )), 'dynamic' ); }
+       function is_talk() { return cbt_value( (string)($this->mTitle->isTalkPage()), 'title' ); }
+       function is_protected() { return cbt_value( (string)$this->mTitle->isProtected(), 'dynamic' ); }
+       function nskey() { return cbt_value( $this->mTitle->getNamespaceKey(), 'title' ); }
+
+       function request_url() {
+               global $wgRequest;
+               return cbt_value( $wgRequest->getRequestURL(), 'dynamic' );
+       }
+
+       function subject_url() { 
+               $title = $this->getSubjectPage();
+               if ( $title->exists() ) {
+                       $url = $title->getLocalUrl();
+               } else {
+                       $url = $title->getLocalUrl( 'action=edit' );
+               }
+               return cbt_value( $url, 'title' ); 
+       }
+
+       function talk_url() {
+               $title = $this->getTalkPage();
+               if ( $title->exists() ) {
+                       $url = $title->getLocalUrl();
+               } else {
+                       $url = $title->getLocalUrl( 'action=edit' );
+               }
+               return cbt_value( $url, 'title' );
+       }
+
+       function edit_url() {
+               return cbt_value( $this->getEditUrl(), array( 'title', 'nonview dynamic' ) );
+       }
+
+       function move_url() {
+               return cbt_value( $this->makeSpecialParamUrl( 'Movepage' ), array(), true );
+       }
+
+       function localurl( $query ) {
+               return cbt_value( $this->mTitle->getLocalURL( $query ), 'title' );
+       }
+
+       function selecttab( $tab, $extraclass = '' ) {
+               if ( !isset( $this->mSelectedTab ) ) {
+                       $prevent_active_tabs = false ;
+                       wfRunHooks( 'SkinTemplatePreventOtherActiveTabs', array( &$this , &$preventActiveTabs ) );
+
+                       $actionTabs = array(
+                               'edit' => 'edit',
+                               'submit' => 'edit',
+                               'history' => 'history',
+                               'protect' => 'protect',
+                               'unprotect' => 'protect',
+                               'delete' => 'delete',
+                               'watch' => 'watch',
+                               'unwatch' => 'watch',
+                       );
+                       if ( $preventActiveTabs ) {
+                               $this->mSelectedTab = false;
+                       } else {
+                               $action = $this->getAction();
+                               $section = $this->getSection();
+                               
+                               if ( isset( $actionTabs[$action] ) ) {
+                                       $this->mSelectedTab = $actionTabs[$action];
+
+                                       if ( $this->mSelectedTab == 'edit' && $section == 'new' ) {
+                                               $this->mSelectedTab = 'addsection';
+                                       }
+                               } elseif ( $this->mTitle->isTalkPage() ) {
+                                       $this->mSelectedTab = 'talk';
+                               } else {
+                                       $this->mSelectedTab = 'subject';
+                               }
+                       }
+               }
+               if ( $extraclass ) {
+                       if ( $this->mSelectedTab == $tab ) {
+                               $s = 'class="selected ' . htmlspecialchars( $extraclass ) . '"';
+                       } else {
+                               $s = 'class="' . htmlspecialchars( $extraclass ) . '"';
+                       }                       
+               } else {
+                       if ( $this->mSelectedTab == $tab ) {
+                               $s = 'class="selected"';
+                       } else {
+                               $s = '';
+                       }
+               }
+               return cbt_value( $s, array( 'nonview dynamic', 'title' ) );
+       }
+
+       function subject_newclass() {
+               $title = $this->getSubjectPage();
+               $class = $title->exists() ? '' : 'new';
+               return cbt_value( $class, 'dynamic' );
+       }
+
+       function talk_newclass() {
+               $title = $this->getTalkPage();
+               $class = $title->exists() ? '' : 'new';
+               return cbt_value( $class, 'dynamic' );
+       }       
+
+       function ca_variant( $code, $name, $index, $template ) {
+               global $wgContLang;
+               $selected = ($code == $wgContLang->getPreferredVariant());
+               $action = $this->getAction();
+               $actstr = '';
+               if( $action )
+                       $actstr = 'action=' . $action . '&';
+               $s = strtr( $template, array( 
+                       '$id' => htmlspecialchars( 'varlang-' . $index ),
+                       '$class' => $selected ? 'class="selected"' : '',
+                       '$text' => $name,
+                       '$href' => htmlspecialchars( $this->mTitle->getLocalUrl( $actstr . 'variant=' . $code ) )
+               ));
+               return cbt_value( $s, 'dynamic' );
+       }
+
+       function is_watching() {
+               return cbt_value( (string)$this->mTitle->userIsWatching(), array( 'dynamic' ) );
+       }
+
+       
+       function personal_urls( $itemTemplate ) {
+               global $wgShowIPinHeader, $wgContLang;
+
+               # Split this function up into many small functions, to obtain the
+               # best specificity in the dependencies of each one. The template below 
+               # has no dependencies, so its generation, and any static subfunctions,
+               # can be optimised away.
+               $etpl = cbt_escape( $itemTemplate );
+               $s = "
+                       {userpage {{$etpl}}}
+                       {mytalk {{$etpl}}}
+                       {preferences {{$etpl}}}
+                       {watchlist {{$etpl}}}
+                       {mycontris {{$etpl}}}
+                       {logout {{$etpl}}}
+               ";
+
+               if ( $wgShowIPinHeader ) {
+                       $s .= "
+                               {anonuserpage {{$etpl}}}
+                               {anontalk {{$etpl}}}
+                               {anonlogin {{$etpl}}}
+                       ";
+               } else {
+                       $s .= "{login {{$etpl}}}\n";
+               }
+               // No dependencies
+               return cbt_value( $s, array(), true /*this is a template*/ );
+       }
+
+       function userpage( $itemTemplate ) {
+               global $wgUser;
+               if ( $this->isLoggedIn() ) {
+                       $userPage = $this->getUserPageTitle();
+                       $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, 'user' );
+       }
+       
+       function mytalk( $itemTemplate ) {
+               global $wgUser;
+               if ( $this->isLoggedIn() ) {
+                       $userPage = $this->getUserPageTitle();
+                       $talkPage = $userPage->getTalkPage();
+                       $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('mytalk') );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, 'user' );
+       }
+       
+       function preferences( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'preferences', 
+                               'Preferences', wfMsg( 'preferences' ) );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, array( 'loggedin', 'lang' ) );
+       }
+       
+       function watchlist( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'watchlist', 
+                               'Watchlist', wfMsg( 'watchlist' ) );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, array( 'loggedin', 'lang' ) );
+       }
+       
+       function mycontris( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       global $wgUser;
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'mycontris', 
+                               "Contributions/" . $wgUser->getTitleKey(), wfMsg('mycontris') );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, 'user' );
+       }
+       
+       function logout( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'logout', 
+                               'Userlogout', wfMsg( 'userlogout' ), 
+                                       $this->mTitle->getNamespace() === NS_SPECIAL && $this->mTitle->getText() === 'Preferences' 
+                                       ? '' : "returnto=" . $this->mTitle->getPrefixedURL() );
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, 'loggedin dynamic' );
+       }
+       
+       function anonuserpage( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = '';
+               } else {
+                       global $wgUser;
+                       $userPage = $this->getUserPageTitle();
+                       $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() );
+               }
+               return cbt_value( $s, '!loggedin dynamic' );
+       }
+       
+       function anontalk( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = '';
+               } else {
+                       $userPage = $this->getUserPageTitle();
+                       $talkPage = $userPage->getTalkPage();
+                       $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('anontalk') );
+               }
+               return cbt_value( $s, '!loggedin dynamic' );
+       }
+       
+       function anonlogin( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = '';
+               } else {
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'anonlogin', 'Userlogin', 
+                               wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) );
+               }
+               return cbt_value( $s, '!loggedin dynamic' );
+       }
+       
+       function login( $itemTemplate ) {
+               if ( $this->isLoggedIn() ) {
+                       $s = '';
+               } else {
+                       $s = $this->makeSpecialTemplateLink( $itemTemplate, 'login', 'Userlogin', 
+                               wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) );
+               }
+               return cbt_value( $s, '!loggedin dynamic' );
+       }
+       
+       function logopath() { return $GLOBALS['wgLogo']; }
+       function mainpage() { return self::makeMainPageUrl(); }
+       
+       function sidebar( $startSection, $endSection, $innerTpl ) {
+               $s = '';
+               $lines = explode( "\n", wfMsgForContent( 'sidebar' ) );
+               $firstSection = true;
+               foreach ($lines as $line) {
+                       if (strpos($line, '*') !== 0)
+                               continue;
+                       if (strpos($line, '**') !== 0) {
+                               $bar = trim($line, '* ');
+                               $name = wfMsg( $bar ); 
+                               if (wfEmptyMsg($bar, $name)) {
+                                       $name = $bar;
+                               }
+                               if ( $firstSection ) {
+                                       $firstSection = false;
+                               } else {
+                                       $s .= $endSection;
+                               }
+                               $s .= strtr( $startSection,
+                                       array( 
+                                               '$bar' => htmlspecialchars( $bar ),
+                                               '$barname' => $name
+                                       ) );
+                       } else {
+                               if (strpos($line, '|') !== false) { // sanity check
+                                       $line = explode( '|' , trim($line, '* '), 2 );
+                                       $link = wfMsgForContent( $line[0] );
+                                       if ($link == '-')
+                                               continue;
+                                       if (wfEmptyMsg($line[1], $text = wfMsg($line[1])))
+                                               $text = $line[1];
+                                       if (wfEmptyMsg($line[0], $link))
+                                               $link = $line[0];
+                                       $href = self::makeInternalOrExternalUrl( $link );
+                                       
+                                       $s .= strtr( $innerTpl,
+                                               array(
+                                                       '$text' => htmlspecialchars( $text ),
+                                                       '$href' => htmlspecialchars( $href ),
+                                                       '$id' => htmlspecialchars( 'n-' . strtr($line[1], ' ', '-') ),
+                                                       '$classactive' => ''
+                                               ) );
+                               } else { continue; }
+                       }
+               }
+               if ( !$firstSection ) {
+                       $s .= $endSection;
+               }
+
+               // Depends on user language only
+               return cbt_value( $s, 'lang' );
+       }
+       
+       function searchaction() {
+               // Static link
+               return $this->getSearchLink();
+       }
+       
+       function search() {
+               global $wgRequest;
+               return cbt_value( trim( $this->getSearch() ), 'special dynamic' );
+       }
+       
+       function notspecialpage() {
+               return cbt_value( $this->mTitle->getNamespace() != NS_SPECIAL, 'special' );
+       }
+       
+       function nav_whatlinkshere() {
+               return cbt_value( $this->makeSpecialParamUrl('Whatlinkshere' ), array(), true );
+       }
+
+       function article_exists() {
+               return cbt_value( (string)($this->mTitle->getArticleId() !== 0), 'title' );
+       }
+       
+       function nav_recentchangeslinked() {
+               return cbt_value( $this->makeSpecialParamUrl('Recentchangeslinked' ), array(), true );
+       }
+       
+       function feeds( $itemTemplate = '' ) {
+               if ( !$this->mOut->isSyndicated() ) {
+                       $feeds = '';
+               } elseif ( $itemTemplate == '' ) {
+                       // boolean only required
+                       $feeds = 'true';
+               } else {
+                       $feeds = '';
+                       global $wgFeedClasses, $wgRequest;
+                       foreach( $wgFeedClasses as $format => $class ) {
+                               $feeds .= strtr( $itemTemplate,
+                                       array( 
+                                               '$key' => htmlspecialchars( $format ),
+                                               '$text' => $format,
+                                               '$href' => $wgRequest->appendQuery( "feed=$format" )
+                                       ) );
+                       }
+               }
+               return cbt_value( $feeds, 'special dynamic' );
+       }
+
+       function is_userpage() {
+               list( $id, $ip ) = $this->getUserPageIdIp();
+               return cbt_value( (string)($id || $ip), 'title' );
+       }
+
+       function is_ns_mediawiki() {
+               return cbt_value( (string)$this->mTitle->getNamespace() == NS_MEDIAWIKI, 'title' );
+       }
+
+       function is_loggedin() {
+               global $wgUser;
+               return cbt_value( (string)($wgUser->isLoggedIn()), 'loggedin' );
+       }
+
+       function nav_contributions() {
+               $url = $this->makeSpecialParamUrl( 'Contributions', '', '{title_userurl}' );
+               return cbt_value( $url, array(), true );
+       }
+
+       function is_allowed( $right ) {
+               global $wgUser;
+               return cbt_value( (string)$wgUser->isAllowed( $right ), 'user' );
+       }
+       
+       function nav_blockip() {
+               $url = $this->makeSpecialParamUrl( 'Blockip', '', '{title_userurl}' );
+               return cbt_value( $url, array(), true );
+       }
+       
+       function nav_emailuser() {
+               global $wgEnableEmail, $wgEnableUserEmail, $wgUser;
+               if ( !$wgEnableEmail || !$wgEnableUserEmail ) return '';
+               
+               $url = $this->makeSpecialParamUrl( 'Emailuser', '', '{title_userurl}' );
+               return cbt_value( $url, array(), true );
+       }
+       
+       function nav_upload() {
+               global $wgEnableUploads, $wgUploadNavigationUrl;
+               if ( !$wgEnableUploads ) { 
+                       return '';
+               } elseif ( $wgUploadNavigationUrl ) {
+                       return $wgUploadNavigationUrl;
+               } else {
+                       return self::makeSpecialUrl('Upload');
+               }
+       }
+       
+       function nav_specialpages() {
+               return self::makeSpecialUrl('Specialpages');
+       }
+       
+       function nav_print() {
+               global $wgRequest, $wgArticle;
+               $action = $this->getAction();
+               $url = '';
+               if( $this->mTitle->getNamespace() !== NS_SPECIAL 
+                               && ($action == '' || $action == 'view' || $action == 'purge' ) ) 
+               {
+                       $revid = $wgArticle->getLatest();
+                       if ( $revid != 0 ) {
+                               $url = $wgRequest->appendQuery( 'printable=yes' );
+                       }
+               }
+               return cbt_value( $url, array( 'nonview dynamic', 'title' ) );
+       }
+       
+       function nav_permalink() {
+               $url = (string)$this->getPermalink();
+               return cbt_value( $url, 'dynamic' );
+       }
+
+       function nav_trackbacklink() {
+               global $wgUseTrackbacks;
+               if ( !$wgUseTrackbacks ) return '';
+
+               return cbt_value( $this->mTitle->trackbackURL(), 'title' );
+       }
+       
+       function is_permalink() {
+               return cbt_value( (string)($this->getPermalink() === false), 'nonview dynamic' );
+       }
+       
+       function toolboxend() {
+               // This is where the MonoBookTemplateToolboxEnd hook went in the old skin
+               return '';
+       }
+       
+       function language_urls( $outer, $inner ) {
+               global $wgHideInterlanguageLinks, $wgOut, $wgContLang;
+               if ( $wgHideInterlanguageLinks ) return '';
+
+               $links = $wgOut->getLanguageLinks();
+               $s = '';
+               if ( count( $links ) ) {
+                       foreach( $links as $l ) {
+                               $tmp = explode( ':', $l, 2 );
+                               $nt = Title::newFromText( $l );
+                               $s .= strtr( $inner,
+                                       array(
+                                               '$class' => htmlspecialchars( 'interwiki-' . $tmp[0] ),
+                                               '$href' => htmlspecialchars( $nt->getFullURL() ),
+                                               '$text' => ($wgContLang->getLanguageName( $nt->getInterwiki() ) != ''?
+                                                       $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ),
+                                       )
+                               );
+                       }
+                       $s = str_replace( '$body', $s, $outer );
+               }
+               return cbt_value( $s, 'dynamic' );
+       }
+       
+       function poweredbyico() { return $this->getPoweredBy(); }
+       function copyrightico() { return $this->getCopyrightIcon(); }
+
+       function lastmod() { 
+               global $wgMaxCredits;
+               if ( $wgMaxCredits ) return '';
+
+               if ( !isset( $this->mLastmod ) ) {
+                       if ( $this->isCurrentArticleView() ) {
+                               $this->mLastmod = $this->lastModified(); 
+                       } else {
+                               $this->mLastmod = '';
+                       }
+               }
+               return cbt_value( $this->mLastmod, 'dynamic' );
+       }
+       
+       function viewcount() {
+               global $wgDisableCounters;
+               if ( $wgDisableCounters ) return '';
+               
+               global $wgLang, $wgArticle;
+               if ( is_object( $wgArticle ) ) {
+                       $viewcount = $wgLang->formatNum( $wgArticle->getCount() );
+                       if ( $viewcount ) {
+                               $viewcount = wfMsg( "viewcount", $viewcount );
+                       } else {
+                               $viewcount = '';
+                       }
+               } else {
+                       $viewcount = '';
+               }
+               return cbt_value( $viewcount, 'dynamic' );
+       }
+       
+       function numberofwatchingusers() {
+               global $wgPageShowWatchingUsers;
+               if ( !$wgPageShowWatchingUsers ) return '';
+
+               $dbr = wfGetDB( DB_SLAVE );
+               extract( $dbr->tableNames( 'watchlist' ) );
+               $sql = "SELECT COUNT(*) AS n FROM $watchlist
+                       WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBkey()) .
+                       "' AND  wl_namespace=" . $this->mTitle->getNamespace() ;
+               $res = $dbr->query( $sql, 'SkinTemplate::outputPage');
+               $row = $dbr->fetchObject( $res );
+               $num = $row->n;
+               if ($num > 0) {
+                       $s = wfMsg('number_of_watching_users_pageview', $num);
+               } else {
+                       $s = '';
+               }
+               return cbt_value( $s, 'dynamic' );
+       }
+       
+       function credits() {
+               global $wgMaxCredits;
+               if ( !$wgMaxCredits ) return '';
+               
+               if ( $this->isCurrentArticleView() ) {
+                       require_once("Credits.php");
+                       global $wgArticle, $wgShowCreditsIfMax;
+                       $credits = getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax);
+               } else {
+                       $credits = '';
+               }
+               return cbt_value( $credits, 'view dynamic' );
+       }
+       
+       function normalcopyright() {
+               return $this->getCopyright( 'normal' );
+       }
+
+       function historycopyright() {
+               return $this->getCopyright( 'history' );
+       }
+
+       function is_currentview() {
+               global $wgRequest;
+               return cbt_value( (string)$this->isCurrentArticleView(), 'view' );
+       }
+
+       function usehistorycopyright() {
+               global $wgRequest;
+               if ( wfMsgForContent( 'history_copyright' ) == '-' ) return '';
+               
+               $oldid = $this->getOldId();
+               $diff = $this->getDiff();
+               $use = (string)(!is_null( $oldid ) && is_null( $diff ));
+               return cbt_value( $use, 'nonview dynamic' );
+       }
+       
+       function privacy() {
+               return cbt_value( $this->privacyLink(), 'lang' );
+       }
+       function about() {
+               return cbt_value( $this->aboutLink(), 'lang' );
+       }
+       function disclaimer() {
+               return cbt_value( $this->disclaimerLink(), 'lang' );
+       }
+       function tagline() { 
+               # A reference to this tag existed in the old MonoBook.php, but the
+               # template data wasn't set anywhere
+               return ''; 
+       }
+       function reporttime() {
+               return cbt_value( $this->mOut->reportTime(), 'dynamic' );
+       }
+       
+       function msg( $name ) {
+               return cbt_value( wfMsg( $name ), 'lang' );
+       }
+       
+       function fallbackmsg( $name, $fallback ) {
+               $text = wfMsg( $name );
+               if ( wfEmptyMsg( $name, $text ) ) {
+                       $text = $fallback;
+               }
+               return cbt_value( $text,  'lang' );
+       }
+
+       /******************************************************
+        * Utility functions                                  *
+        ******************************************************/
+
+       /** Return true if this request is a valid, secure CSS preview */
+       function isCssPreview() {
+               if ( !isset( $this->mCssPreview ) ) {
+                       global $wgRequest, $wgAllowUserCss, $wgUser;
+                       $this->mCssPreview = 
+                               $wgAllowUserCss &&
+                               $wgUser->isLoggedIn() &&
+                               $this->mTitle->isCssSubpage() && 
+                               $this->userCanPreview( $this->getAction() );
+               }
+               return $this->mCssPreview;
+       }
+
+       /** Return true if this request is a valid, secure JS preview */
+       function isJsPreview() {
+               if ( !isset( $this->mJsPreview ) ) {
+                       global $wgRequest, $wgAllowUserJs, $wgUser;
+                       $this->mJsPreview = 
+                               $wgAllowUserJs &&
+                               $wgUser->isLoggedIn() &&
+                               $this->mTitle->isJsSubpage() && 
+                               $this->userCanPreview( $this->getAction() );
+               }
+               return $this->mJsPreview;
+       }
+
+       /** Get the title of the $wgUser's user page */
+       function getUserPageTitle() {
+               if ( !isset( $this->mUserPageTitle ) ) {
+                       global $wgUser;
+                       $this->mUserPageTitle = $wgUser->getUserPage();
+               }
+               return $this->mUserPageTitle;
+       }
+
+       /** Get the text of the user page title */
+       function getUserPageText() {
+               if ( !isset( $this->mUserPageText ) ) {
+                       $userPage = $this->getUserPageTitle();
+                       $this->mUserPageText = $userPage->getPrefixedText();
+               }
+               return $this->mUserPageText;
+       }
+
+       /** Make an HTML element for a stylesheet link */
+       function makeStylesheetLink( $url ) {
+               return '<link rel="stylesheet" type="text/css" href="' . htmlspecialchars( $url ) . "\"/>";
+       }
+
+       /** Make an XHTML element for inline CSS */
+       function makeStylesheetCdata( $style ) {
+               return "<style type=\"text/css\"> /*<![CDATA[*/ {$style} /*]]>*/ </style>";
+       }
+
+       /** Get the edit URL for this page */
+       function getEditUrl() {
+               if ( !isset( $this->mEditUrl ) ) {
+                       $this->mEditUrl = $this->mTitle->getLocalUrl( $this->editUrlOptions() );
+               }
+               return $this->mEditUrl;
+       }
+
+       /** Get the prefixed DB key for this page */
+       function getThisPDBK() {
+               if ( !isset( $this->mThisPDBK ) ) {
+                       $this->mThisPDBK = $this->mTitle->getPrefixedDbKey();
+               }
+               return $this->mThisPDBK;
+       }
+
+       function getThisTitleUrlForm() {
+               if ( !isset( $this->mThisTitleUrlForm ) ) {
+                       $this->mThisTitleUrlForm = $this->mTitle->getPrefixedURL();
+               }
+               return $this->mThisTitleUrlForm;
+       }
+
+       /** 
+        * If the current page is a user page, get the user's ID and IP. Otherwise return array(0,false)
+        */
+       function getUserPageIdIp() {
+               if ( !isset( $this->mUserPageId ) ) {
+                       if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) {
+                               $this->mUserPageId = User::idFromName($this->mTitle->getText());
+                               $this->mUserPageIp = User::isIP($this->mTitle->getText());
+                       } else {
+                               $this->mUserPageId = 0;
+                               $this->mUserPageIp = false;
+                       }
+               }
+               return array( $this->mUserPageId, $this->mUserPageIp );
+       }
+       
+       /**
+        * Returns a permalink URL, or false if the current page is already a 
+        * permalink, or blank if a permalink shouldn't be displayed
+        */
+       function getPermalink() {
+               if ( !isset( $this->mPermalink ) ) {
+                       global $wgRequest, $wgArticle;
+                       $action = $this->getAction();
+                       $oldid = $this->getOldId();
+                       $url = '';
+                       if( $this->mTitle->getNamespace() !== NS_SPECIAL 
+                                       && $this->mTitle->getArticleId() != 0
+                                       && ($action == '' || $action == 'view' || $action == 'purge' ) ) 
+                       {
+                               if ( !$oldid ) {
+                                       $revid = $wgArticle->getLatest();                       
+                                       $url = $this->mTitle->getLocalURL( "oldid=$revid" );
+                               } else {
+                                       $url = false;
+                               }
+                       } else {
+                               $url = '';
+                       }
+               }
+               return $url;
+       }
+
+       /**
+        * Returns true if the current page is an article, not a special page,
+        * and we are viewing a revision, not a diff
+        */
+       function isArticleView() {
+               global $wgOut, $wgArticle, $wgRequest;
+               if ( !isset( $this->mIsArticleView ) ) {
+                       $oldid = $this->getOldId();
+                       $diff = $this->getDiff();
+                       $this->mIsArticleView = $wgOut->isArticle() and 
+                               (!is_null( $oldid ) or is_null( $diff )) and 0 != $wgArticle->getID();
+               }
+               return $this->mIsArticleView;
+       }
+
+       function isCurrentArticleView() {
+               if ( !isset( $this->mIsCurrentArticleView ) ) {
+                       global $wgOut, $wgArticle, $wgRequest;
+                       $oldid = $this->getOldId();
+                       $this->mIsCurrentArticleView = $wgOut->isArticle() && is_null( $oldid ) && 0 != $wgArticle->getID();
+               }
+               return $this->mIsCurrentArticleView;
+       }
+
+
+       /**
+        * Return true if the current page is editable; if edit section on right 
+        * click should be enabled.
+        */
+       function isEditable() {
+               global $wgRequest;
+               $action = $this->getAction();
+               return ($this->mTitle->getNamespace() != NS_SPECIAL and !($action == 'edit' or $action == 'submit'));
+       }
+
+       /** Return true if the user is logged in */
+       function isLoggedIn() {
+               global $wgUser;
+               return $wgUser->isLoggedIn();
+       }
+
+       /** Get the local URL of the current page */
+       function getPageUrl() {
+               if ( !isset( $this->mPageUrl ) ) {
+                       $this->mPageUrl = $this->mTitle->getLocalURL();
+               } 
+               return $this->mPageUrl;
+       }
+
+       /** Make a link to a title using a template */
+       function makeTemplateLink( $template, $key, $title, $text ) {
+               $url = $title->getLocalUrl();
+               return strtr( $template, 
+                       array( 
+                               '$key' => $key,
+                               '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '',
+                               '$class' => $title->getArticleID() == 0 ? 'class="new"' : '', 
+                               '$href' => htmlspecialchars( $url ),
+                               '$text' => $text
+                        ) );
+       }
+
+       /** Make a link to a URL using a template */
+       function makeTemplateLinkUrl( $template, $key, $url, $text ) {
+               return strtr( $template, 
+                       array( 
+                               '$key' => $key,
+                               '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '',
+                               '$class' => '', 
+                               '$href' => htmlspecialchars( $url ),
+                               '$text' => $text
+                        ) );
+       }
+
+       /** Make a link to a special page using a template */
+       function makeSpecialTemplateLink( $template, $key, $specialName, $text, $query = '' ) {
+               $url = self::makeSpecialUrl( $specialName, $query );
+               // Ignore the query when comparing
+               $active = ($this->mTitle->getNamespace() == NS_SPECIAL && $this->mTitle->getDBkey() == $specialName);
+               return strtr( $template, 
+                       array( 
+                               '$key' => $key,
+                               '$classactive' => $active ? 'class="active"' : '',
+                               '$class' => '', 
+                               '$href' => htmlspecialchars( $url ),
+                               '$text' => $text
+                        ) );
+       }
+
+       function loadRequestValues() {
+               global $wgRequest;
+               $this->mAction = $wgRequest->getText( 'action' );
+               $this->mOldId = $wgRequest->getVal( 'oldid' );
+               $this->mDiff = $wgRequest->getVal( 'diff' );
+               $this->mSection = $wgRequest->getVal( 'section' );
+               $this->mSearch = $wgRequest->getVal( 'search' );
+               $this->mRequestValuesLoaded = true;
+       }
+               
+
+
+       /** Get the action parameter of the request */
+       function getAction() {
+               if ( !isset( $this->mRequestValuesLoaded ) ) {
+                       $this->loadRequestValues();
+               }
+               return $this->mAction;
+       }
+
+       /** Get the oldid parameter */
+       function getOldId() {
+               if ( !isset( $this->mRequestValuesLoaded ) ) {
+                       $this->loadRequestValues();
+               }
+               return $this->mOldId;
+       }
+
+       /** Get the diff parameter */
+       function getDiff() {
+               if ( !isset( $this->mRequestValuesLoaded ) ) {
+                       $this->loadRequestValues();
+               }
+               return $this->mDiff;
+       }
+
+       function getSection() {
+               if ( !isset( $this->mRequestValuesLoaded ) ) {
+                       $this->loadRequestValues();
+               }
+               return $this->mSection;
+       }
+
+       function getSearch() {
+               if ( !isset( $this->mRequestValuesLoaded ) ) {
+                       $this->loadRequestValues();
+               }
+               return $this->mSearch;
+       }
+
+       /** Make a special page URL of the form [[Special:Somepage/{title_urlform}]] */
+       function makeSpecialParamUrl( $name, $query = '', $param = '{title_urlform}' ) {
+               // Abuse makeTitle's lax validity checking to slip a control character into the URL
+               $title = Title::makeTitle( NS_SPECIAL, "$name/\x1a" );
+               $url = cbt_escape( $title->getLocalURL( $query ) );
+               // Now replace it with the parameter
+               return str_replace( '%1A', $param, $url );
+       }
+
+       function getSubjectPage() {
+               if ( !isset( $this->mSubjectPage ) ) {
+                       $this->mSubjectPage = $this->mTitle->getSubjectPage();
+               }
+               return $this->mSubjectPage;
+       }
+
+       function getTalkPage() {
+               if ( !isset( $this->mTalkPage ) ) {
+                       $this->mTalkPage = $this->mTitle->getTalkPage();
+               }
+               return $this->mTalkPage;
+       }
+}
+
diff --git a/skins/modern/audio.png b/skins/modern/audio.png
new file mode 100644 (file)
index 0000000..1c56bdc
Binary files /dev/null and b/skins/modern/audio.png differ
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/document.png b/skins/modern/document.png
new file mode 100644 (file)
index 0000000..b48138e
Binary files /dev/null and b/skins/modern/document.png 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..d9537c1
--- /dev/null
@@ -0,0 +1,1098 @@
+body {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       /*font-size: 10pt;*/
+       font-size: x-small;
+
+
+       font-family: sans-serif;
+       color: black;
+       background-color: #f0f0f0;
+}
+
+#mw_main,
+#p-personal,
+#mw_header,
+.os-suggest {
+       font-size: 130%;
+}
+
+#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_contentwrapper {
+       width: 100%;
+       margin: 0 0 0 -15em;
+       float: right;
+}
+
+#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: 0 1em 1em 1em;
+}
+
+#mw_portlets {
+       width: 14em;
+
+       border-right: solid 1px #bbbbbb;
+       background-color: #f0f0f0;
+}
+
+#mw_main {
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+       margin-top: 3.5em;
+}
+
+div.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: 0em 0 0.5em 0;
+}
+
+textarea {
+       width: 100%;
+       padding: .1em;
+}
+
+#searchBody {
+       text-align: center;
+}
+
+#searchInput {
+       display: block;
+       margin-left: auto;
+       margin-right: auto;
+}
+
+.portlet h5 {
+       padding: 0.1em 0 0.3em 1em;
+       margin: 0 0 0 0;
+       background-color: #dddddd;
+       font-weight: bold;
+       border-bottom: solid 1px #3c78b5;
+       height: 1.1em;
+}
+
+.portlet ul {
+       margin: 0 0 0 1.5em;
+       padding: 0 0 0 0;
+}
+
+#mw_portlets .portlet ul {
+       line-height: 1.4em;
+}
+
+ul {
+       list-style-image: url(bullet.gif);
+}
+
+#p-cactions {
+       height: 1.5em;
+       padding: 0 0 0 0;
+       margin: 0 0 0 14em;
+}
+
+#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 1em 1em;
+       clear:both;
+       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: 1em 0 1em 0;
+}
+
+hr {
+       height: 1px;
+       color: #aaa;
+       background-color: #aaa;
+       border: 0;
+       margin: .2em 0 .2em 0;
+}
+
+#contentSub {
+       color: #888;
+       font-size: small;
+       padding-left: 2em;
+}
+
+#mw_portlets form {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+a {
+        text-decoration: none;
+        color: #003366;
+        background: none;
+}
+a:visited {
+        color: #5a3696;
+}
+a:active {
+        color: #faa700;
+}
+a:hover {
+        text-decoration: underline;
+}
+a.stub {
+        color: #772233;
+}
+a.new {
+        color: #ba0000;
+}
+a.new:visited {
+        color: #a55858;
+}
+
+span.editsection {
+       font-size: small;
+}
+
+h1, h2 {
+       border-bottom: solid 1px #003366;
+}
+
+#preftoc {
+       width: 100%;
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       height: 1.5em;
+       clear: right;
+}
+
+#preftoc 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;
+}
+
+#preferences {
+       margin: 0 0 0 0;
+       padding: 0em 1em 1em 1em;
+       border: solid 1px #bbbbbb;
+       clear: left; /* Multi-line toc should not push data to horizontally */
+}
+
+#preferences fieldset {
+       margin-top: 0;
+       border: none;
+}
+
+#preferences h2 {
+}
+
+.mainLegend {
+       display: none;
+}
+
+.prefsectiontip {
+       font-size: x-small;
+       padding: .2em 2em;
+       color: #666;
+}
+
+.prefsection legend {
+       font-weight: bold;
+}
+
+#preftoc li.selected {
+       background-color: #bbbbbb;
+}
+
+#preftoc li a,
+#preftoc li a:hover,
+#preftoc li a:visited {
+       text-decoration: underline;
+       color: #003366;
+}
+
+#preftoc li.selected a,
+#preftoc li.selected a:hover,
+#preftoc li.selected a:visited {
+       text-decoration: none;
+       color: white;
+}
+
+#mw_content a.external,
+#mw_content a[href ^="gopher://"] {
+        background: url(external.png) center right no-repeat;
+        padding-right: 13px;
+}
+#mw_content a[href ^="https://"],
+.link-https {
+        background: url(lock_icon.gif) center right no-repeat;
+        padding-right: 16px;
+}
+#mw_content a[href ^="mailto:"],
+.link-mailto {
+        background: url(mail_icon.gif) center right no-repeat;
+        padding-right: 18px;
+}
+#mw_content a[href ^="news://"] {
+        background: url(news_icon.png) center right no-repeat;
+        padding-right: 18px;
+}
+#mw_content a[href ^="ftp://"],
+.link-ftp {
+        background: url(file_icon.gif) center right no-repeat;
+        padding-right: 18px;
+}
+#mw_content a[href ^="irc://"],
+#mw_content a.extiw[href ^="irc://"],
+.link-irc {
+        background: url(discussionitem_icon.gif) center right no-repeat;
+        padding-right: 18px;
+}
+
+#mw_content a.external[href $=".ogg"], #mw_content a.external[href $=".OGG"],
+#mw_content a.external[href $=".mid"], #mw_content a.external[href $=".MID"],
+#mw_content a.external[href $=".midi"], #mw_content a.external[href $=".MIDI"],
+#mw_content a.external[href $=".mp3"], #mw_content a.external[href $=".MP3"],
+#mw_content a.external[href $=".wav"], #mw_content a.external[href $=".WAV"],
+#mw_content a.external[href $=".wma"], #mw_content a.external[href $=".WMA"],
+.link-audio {
+        background: url("audio.png") center right no-repeat;
+        padding-right: 13px;
+}
+#mw_content a.external[href $=".ogm"], #mw_content a.external[href $=".OGM"],
+#mw_content a.external[href $=".avi"], #mw_content a.external[href $=".AVI"],
+#mw_content a.external[href $=".mpeg"], #mw_content a.external[href $=".MPEG"],
+#mw_content a.external[href $=".mpg"], #mw_content a.external[href $=".MPG"],
+.link-video {
+        background: url("video.png") center right no-repeat;
+        padding-right: 13px;
+}
+#mw_content a.external[href $=".pdf"], #mw_content a.external[href $=".PDF"],
+#mw_content a.external[href *=".pdf#"], #mw_content a.external[href *=".PDF#"],
+#mw_content a.external[href *=".pdf?"], #mw_content a.external[href *=".PDF?"],
+.link-document {
+        background: url("document.png") center right no-repeat;
+        padding-right: 12px;
+}
+
+/* images */
+div.floatright, table.floatright {
+       clear: right;
+       float: right;
+       position: relative;
+       margin: 0 0 .5em .5em;
+       border: 0;
+/*
+       border: .5em solid white;
+       border-width: .5em 0 .8em 1.4em;
+*/
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+       float: left;
+       clear: left;
+       position: relative;
+       margin: 0 .5em .5em 0;
+       border: 0;
+/*
+       margin: .3em .5em .5em 0;
+       border: .5em solid white;
+       border-width: .5em 1.4em .8em 0;
+*/
+}
+div.floatleft p { font-style: italic; }
+/* thumbnails */
+div.thumb {
+       margin-bottom: .5em;
+       border-style: solid;
+       border-color: white;
+       width: auto;
+}
+div.thumbinner {
+       border: 1px solid #ccc;
+       padding: 3px !important;
+       background-color: #f9f9f9;
+       font-size: 94%;
+       text-align: center;
+       overflow: hidden;
+}
+html .thumbimage {
+       border: 1px solid #ccc;
+}
+html .thumbcaption {
+       border: none;
+       text-align: left;
+       line-height: 1.4em;
+       padding: 3px !important;
+       font-size: 94%;
+}
+div.magnify {
+       float: right;
+       border: none !important;
+       background: none !important;
+}
+div.magnify a, div.magnify img {
+       display: block;
+       border: none !important;
+       background: none !important;
+}
+div.tright {
+       clear: right;
+       float: right;
+       border-width: .5em 0 .8em 1.4em;
+}
+div.tleft {
+       float: left;
+       clear: left;
+       margin-right: .5em;
+       border-width: .5em 1.4em .8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+.hiddenStructure {
+       display: none;
+}
+
+#mw_content .plainlinks a {
+        background: none !important;
+        padding: 0 !important;
+}
+
+.mw-warning {
+       border: 1px solid #aaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       font-size: 95%;
+}
+
+#toc,
+.toc {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+       border-spacing: 0;
+       background-color: #f0f0f0;
+       border: solid 1px #bbbbbb;
+}
+
+#toc tr, #toc td {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+#toctitle {
+       border-bottom: solid 1px #3c78b5;
+       background-color: #dddddd;
+       margin: 0 0 0 0;
+}
+
+#toc h2,
+.toc h2 {
+       display: inline;
+       border: none;
+       padding: 0;
+       font-size: 100%;
+       font-weight: bold;
+}
+#toc #toctitle,
+.toc #toctitle,
+#toc .toctitle,
+.toc .toctitle {
+       text-align: center;
+}
+
+#toc ul,
+.toc ul {
+       list-style-type: none;
+       list-style-image: none;
+       margin: 0 1em 0 1em;
+       padding-left: 0;
+       text-align: left;
+}
+
+#toc ul ul,
+.toc ul ul {
+       margin: 0 0 0 2em;
+}
+
+#toc .toctoggle,
+.toc .toctoggle {
+       font-size: 94%;
+}
+
+.mw-warning {
+       margin-left: 50px;
+       margin-right: 50px;
+       text-align: center;
+}
+
+.catlinks {
+       border: solid 1px #bbbbbb;
+       background-color: #f0f0f0;
+       padding: 0.5em 0.5em 0.5em 0.5em;
+       margin: 0 0 0 0;
+}
+
+.catlinks {
+       margin: 0 0 0 0;
+       padding: 0 0 0 0;
+}
+
+#mw_header h1,
+#p-personal,
+#p-cactions {
+       overflow: hidden;
+}
+
+/* disable interwiki styling */
+#mw_content a.extiw,
+#mw_content a.extiw:active {
+       color: #36b;
+       background: none;
+       padding: 0;
+}
+#mw_content a.external {
+       color: #36b;
+}
+
+
+
+.redirectText {
+       font-size: 150%;
+       margin: 5px;
+}
+
+.printfooter {
+       display: none;
+}
+
+.not-patrolled {
+       background-color: #ffa;
+}
+div.patrollink {
+       font-size: 75%;
+       text-align: right;
+}
+span.newpage, span.minor, span.bot {
+       font-weight: bold;
+}
+span.unpatrolled {
+       font-weight: bold;
+       color: red;
+}
+
+.sharedUploadNotice {
+       font-style: italic;
+}
+
+span.updatedmarker {
+       color: black;
+       background-color: #0f0;
+}
+
+table.gallery {
+       border: 1px solid #ccc;
+       margin: 2px;
+       padding: 2px;
+       background-color: white;
+}
+
+table.gallery tr {
+       vertical-align: top;
+}
+
+table.gallery td {
+       vertical-align: top;
+       background-color: #f9f9f9;
+       border: solid 2px white;
+}
+/* Keep this temporarily so that cached pages will display right */
+table.gallery td.galleryheader {
+    text-align: center;
+       font-weight: bold;
+}
+table.gallery caption {
+       font-weight: bold;
+}
+
+div.gallerybox {
+       margin: 2px;
+}
+
+div.gallerybox div.thumb {
+       text-align: center;
+       border: 1px solid #ccc;
+       margin: 2px;
+}
+
+div.gallerytext {
+       overflow: hidden;
+       font-size: 94%;
+       padding: 2px 4px;
+}
+
+span.comment {
+       font-style: italic;
+}
+
+span.changedby {
+       font-size: 95%;
+}
+
+.previewnote {
+       text-indent: 3em;
+       color: #c00;
+       border-bottom: 1px solid #aaa;
+       padding-bottom: 1em;
+       margin-bottom: 1em;
+}
+
+.previewnote p {
+       margin: 0;
+       padding: 0;
+}
+
+.editExternally {
+       border: 1px solid gray;
+       background-color: #ffffff;
+       padding: 3px;
+       margin-top: 0.5em;
+       float: left;
+       font-size: small;
+       text-align: center;
+}
+.editExternallyHelp {
+       font-style: italic;
+       color: gray;
+}
+
+.toggle {
+       margin-left: 2em;
+       text-indent: -2em;
+}
+
+/* Classes for EXIF data display */
+table.mw_metadata {
+       font-size: 0.8em;
+       margin-left: 0.5em;
+       margin-bottom: 0.5em;
+       width: 300px;
+}
+
+table.mw_metadata caption {
+       font-weight: bold;
+}
+
+table.mw_metadata th {
+       font-weight: normal;
+}
+
+table.mw_metadata td {
+       padding: 0.1em;
+}
+
+table.mw_metadata {
+       border: none;
+       border-collapse: collapse;
+}
+
+table.mw_metadata td, table.mw_metadata th {
+       text-align: center;
+       border: 1px solid #aaaaaa;
+       padding-left: 0.1em;
+       padding-right: 0.1em;
+}
+
+table.mw_metadata th {
+       background-color: #f9f9f9;
+}
+
+table.mw_metadata td {
+       background-color: #fcfcfc;
+}
+
+table.collapsed tr.collapsable {
+       display: none;
+}
+
+
+/* filetoc */
+ul#filetoc {
+       text-align: center;
+       border: 1px solid #aaaaaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       font-size: 95%;
+       margin-bottom: 0.5em;
+       margin-left: 0;
+       margin-right: 0;
+}
+
+#filetoc li {
+       display: inline;
+       list-style-type: none;
+       padding-right: 2em;
+}
+
+input#wpSummary {
+       width: 80%;
+}
+
+/* @bug 1714 */
+input#wpSave, input#wpDiff {
+       margin-right: 0.33em;
+}
+
+#wpSave {
+       font-weight: bold;
+}
+
+/* Classes for article validation */
+
+table.revisionform_default {
+       border: 1px solid #000000;
+}
+
+table.revisionform_focus {
+       border: 1px solid #000000;
+       background-color:#00BBFF;
+}
+
+tr.revision_tr_default {
+       background-color:#EEEEEE;
+}
+
+tr.revision_tr_first {
+       background-color:#DDDDDD;
+}
+
+p.revision_saved {
+       color: green;
+       font-weight:bold;
+}
+
+#mw_trackbacks {
+       border: solid 1px #bbbbff;
+       background-color: #eeeeff;
+       padding: 0.2em;
+}
+
+
+/* Allmessages table */
+
+#allmessagestable th {
+       background-color: #b2b2ff;
+}
+
+#allmessagestable tr.orig {
+       background-color: #ffe2e2;
+}
+
+#allmessagestable tr.new {
+       background-color: #e2ffe2;
+}
+
+#allmessagestable tr.def {
+       background-color: #f0f0ff;
+}
+
+
+/* noarticletext */
+div.noarticletext {
+       border: 1px solid #ccc;
+       background: #fff;
+       padding: .2em 1em;
+       color: #000;
+}
+
+div#searchTargetContainer {
+       left:       10px;
+       top:        10px;
+       width:      90%;
+       background: white;
+}
+
+div#searchTarget {
+       padding:    3px;
+       margin:     5px;
+       background: #F0F0F0;
+       border:     solid 1px blue;
+}
+
+div#searchTarget ul li {
+       list-style: none;
+}
+
+div#searchTarget ul li:before {
+       color: orange;
+       content: "\00BB \0020";
+}
+
+div#searchTargetHide {
+       float:right;
+       border:solid 1px black;
+       background:gainsboro;
+       padding:2px;
+}
+
+div.multipageimagenavbox {
+   border: solid 1px silver;
+   padding: 4px;
+   margin: 1em;
+   background: #f0f0f0;
+}
+
+div.multipageimagenavbox div.thumb {
+   border: none;
+   margin-left: 2em;
+   margin-right: 2em;
+}
+
+div.multipageimagenavbox hr {
+   margin: 6px;
+}
+
+table.multipageimage td {
+   text-align: center;
+}
+
+/** Special:Version */
+
+table#sv-ext, table#sv-hooks, table#sv-software {
+       margin: 1em;
+       padding:0em;
+}
+
+#sv-ext td, #sv-hooks td, #sv-software td,
+#sv-ext th, #sv-hooks th, #sv-software th {
+       border: 1px solid #A0A0A0;
+       padding: 0 0.15em 0 0.15em;
+}
+#sv-ext th, #sv-hooks th, #sv-software th {
+       background-color: #F0F0F0;
+       color: black;
+       padding: 0 0.15em 0 0.15em;
+}
+tr.sv-space{
+       height: 0.8em;
+       border:none;
+}
+tr.sv-space td { display: none; }
+
+/*
+  Table pager (e.g. Special:Imagelist)
+  - remove underlines from the navigation link
+  - collapse borders
+  - set the borders to outsets (similar to Special:Allmessages)
+  - remove line wrapping for all td and th, set background color
+  - restore line wrapping for the last two table cells (description and size)
+*/
+.TablePager_nav a { text-decoration: none; }
+.TablePager { border-collapse: collapse; }
+.TablePager, .TablePager td, .TablePager th {
+       border: 1px solid #aaaaaa;
+       padding: 0 0.15em 0 0.15em;
+}
+.TablePager th { background-color: #eeeeff }
+.TablePager td { background-color: #ffffff }
+.TablePager tr:hover td { background-color: #eeeeff }
+
+.imagelist td, .imagelist th { white-space: nowrap }
+.imagelist .TablePager_col_links { background-color: #eeeeff }
+.imagelist .TablePager_col_img_description { white-space: normal }
+.imagelist th.TablePager_sort { background-color: #ccccff }
+
+.templatesUsed { margin-top: 1.5em; }
+
+.mw-summary-preview {
+       margin: 0.1em 0;
+}
+
+/* Friendlier slave lag warnings */
+div.mw-lag-warn-normal,
+div.mw-lag-warn-high {
+       padding: 3px;
+       text-align: center;
+       margin: 3px auto;
+}
+div.mw-lag-warn-normal {
+       border: 1px solid #FFCC66;
+       background-color: #FFFFCC;
+}
+div.mw-lag-warn-high {
+       font-weight: bold;
+       border: 2px solid #FF0033;
+       background-color: #FFCCCC;
+}
+
+.MediaTransformError {
+       background-color: #ccc;
+       padding: 0.1em;
+}
+.MediaTransformError td {
+       text-align: center;
+       vertical-align: middle;
+       font-size: 90%;
+}
+ul {
+       line-height: 1.5em;
+       list-style-type: square;
+       margin: .3em 0 0 1.5em;
+       padding: 0;
+       list-style-image: url(bullet.gif);
+}
+ol {
+       line-height: 1.5em;
+       margin: .3em 0 0 3.2em;
+       padding: 0;
+       list-style-image: none;
+}
+li {
+       margin-bottom: .1em;
+}
+dt {
+       font-weight: bold;
+       margin-bottom: .1em;
+}
+dl {
+       margin-top: .2em;
+       margin-bottom: .5em;
+}
+
+#p-cactions li.new a {
+       color: #cc2200;
+}
+
+span.subpages {
+       font-size: 80%;
+       display: block;
+}
+
+pre {
+       border: solid 1px #3c78b5;
+       padding: 0.4em;
+       background-color: #f0f0f0;
+}
+
+.usermessage {
+       background-color: #dadaff;
+}
+
+.mw-topboxes {
+       border-collapse: collapse;
+       margin: 0 -1em 1em -1em;
+       padding: 0 0 8px 0;
+       background: url(footer-grad.png) repeat-x bottom left;
+}
+
+.mw-topbox p {
+       padding: 0 0 0 0;
+       margin: 0 0 0 0;
+}
+
+.mw-topbox {
+        color: black;
+        font-weight: bold;
+       margin: 0 0 0 0;
+       padding: 0 1em 0 1em;
+       vertical-align: middle;
+       border-collapse: collapse;
+       border-bottom: solid 1px #bbbbbb;
+}
+
+#siteSub {
+       background-color: #dddddd;
+}
+
+/* emulate center */
+.center {
+     width:100%;
+     text-align:center;
+}
+*.center * {
+     margin-left:auto;
+     margin-right:auto;
+}
+
+/* table standards */
+.toccolours {
+    border:1px solid #bbbbbb;
+    background-color:#f0f0f0;
+    border-spacing:0pt;
+    margin:0pt;
+    padding:0pt;
+}
diff --git a/skins/modern/news_icon.png b/skins/modern/news_icon.png
new file mode 100644 (file)
index 0000000..dd1541d
Binary files /dev/null and b/skins/modern/news_icon.png differ
diff --git a/skins/modern/print.css b/skins/modern/print.css
new file mode 100644 (file)
index 0000000..33a36b2
--- /dev/null
@@ -0,0 +1,10 @@
+#mw_portlets,
+#p-cactions,
+#p-personal,
+#jump-to-nav,
+#footer,
+span.editsection,
+.noprint
+{
+       display: none;
+}
diff --git a/skins/modern/rtl.css b/skins/modern/rtl.css
new file mode 100644 (file)
index 0000000..d7aae76
--- /dev/null
@@ -0,0 +1,153 @@
+body {
+       direction: rtl;
+       unicode-bidi: embed;
+}
+
+.editsection {
+       float: left;
+       margin-right: 5px;
+       margin-left: 0; /* bug 9122: undo default LTR */
+}
+
+/* Fix alignment */
+.documentByLine,
+.portletDetails,
+.portletMore {
+       text-align: left;
+}
+
+div div.thumbcaption {
+       text-align: right;
+}
+
+div.magnify {
+       left: auto;
+       right: 0;
+}
+
+/* Fix margins for non-css2 browsers */
+/* top right bottom left */
+
+dd {
+       margin-left: 0;
+       margin-right: 1.6em;
+}
+.tocindent {
+       margin-left: 0;
+       margin-right: 2em;
+}
+div.tright, div.floatright, table.floatright {
+       clear: none;
+}
+div.tleft, div.floatleft, table.floatleft {
+       clear: left;
+}
+
+/* Fix link icons */
+.external {
+       padding: 0 !important;
+       background: none !important;
+}
+
+/* js pref toc */
+
+#preftoc {
+       margin-right: 1em;
+}
+
+.errorbox, .successbox, #preftoc li, .prefsection fieldset {
+       float: right;
+}
+
+.prefsection {
+       padding-right: 2em;
+}
+
+/* workaround for moz bug, displayed bullets on left side */
+
+#toc ul {
+       text-align: right;
+}
+
+#toc ul ul {
+       margin: 0 2em 0 0;
+}
+
+input#wpSave, input#wpDiff {
+       margin-right: 0;
+       margin-left: .33em;
+}
+
+#userlogin {
+       float: right;
+       margin: 0 0 1em 3em;
+}
+/* Convenience links to edit block, delete and protect reasons */
+p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
+p.mw-filedelete-editreasons, p.mw-delete-editreasons {
+       float: left;
+}
+
+.toggle {
+       margin-left: 0em;
+       margin-right: 2em;
+}
+table.filehistory th {
+       text-align: right;
+}
+
+#mw_contentwrapper {
+       margin: 0 -15em 0 0;
+       float: left;
+}
+
+#mw_content {
+       margin: 0 14em 0 0;
+       border-left: none;
+       border-right: solid 1px #bbbbbb;
+}
+
+.portlet ul {
+        margin: 0 1.5em 0 0;
+        padding: 0 0 0 0;
+}
+
+.portlet h5 {
+       padding: 0.1em 1em 0.3em 0;
+}
+
+#p-cactions li {
+       float: right;
+}
+
+#p-personal li {
+       float: right;
+}
+
+#p-cactions {
+       margin: 0 14em 0 0;
+}
+
+#mw_portlets {
+       border-right: none;
+       border-left: solid 1px #bbbbbb;
+}
+
+/**
+ * Lists:
+ * The following lines don't have a visible effect on non-Gecko browsers
+ * They fix a problem ith Gecko browsers rendering lists to the right of
+ * left-floated objects in an RTL layout.
+ */
+html > body div#mw_contentholder ul {
+       display: table;
+}
+html > body div#mw_contentholder ul li {
+       margin-right:10px;
+}
+html > body div.pBody ul li {
+       margin-right:4px;
+}
+html > body div#mw_contentholder ul#filetoc {
+       display: block;
+}
diff --git a/skins/modern/video.png b/skins/modern/video.png
new file mode 100644 (file)
index 0000000..38103da
Binary files /dev/null and b/skins/modern/video.png differ
diff --git a/skins/monobook/IE50Fixes.css b/skins/monobook/IE50Fixes.css
new file mode 100644 (file)
index 0000000..26c3dc9
--- /dev/null
@@ -0,0 +1,67 @@
+/*
+** IE5.0 Fix Stylesheet
+*/
+
+#column-content {
+       margin: 0 !important;
+       float: none;
+}
+#column-content #content { 
+       margin-top: 3em; 
+       height: 1%;
+}
+#column-one {
+       position: absolute;
+       overflow: visible;
+       top: 0;
+       left: 0;
+       z-index: 3;
+}
+#footer {
+       margin: 0 0 0 13.6em;
+}
+
+/* IE 5 & 5.5 interpret keyword sizes one off */
+body { font-size: xx-small; }
+/*
+** the edit tabs
+*/
+#p-cactions li {
+       float: left;
+       padding-top: 0;
+       padding-bottom: 0 !important;
+       height: 0.9em;
+}
+#p-cactions li a {
+       display: block;
+       padding-bottom: 0.045em;
+}
+#p-cactions li.selected a {
+       padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+       padding-bottom: 0.17em;
+}
+/* 5.0 doesn't like the background icon for external links and user */
+.link-external,
+.external {
+       background: none;
+       padding: 0;
+}
+#p-personal ul { float: right }
+#p-personal li { float: left }
+li#pt-userpage,
+li#pt-anonuserpage,
+li#pt-login,
+li#pt-logout {
+       background: none;
+       padding-left: none;
+}
+.visualClear {
+       width: 100%;
+       height: 0px;
+       padding:0;
+       margin: 0;
+}
+#firstHeading { margin-bottom: .3em; }
+/*div{ border:1px solid Red !important;}*/
diff --git a/skins/monobook/IE55Fixes.css b/skins/monobook/IE55Fixes.css
new file mode 100644 (file)
index 0000000..637daae
--- /dev/null
@@ -0,0 +1,85 @@
+/* IE5.5/win- only fixes */
+
+#column-content { 
+       float: none; 
+       margin-left: 0;
+       height: 1%;
+}
+#column-content #content {
+       position: relative;
+       z-index: 5;
+       margin-left: 12.2em;
+       margin-top: 3em;
+       height: 1%;
+}
+#column-one {
+       position: absolute;
+       top: 0;
+       left: 0;
+       z-index: 4;
+       width: 100%;
+}
+#footer {
+       margin-left: 13.6em;
+       border-left: 1px solid #fabd23;
+}
+
+/*#bodyContent div,
+#bodyContent pre { overflow: auto; }*/
+
+#p-personal { padding-bottom: .1em; }
+
+body { font-size: xx-small; }
+
+#p-cactions {
+       width: 76% !important;
+       z-index: 3 !important;
+       float: none;
+}
+#p-cactions li {
+       padding-bottom: 0 !important;
+       border: none;
+       background-color: transparent;
+       cursor: default;
+       float: none !important;
+}
+#p-cactions li a {
+       display: inline-block !important;
+       vertical-align: top;
+       padding-bottom: 0;
+       border: solid #aaa;
+       border-width: 1px 1px 0;
+}
+#p-cactions li.selected a {
+       border-color: #fabd23;
+       padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+       padding-bottom: 0.17em;
+}
+#p-navigation a {
+       display: inline-block;
+       width: 100%;
+}
+.portlet {
+       overflow: hidden;
+}
+#bodyContent a.external {
+       background: url(external.png) center right no-repeat;
+       padding-right: 13px;
+}
+/* show the hand */
+#p-logo a,
+#p-logo a:hover {
+       cursor: pointer;
+}
+.visualClear {
+       width: 90%;
+       height: 1px;
+       padding: 0;
+       margin: 0;
+}
+
+#editform {
+       width: 100%;
+}
diff --git a/skins/monobook/IE60Fixes.css b/skins/monobook/IE60Fixes.css
new file mode 100644 (file)
index 0000000..bf78413
--- /dev/null
@@ -0,0 +1,87 @@
+/* 6.0 - only fixes */
+/* content area */ 
+/* workaround for various ie float bugs */
+#column-content { 
+       float: none; 
+       margin-left: 0;
+       height: 1%;
+}
+#column-content #content {
+       margin-left: 12.2em;
+       margin-top: 3em;
+       height: 1%;
+}
+#column-one {
+       position: absolute;
+       top: 0;
+       left: 0;
+       z-index: 4;
+}
+#footer {
+       margin-left: 13.6em;
+       border-left: 1px solid #fabd23;
+}
+
+/* the tabs */
+
+#p-cactions {
+       z-index: 3;
+}
+
+#p-cactions li {
+       padding-bottom: 0 !important;
+       border: none;
+       background-color: transparent;
+       cursor: default;
+       float: none !important;
+}
+#p-cactions li a {
+       display: inline-block !important;
+       vertical-align: top;
+       padding-bottom: 0;
+       border: solid #aaa;
+       border-width: 1px 1px 0;
+}
+#p-cactions li.selected a {
+       border-color: #fabd23;
+       padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+       padding-bottom: 0.17em;
+}
+#p-navigation a {
+       display: inline-block;
+       width: 100%;
+}
+#portal-personaltools {
+       padding-bottom: 0.1em;
+}
+#bodyContent a.external {
+       background: url(external.png) center right no-repeat;
+       padding-right: 13px;
+}
+
+/* show the hand */
+#p-logo a,
+#p-logo a:hover {
+       cursor: pointer;
+}
+div.visualClear {
+       width:100%;
+       line-height: 0;
+}
+textarea {
+       width: 96%;
+}
+
+div.editsection,
+#catlinks,
+div.tright,
+div.tleft {
+       position: relative;
+}
+
+/* bug 12846 */
+body.rtl #preftoc a, body.rtl #preftoc a:active {
+       float: left;
+}
diff --git a/skins/monobook/IE70Fixes.css b/skins/monobook/IE70Fixes.css
new file mode 100644 (file)
index 0000000..43ff707
--- /dev/null
@@ -0,0 +1,74 @@
+/* 7.0 - only fixes */
+/* content area */ 
+/* workaround for various ie float bugs */
+
+/* This bit is needed to make links clickable... WTF */
+#column-content #content {
+       margin-left: 12.2em;
+       margin-top: 3em;
+       height: 1%;
+}
+
+.rtl #column-one {
+       /* For some reason it tries to inherit the padding-top into every div,
+        * and I can't figure out how to get it back off.
+        * Margin works correctly for this use, though.
+        */
+       padding-top: 0;
+       margin-top: 160px;
+}
+
+/* the tabs */
+
+#p-cactions {
+       z-index: 3;
+}
+
+
+#p-cactions li {
+       padding-bottom: 0 !important;
+       border: none;
+       background-color: transparent;
+       cursor: default;
+       float: none !important;
+}
+
+#p-cactions li a {
+       display: inline-block !important;
+       vertical-align: top;
+       padding-bottom: 0;
+       border: solid #aaa;
+       border-width: 1px 1px 0;
+}
+#p-cactions li.selected a {
+       border-color: #fabd23;
+       padding-bottom: 0.17em;
+}
+#p-cactions li a:hover {
+       padding-bottom: 0.17em;
+}
+#p-navigation a {
+       display: inline-block;
+       width: 100%;
+}
+#portal-personaltools {
+       padding-bottom: 0.1em;
+}
+textarea {
+       width: 96%;
+}
+
+/*
+div.editsection,
+#catlinks,
+div.tright,
+div.tleft {
+       position: relative;
+}
+*/
+
+
+#footer li {
+       /* Work around bug with inline <li> tags with right margins and nowrap */
+       margin-right: 0;
+}
diff --git a/skins/monobook/IEMacFixes.css b/skins/monobook/IEMacFixes.css
new file mode 100644 (file)
index 0000000..f1b0571
--- /dev/null
@@ -0,0 +1,44 @@
+/* IE/Mac only fix stylesheet, imported from main.css */
+#portal-column-content {
+       margin: 0 0 4.8em 0;
+       float: none;
+}
+#portal-column-content #content {
+       z-index: 0;
+}
+#portal-column-one {
+       position: absolute;
+       top: 0;
+       left: 0;
+       z-index: 3;
+}
+#portal-footer {
+       margin-left: 12em; 
+}
+/*
+#portlet-contentViews {
+       top: 0.6em !important;
+       left: 14.5em !important;
+}
+*/
+#portlet-contentViews li,
+#portlet-contentViews .selected {
+       border: none !important;
+}
+#portlet-contentViews li a   {
+       border: 1px solid #aaaaaa;
+       border-bottom: none;
+}
+#portlet-contentViews li.selected a {
+       border: 1px solid #fabd23;
+       border-bottom: none;
+}
+/* no background images */
+li#personaltools-userpage,
+li#personaltools-login/* */ {
+       background: none;
+       padding-left: none;
+}
+#mactest {
+       color: green;
+}
diff --git a/skins/monobook/KHTMLFixes.css b/skins/monobook/KHTMLFixes.css
new file mode 100644 (file)
index 0000000..afa3568
--- /dev/null
@@ -0,0 +1,4 @@
+/* KHTML fix stylesheet */
+/* work around the horizontal scrollbars */
+#column-content { margin-left: 0; }
+
diff --git a/skins/monobook/Opera6Fixes.css b/skins/monobook/Opera6Fixes.css
new file mode 100644 (file)
index 0000000..8870473
--- /dev/null
@@ -0,0 +1,14 @@
+/* opera 6 fixes */
+#column-one {
+       position: relative;
+       max-width: 11.7em;
+}
+#p-personal {
+       width: 45em;
+       margin-left: 8.6em;
+       right: 0;
+}
+#bodyContent a.external {
+       background: url(external.png) center right no-repeat;
+       padding-right: 13px;
+}
diff --git a/skins/monobook/Opera7Fixes.css b/skins/monobook/Opera7Fixes.css
new file mode 100644 (file)
index 0000000..446ea44
--- /dev/null
@@ -0,0 +1,11 @@
+/* small tweaks for opera seven */
+#p-cactions {
+       margin-top: .1em;
+}
+#p-cactions li a {
+       top: 2px;
+}
+#bodyContent a.external {
+       background: url(external.png) center right no-repeat;
+       padding-right: 13px;
+}
diff --git a/skins/monobook/audio.png b/skins/monobook/audio.png
new file mode 100644 (file)
index 0000000..1c56bdc
Binary files /dev/null and b/skins/monobook/audio.png differ
diff --git a/skins/monobook/bullet.gif b/skins/monobook/bullet.gif
new file mode 100644 (file)
index 0000000..b43de48
Binary files /dev/null and b/skins/monobook/bullet.gif differ
diff --git a/skins/monobook/discussionitem_icon.gif b/skins/monobook/discussionitem_icon.gif
new file mode 100644 (file)
index 0000000..baec471
Binary files /dev/null and b/skins/monobook/discussionitem_icon.gif differ
diff --git a/skins/monobook/document.png b/skins/monobook/document.png
new file mode 100644 (file)
index 0000000..b48138e
Binary files /dev/null and b/skins/monobook/document.png differ
diff --git a/skins/monobook/external.png b/skins/monobook/external.png
new file mode 100644 (file)
index 0000000..419c06f
Binary files /dev/null and b/skins/monobook/external.png differ
diff --git a/skins/monobook/file_icon.gif b/skins/monobook/file_icon.gif
new file mode 100644 (file)
index 0000000..847f648
Binary files /dev/null and b/skins/monobook/file_icon.gif differ
diff --git a/skins/monobook/headbg.jpg b/skins/monobook/headbg.jpg
new file mode 100644 (file)
index 0000000..5491c6e
Binary files /dev/null and b/skins/monobook/headbg.jpg differ
diff --git a/skins/monobook/link_icon.gif b/skins/monobook/link_icon.gif
new file mode 100644 (file)
index 0000000..815ccb1
Binary files /dev/null and b/skins/monobook/link_icon.gif differ
diff --git a/skins/monobook/lock_icon.gif b/skins/monobook/lock_icon.gif
new file mode 100644 (file)
index 0000000..8a87e28
Binary files /dev/null and b/skins/monobook/lock_icon.gif differ
diff --git a/skins/monobook/magnify-clip.png b/skins/monobook/magnify-clip.png
new file mode 100644 (file)
index 0000000..992aa2e
Binary files /dev/null and b/skins/monobook/magnify-clip.png differ
diff --git a/skins/monobook/mail_icon.gif b/skins/monobook/mail_icon.gif
new file mode 100644 (file)
index 0000000..50a87a9
Binary files /dev/null and b/skins/monobook/mail_icon.gif differ
diff --git a/skins/monobook/main.css b/skins/monobook/main.css
new file mode 100644 (file)
index 0000000..7e5809b
--- /dev/null
@@ -0,0 +1,1537 @@
+/*
+** MediaWiki 'monobook' style sheet for CSS2-capable browsers.
+** Copyright Gabriel Wicke - http://wikidev.net/
+** License: GPL (http://www.gnu.org/copyleft/gpl.html)
+**
+** Loosely based on http://www.positioniseverything.net/ordered-floats.html by Big John
+** and the Plone 2.0 styles, see http://plone.org/ (Alexander Limi,Joe Geldart & Tom Croucher,
+** Michael Zeltner and Geir Bækholt)
+** All you guys rock :)
+*/
+
+#column-content {
+       width: 100%;
+       float: right;
+       margin: 0 0 .6em -12.2em;
+       padding: 0;
+}
+#content {
+       margin: 2.8em 0 0 12.2em;
+       padding: 0 1em 1em 1em;
+       position: relative;
+       z-index: 2;
+}
+#column-one {
+       padding-top: 160px;
+}
+#content {
+       background: white;
+       color: black;
+       border: 1px solid #aaa;
+       border-right: none;
+       line-height: 1.5em;
+}
+/* the left column width is specified in class .portlet */
+
+/* Font size:
+** We take advantage of keyword scaling- browsers won't go below 9px
+** More at http://www.w3.org/2003/07/30-font-size
+** http://style.cleverchimp.com/font_size_intervals/altintervals.html
+*/
+
+body {
+       font: x-small sans-serif;
+       background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat;
+       color: black;
+       margin: 0;
+       padding: 0;
+}
+
+/* scale back up to a sane default */
+#globalWrapper {
+       font-size: 127%;
+       width: 100%;
+       margin: 0;
+       padding: 0;
+}
+.visualClear {
+       clear: both;
+}
+
+/* general styles */
+
+table {
+       font-size: 100%;
+       color: black;
+       /* we don't want the bottom borders of <h2>s to be visible through
+          floated tables */
+       background-color: white;
+}
+fieldset table {
+       /* but keep table layouts in forms clean... */
+       background: none;
+}
+a {
+       text-decoration: none;
+       color: #002bb8;
+       background: none;
+}
+a:visited {
+       color: #5a3696;
+}
+a:active {
+       color: #faa700;
+}
+a:hover {
+       text-decoration: underline;
+}
+a.stub {
+       color: #772233;
+}
+a.new, #p-personal a.new {
+       color: #ba0000;
+}
+a.new:visited, #p-personal a.new:visited {
+       color: #a55858;
+}
+
+img {
+       border: none;
+       vertical-align: middle;
+}
+p {
+       margin: .4em 0 .5em 0;
+       line-height: 1.5em;
+}
+p img {
+       margin: 0;
+}
+
+hr {
+       height: 1px;
+       color: #aaa;
+       background-color: #aaa;
+       border: 0;
+       margin: .2em 0 .2em 0;
+}
+
+h1, h2, h3, h4, h5, h6 {
+       color: black;
+       background: none;
+       font-weight: normal;
+       margin: 0;
+       padding-top: .5em;
+       padding-bottom: .17em;
+       border-bottom: 1px solid #aaa;
+}
+h1 { font-size: 188%; }
+h1 .editsection { font-size: 53%; }
+h2 { font-size: 150%; }
+h2 .editsection { font-size: 67%; }
+h3, h4, h5, h6 {
+       border-bottom: none;
+       font-weight: bold;
+}
+h3 { font-size: 132%; }
+h3 .editsection { font-size: 76%; font-weight: normal; }
+h4 { font-size: 116%; }
+h4 .editsection { font-size: 86%; font-weight: normal; }
+h5 { font-size: 100%; }
+h5 .editsection { font-weight: normal; }
+h6 { font-size: 80%;  }
+h6 .editsection { font-size: 125%; font-weight: normal; }
+
+ul {
+       line-height: 1.5em;
+       list-style-type: square;
+       margin: .3em 0 0 1.5em;
+       padding: 0;
+       list-style-image: url(bullet.gif);
+}
+ol {
+       line-height: 1.5em;
+       margin: .3em 0 0 3.2em;
+       padding: 0;
+       list-style-image: none;
+}
+li {
+       margin-bottom: .1em;
+}
+dt {
+       font-weight: bold;
+       margin-bottom: .1em;
+}
+dl {
+       margin-top: .2em;
+       margin-bottom: .5em;
+}
+dd {
+       line-height: 1.5em;
+       margin-left: 2em;
+       margin-bottom: .1em;
+}
+
+fieldset {
+       border: 1px solid #2f6fab;
+       margin: 1em 0 1em 0;
+       padding: 0 1em 1em;
+       line-height: 1.5em;
+}
+fieldset.nested {
+       margin: 0 0 0.5em 0;
+       padding: 0 0.5em 0.5em;
+}
+legend {
+       padding: .5em;
+       font-size: 95%;
+}
+form {
+       border: none;
+       margin: 0;
+}
+
+textarea {
+       width: 100%;
+       padding: .1em;
+}
+
+input.historysubmit {
+       padding: 0 .3em .3em .3em !important;
+       font-size: 94%;
+       cursor: pointer;
+       height: 1.7em !important;
+       margin-left: 1.6em;
+}
+select {
+       vertical-align: top;
+}
+abbr, acronym, .explain {
+       border-bottom: 1px dotted black;
+       color: black;
+       background: none;
+       cursor: help;
+}
+q {
+       font-family: Times, "Times New Roman", serif;
+       font-style: italic;
+}
+/* disabled for now
+blockquote {
+       font-family: Times, "Times New Roman", serif;
+       font-style: italic;
+}*/
+code {
+       background-color: #f9f9f9;
+}
+pre {
+       padding: 1em;
+       border: 1px dashed #2f6fab;
+       color: black;
+       background-color: #f9f9f9;
+       line-height: 1.1em;
+}
+
+/*
+** the main content area
+*/
+
+#siteSub {
+       display: none;
+}
+#jump-to-nav {
+       display: none;
+}
+
+#contentSub, #contentSub2 {
+       font-size: 84%;
+       line-height: 1.2em;
+       margin: 0 0 1.4em 1em;
+       color: #7d7d7d;
+       width: auto;
+}
+span.subpages {
+       display: block;
+}
+
+/* Some space under the headers in the content area */
+#bodyContent h1, #bodyContent h2 {
+       margin-bottom: .6em;
+}
+#bodyContent h3, #bodyContent h4, #bodyContent h5 {
+       margin-bottom: .3em;
+}
+#firstHeading {
+       margin-bottom: .1em;
+       /* These two rules hack around bug 2013 (fix for more limited bug 11325).
+          When bug 2013 is fixed properly, they should be removed. */
+       line-height: 1.2em;
+       padding-bottom: 0;
+}
+
+/* user notification thing */
+.usermessage {
+       background-color: #ffce7b;
+       border: 1px solid #ffa500;
+       color: black;
+       font-weight: bold;
+       margin: 2em 0 1em;
+       padding: .5em 1em;
+       vertical-align: middle;
+}
+#siteNotice {
+       text-align: center;
+       font-size: 95%;
+       padding: 0 .9em;
+}
+#siteNotice p {
+       margin: 0;
+       padding: 0;
+}
+.success {
+       color: green;
+       font-size: larger;
+}
+.error {
+       color: red;
+       font-size: larger;
+}
+.errorbox, .successbox {
+       font-size: larger;
+       border: 2px solid;
+       padding: .5em 1em;
+       float: left;
+       margin-bottom: 2em;
+       color: #000;
+}
+.errorbox {
+       border-color: red;
+       background-color: #fff2f2;
+}
+.successbox {
+       border-color: green;
+       background-color: #dfd;
+}
+.errorbox h2, .successbox h2 {
+       font-size: 1em;
+       font-weight: bold;
+       display: inline;
+       margin: 0 .5em 0 0;
+       border: none;
+}
+
+.catlinks {
+       border: 1px solid #aaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       margin-top: 1em;
+       clear: both;
+}
+/* currently unused, intended to be used by a metadata box
+in the bottom-right corner of the content area */
+.documentDescription {
+       /* The summary text describing the document */
+       font-weight: bold;
+       display: block;
+       margin: 1em 0;
+       line-height: 1.5em;
+}
+.documentByLine {
+       text-align: right;
+       font-size: 90%;
+       clear: both;
+       font-weight: normal;
+       color: #76797c;
+}
+
+/* emulate center */
+.center {
+       width: 100%;
+       text-align: center;
+}
+*.center * {
+       margin-left: auto;
+       margin-right: auto;
+}
+/* small for tables and similar */
+.small, .small * {
+       font-size: 94%;
+}
+table.small {
+       font-size: 100%;
+}
+
+/*
+** content styles
+*/
+
+#toc,
+.toc,
+.mw-warning {
+       border: 1px solid #aaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       font-size: 95%;
+}
+#toc h2,
+.toc h2 {
+       display: inline;
+       border: none;
+       padding: 0;
+       font-size: 100%;
+       font-weight: bold;
+}
+#toc #toctitle,
+.toc #toctitle,
+#toc .toctitle,
+.toc .toctitle {
+       text-align: center;
+}
+#toc ul,
+.toc ul {
+       list-style-type: none;
+       list-style-image: none;
+       margin-left: 0;
+       padding-left: 0;
+       text-align: left;
+}
+#toc ul ul,
+.toc ul ul {
+       margin: 0 0 0 2em;
+}
+#toc .toctoggle,
+.toc .toctoggle {
+       font-size: 94%;
+}
+
+.mw-warning {
+       margin-left: 50px;
+       margin-right: 50px;
+       text-align: center;
+}
+
+/* images */
+div.floatright, table.floatright {
+       clear: right;
+       float: right;
+       position: relative;
+       margin: 0 0 .5em .5em;
+       border: 0;
+/*
+       border: .5em solid white;
+       border-width: .5em 0 .8em 1.4em;
+*/
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+       float: left;
+       clear: left;
+       position: relative;
+       margin: 0 .5em .5em 0;
+       border: 0;
+/*
+       margin: .3em .5em .5em 0;
+       border: .5em solid white;
+       border-width: .5em 1.4em .8em 0;
+*/
+}
+div.floatleft p { font-style: italic; }
+/* thumbnails */
+div.thumb {
+       margin-bottom: .5em;
+       border-style: solid;
+       border-color: white;
+       width: auto;
+}
+div.thumbinner {
+       border: 1px solid #ccc;
+       padding: 3px !important;
+       background-color: #f9f9f9;
+       font-size: 94%;
+       text-align: center;
+       overflow: hidden;
+}
+html .thumbimage {
+       border: 1px solid #ccc;
+}
+html .thumbcaption {
+       border: none;
+       text-align: left;
+       line-height: 1.4em;
+       padding: 3px !important;
+       font-size: 94%;
+}
+div.magnify {
+       float: right;
+       border: none !important;
+       background: none !important;
+}
+div.magnify a, div.magnify img {
+       display: block;
+       border: none !important;
+       background: none !important;
+}
+div.tright {
+       clear: right;
+       float: right;
+       border-width: .5em 0 .8em 1.4em;
+}
+div.tleft {
+       float: left;
+       clear: left;
+       margin-right: .5em;
+       border-width: .5em 1.4em .8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+.hiddenStructure {
+       display: none;
+}
+
+/*
+** classes for special content elements like town boxes
+** intended to be referenced directly from the wiki src
+*/
+
+/*
+** User styles
+*/
+/* table standards */
+table.rimage {
+       float: right;
+       position: relative;
+       margin-left: 1em;
+       margin-bottom: 1em;
+       text-align: center;
+}
+.toccolours {
+       border: 1px solid #aaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       font-size: 95%;
+}
+
+/*
+** edit views etc
+*/
+.special li {
+       line-height: 1.4em;
+       margin: 0;
+       padding: 0;
+}
+
+/*
+** keep the whitespace in front of the ^=, hides rule from konqueror
+** this is css3, the validator doesn't like it when validating as css2
+*/
+#bodyContent a.external,
+#bodyContent a[href ^="gopher://"] {
+       background: url(external.png) center right no-repeat;
+       padding-right: 13px;
+}
+#bodyContent a[href ^="https://"],
+.link-https {
+       background: url(lock_icon.gif) center right no-repeat;
+       padding-right: 16px;
+}
+#bodyContent a[href ^="mailto:"],
+.link-mailto {
+       background: url(mail_icon.gif) center right no-repeat;
+       padding-right: 18px;
+}
+#bodyContent a[href ^="news://"] {
+       background: url(news_icon.png) center right no-repeat;
+       padding-right: 18px;
+}
+#bodyContent a[href ^="ftp://"],
+.link-ftp {
+       background: url(file_icon.gif) center right no-repeat;
+       padding-right: 18px;
+}
+#bodyContent a[href ^="irc://"],
+#bodyContent a.extiw[href ^="irc://"],
+.link-irc {
+       background: url(discussionitem_icon.gif) center right no-repeat;
+       padding-right: 18px;
+}
+#bodyContent a.external[href $=".ogg"], #bodyContent a.external[href $=".OGG"],
+#bodyContent a.external[href $=".mid"], #bodyContent a.external[href $=".MID"],
+#bodyContent a.external[href $=".midi"], #bodyContent a.external[href $=".MIDI"],
+#bodyContent a.external[href $=".mp3"], #bodyContent a.external[href $=".MP3"],
+#bodyContent a.external[href $=".wav"], #bodyContent a.external[href $=".WAV"],
+#bodyContent a.external[href $=".wma"], #bodyContent a.external[href $=".WMA"],
+.link-audio {
+       background: url("audio.png") center right no-repeat;
+       padding-right: 13px;
+}
+#bodyContent a.external[href $=".ogm"], #bodyContent a.external[href $=".OGM"],
+#bodyContent a.external[href $=".avi"], #bodyContent a.external[href $=".AVI"],
+#bodyContent a.external[href $=".mpeg"], #bodyContent a.external[href $=".MPEG"],
+#bodyContent a.external[href $=".mpg"], #bodyContent a.external[href $=".MPG"],
+.link-video {
+       background: url("video.png") center right no-repeat;
+       padding-right: 13px;
+}
+#bodyContent a.external[href $=".pdf"], #bodyContent a.external[href $=".PDF"],
+#bodyContent a.external[href *=".pdf#"], #bodyContent a.external[href *=".PDF#"],
+#bodyContent a.external[href *=".pdf?"], #bodyContent a.external[href *=".PDF?"],
+.link-document {
+       background: url("document.png") center right no-repeat;
+       padding-right: 12px;
+}
+
+/* disable interwiki styling */
+#bodyContent a.extiw,
+#bodyContent a.extiw:active {
+       color: #36b;
+       background: none;
+       padding: 0;
+}
+#bodyContent a.external {
+       color: #36b;
+}
+/* this can be used in the content area to switch off
+special external link styling */
+#bodyContent .plainlinks a {
+       background: none !important;
+       padding: 0 !important;
+}
+/*
+** Structural Elements
+*/
+
+/*
+** general portlet styles (elements in the quickbar)
+*/
+.portlet {
+       border: none;
+       margin: 0 0 .5em;
+       padding: 0;
+       float: none;
+       width: 11.6em;
+       overflow: hidden;
+}
+.portlet h4 {
+       font-size: 95%;
+       font-weight: normal;
+       white-space: nowrap;
+}
+.portlet h5 {
+       background: transparent;
+       padding: 0 1em 0 .5em;
+       display: inline;
+       height: 1em;
+       text-transform: lowercase;
+       font-size: 91%;
+       font-weight: normal;
+       white-space: nowrap;
+}
+.portlet h6 {
+       background: #ffae2e;
+       border: 1px solid #2f6fab;
+       border-style: solid solid none solid;
+       padding: 0 1em 0 1em;
+       text-transform: lowercase;
+       display: block;
+       font-size: 1em;
+       height: 1.2em;
+       font-weight: normal;
+       white-space: nowrap;
+}
+.pBody {
+       font-size: 95%;
+       background-color: white;
+       color: black;
+       border-collapse: collapse;
+       border: 1px solid #aaa;
+       padding: 0 .8em .3em .5em;
+}
+.portlet h1,
+.portlet h2,
+.portlet h3,
+.portlet h4 {
+       margin: 0;
+       padding: 0;
+}
+.portlet ul {
+       line-height: 1.5em;
+       list-style-type: square;
+       list-style-image: url(bullet.gif);
+       font-size: 95%;
+}
+.portlet li {
+       padding: 0;
+       margin: 0;
+}
+
+/*
+** Logo properties
+*/
+
+#p-logo {
+       top: 0;
+       left: 0;
+       position: absolute; /*needed to use z-index */
+       z-index: 3;
+       height: 155px;
+       width: 12em;
+       overflow: visible;
+}
+#p-logo h5 {
+       display: none;
+}
+#p-logo a,
+#p-logo a:hover {
+       display: block;
+       height: 155px;
+       width: 12.2em;
+       background-repeat: no-repeat;
+       background-position: 35% 50% !important;
+       text-decoration: none;
+}
+
+/*
+** Search portlet
+*/
+#p-search {
+       position: relative;
+       z-index: 3;
+}
+input.searchButton {
+       margin-top: 1px;
+       font-size: 95%;
+}
+#searchGoButton {
+       padding-left: .5em;
+       padding-right: .5em;
+       font-weight: bold;
+}
+#searchInput {
+       width: 10.9em;
+       margin: 0;
+       font-size: 95%;
+}
+#p-search .pBody {
+       padding: .5em .4em .4em .4em;
+       text-align: center;
+}
+
+/*
+** the personal toolbar
+*/
+#p-personal {
+       position: absolute;
+       left: 0;
+       top: 0;
+       z-index: 0;
+}
+#p-personal {
+       width: 100%;
+       white-space: nowrap;
+       padding: 0;
+       margin: 0;
+       border: none;
+       background: none;
+       overflow: visible;
+       line-height: 1.2em;
+}
+#p-personal h5 {
+       display: none;
+}
+#p-personal .portlet,
+#p-personal .pBody {
+       z-index: 0;
+       padding: 0;
+       margin: 0;
+       border: none;
+       overflow: visible;
+       background: none;
+}
+/* this is the ul contained in the portlet */
+#p-personal ul {
+       border: none;
+       line-height: 1.4em;
+       color: #2f6fab;
+       padding: 0 2em 0 3em;
+       margin: 0;
+       text-align: right;
+       list-style: none;
+       z-index: 0;
+       background: none;
+       cursor: default;
+}
+#p-personal li {
+       z-index: 0;
+       border: none;
+       padding: 0;
+       display: inline;
+       color: #2f6fab;
+       margin-left: 1em;
+       line-height: 1.2em;
+       background: none;
+}
+#p-personal li a {
+       text-decoration: none;
+       color: #005896;
+       padding-bottom: .2em;
+       background: none;
+}
+#p-personal li a:hover {
+       background-color: white;
+       padding-bottom: .2em;
+       text-decoration: none;
+}
+#p-personal li.active a:hover {
+       background-color: transparent;
+}
+/* the icon in front of the user name, single quotes
+in bg url to hide it from iemac */
+li#pt-userpage,
+li#pt-anonuserpage,
+li#pt-login {
+       background: url(user.gif) top left no-repeat;
+       padding-left: 20px;
+       text-transform: none;
+}
+#p-personal ul {
+       text-transform: lowercase;
+}
+#p-personal li.active {
+       font-weight: bold;
+}
+/*
+** the page-related actions- page/talk, edit etc
+*/
+#p-cactions {
+       position: absolute;
+       top: 1.3em;
+       left: 11.5em;
+       margin: 0;
+       white-space: nowrap;
+       width: 76%;
+       line-height: 1.1em;
+       overflow: visible;
+       background: none;
+       border-collapse: collapse;
+       padding-left: 1em;
+       list-style: none;
+       font-size: 95%;
+}
+#p-cactions ul {
+       list-style: none;
+}
+#p-cactions li {
+       display: inline;
+       border: 1px solid #aaa;
+       border-bottom: none;
+       padding: 0 0 .1em 0;
+       margin: 0 .3em 0 0;
+       overflow: visible;
+       background: white;
+}
+#p-cactions li.selected {
+       border-color: #fabd23;
+       padding: 0 0 .2em 0;
+       font-weight: bold;
+}
+#p-cactions li a {
+       background-color: #fbfbfb;
+       color: #002bb8;
+       border: none;
+       padding: 0 .8em .3em;
+       position: relative;
+       z-index: 0;
+       margin: 0;
+       text-decoration: none;
+}
+#p-cactions li.selected a {
+       z-index: 3;
+       padding: 0 1em .2em!important;
+       background-color: white;
+}
+#p-cactions .new a {
+       color: #ba0000;
+}
+#p-cactions li a:hover {
+       z-index: 3;
+       text-decoration: none;
+       background-color: white;
+}
+#p-cactions h5 {
+       display: none;
+}
+#p-cactions li.istalk {
+       margin-right: 0;
+}
+#p-cactions li.istalk a {
+       padding-right: .5em;
+}
+#p-cactions #ca-addsection a {
+       padding-left: .4em;
+       padding-right: .4em;
+}
+/* offsets to distinguish the tab groups */
+li#ca-talk {
+       margin-right: 1.6em;
+}
+li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print {
+       margin-left: 1.6em;
+}
+#p-cactions .pBody {
+       font-size: 1em;
+       background-color: transparent;
+       color: inherit;
+       border-collapse: inherit;
+       border: 0;
+       padding: 0;
+}
+#p-cactions .hiddenStructure {
+       display: none;
+}
+#p-cactions li a {
+       text-transform: lowercase;
+}
+
+#p-lang {
+       position: relative;
+       z-index: 3;
+}
+
+/* TODO: #t-iscite is only used by the Cite extension, come up with some
+ * system which allows extensions to add to this file on the fly
+ */
+#t-ispermalink, #t-iscite {
+       color: #999;
+}
+/*
+** footer
+*/
+#footer {
+       background-color: white;
+       border-top: 1px solid #fabd23;
+       border-bottom: 1px solid #fabd23;
+       margin: .6em 0 1em 0;
+       padding: .4em 0 1.2em 0;
+       text-align: center;
+       font-size: 90%;
+}
+#footer li {
+       display: inline;
+       margin: 0 1.3em;
+}
+#f-poweredbyico, #f-copyrightico {
+       margin: 0 8px;
+       position: relative;
+       top: -2px; /* Bump it up just a tad */
+}
+#f-poweredbyico {
+       float: right;
+       height: 1%;
+}
+#f-copyrightico {
+       float: left;
+       height: 1%;
+}
+
+/* js pref toc */
+#preftoc {
+       margin: 0;
+       padding: 0;
+       width: 100%;
+       clear: both;
+}
+#preftoc li {
+       background-color: #f0f0f0;
+       color: #000;
+}
+#preftoc li {
+       margin: 1px -2px 1px 2px;
+       float: left;
+       padding: 2px 0 3px 0;
+       border: 1px solid #fff;
+       border-right-color: #716f64;
+       border-bottom: 0;
+       position: relative;
+       white-space: nowrap;
+       list-style-type: none;
+       list-style-image: none;
+       z-index: 3;
+}
+#preftoc li.selected {
+       font-weight: bold;
+       background-color: #f9f9f9;
+       border: 1px solid #aaa;
+       border-bottom: none;
+       cursor: default;
+       top: 1px;
+       padding-top: 2px;
+       margin-right: -3px;
+}
+#preftoc > li.selected {
+       top: 2px;
+}
+#preftoc a,
+#preftoc a:active {
+       display: block;
+       color: #000;
+       padding: 0 .7em;
+       position: relative;
+       text-decoration: none;
+}
+#preftoc li.selected a {
+       cursor: default;
+       text-decoration: none;
+}
+#prefcontrol {
+       padding-top: 2em;
+       clear: both;
+}
+#preferences {
+       margin: 0;
+       border: 1px solid #aaa;
+       clear: both;
+       padding: 1.5em;
+       background-color: #F9F9F9;
+}
+.prefsection {
+       border: none;
+       padding: 0;
+       margin: 0;
+}
+.prefsection fieldset {
+       border: 1px solid #aaa;
+       float: left;
+       margin-right: 2em;
+}
+.prefsection legend {
+       font-weight: bold;   
+}
+.prefsection table, .prefsection legend {
+       background-color: #F9F9F9;
+}
+.mainLegend {
+       display: none;
+}
+div.prefsectiontip {
+       font-size: x-small;
+       padding: .2em 2em;
+       color: #666;
+}
+.btnSavePrefs {
+       font-weight: bold;
+       padding-left: .3em;
+       padding-right: .3em;
+}
+
+.preferences-login {
+       clear: both;
+       margin-bottom: 1.5em;
+}
+
+.prefcache {
+       font-size: 90%;
+       margin-top: 2em;
+}
+
+div#userloginForm form,
+div#userlogin form#userlogin2 {
+       margin: 0 3em 1em 0;
+       border: 1px solid #aaa;
+       clear: both;
+       padding: 1.5em 2em;
+       background-color: #f9f9f9;
+       float: left;
+}
+.rtl div#userloginForm form,
+.rtl div#userlogin form#userlogin2 {
+       float: right;
+}
+
+div#userloginForm table,
+div#userlogin form#userlogin2 table {
+       background-color: #f9f9f9;
+}
+
+div#userloginForm h2,
+div#userlogin form#userlogin2 h2 {
+       padding-top: 0;
+}
+
+div#userlogin .captcha,
+div#userloginForm .captcha {
+       border: 1px solid #bbb;
+       padding: 1.5em 2em;
+       background-color: white;
+}
+
+#loginend, #signupend {
+       clear: both;
+}
+
+#userloginprompt, #languagelinks {
+       font-size: 85%;
+}
+
+#login-sectiontip {
+       font-size: 85%;
+       line-height: 1.2;
+       padding-top: 2em;
+}
+
+#userlogin .loginText, #userlogin .loginPassword {
+       width: 12em;
+}
+
+#userloginlink a, #wpLoginattempt, #wpCreateaccount {
+       font-weight: bold;
+}
+
+/*
+** IE/Mac fixes, hope to find a validating way to move this
+** to a separate stylesheet. This would work but doesn't validate:
+** @import("IEMacFixes.css");
+*/
+/* tabs: border on the a, not the div */
+* > html #p-cactions li { border: none; }
+* > html #p-cactions li a {
+       border: 1px solid #aaa;
+       border-bottom: none;
+}
+* > html #p-cactions li.selected a { border-color: #fabd23; }
+/* footer icons need a fixed width */
+* > html #f-poweredbyico,
+* > html #f-copyrightico { width: 88px; }
+* > html #bodyContent,
+* > html #bodyContent pre {
+       overflow-x: auto;
+       width: 100%;
+       padding-bottom: 25px;
+}
+
+/* more IE fixes */
+/* float/negative margin brokenness */
+* html #footer {margin-top: 0;}
+* html #column-content {
+       display: inline;
+       margin-bottom: 0;
+}
+* html div.editsection { font-size: smaller; }
+#pagehistory li.selected { position: relative; }
+
+/* Mac IE 5.0 fix; floated content turns invisible */
+* > html #column-content {
+       float: none;
+}
+* > html #column-one {
+       position: absolute;
+       left: 0;
+       top: 0;
+}
+* > html #footer {
+       margin-left: 13.2em;
+}
+.redirectText {
+       font-size: 150%;
+       margin: 5px;
+}
+
+.printfooter {
+       display: none;
+}
+
+.not-patrolled {
+       background-color: #ffa;
+}
+div.patrollink {
+       clear: both;
+       font-size: 75%;
+       text-align: right;
+}
+span.newpage, span.minor, span.bot {
+       font-weight: bold;
+}
+span.unpatrolled {
+       font-weight: bold;
+       color: red;
+}
+
+.sharedUploadNotice {
+       font-style: italic;
+}
+
+span.updatedmarker {
+       color: black;
+       background-color: #0f0;
+}
+
+table.gallery {
+       border: 1px solid #ccc;
+       margin: 2px;
+       padding: 2px;
+       background-color: white;
+}
+
+table.gallery tr {
+       vertical-align: top;
+}
+
+table.gallery td {
+       vertical-align: top;
+       background-color: #f9f9f9;
+       border: solid 2px white;
+}
+/* Keep this temporarily so that cached pages will display right */
+table.gallery td.galleryheader {
+    text-align: center;
+       font-weight: bold;
+}
+table.gallery caption {
+       font-weight: bold;
+}
+
+div.gallerybox {
+       margin: 2px;
+}
+
+div.gallerybox div.thumb {
+       text-align: center;
+       border: 1px solid #ccc;
+       margin: 2px;
+}
+
+div.gallerytext {
+       overflow: hidden;
+       font-size: 94%;
+       padding: 2px 4px;
+}
+
+span.comment {
+       font-style: italic;
+}
+
+span.changedby {
+       font-size: 95%;
+}
+
+.previewnote {
+       text-indent: 3em;
+       color: #c00;
+       border-bottom: 1px solid #aaa;
+       padding-bottom: 1em;
+       margin-bottom: 1em;
+}
+
+.previewnote p {
+       margin: 0;
+       padding: 0;
+}
+
+.editExternally {
+       border: 1px solid gray;
+       background-color: #ffffff;
+       padding: 3px;
+       margin-top: 0.5em;
+       float: left;
+       font-size: small;
+       text-align: center;
+}
+.editExternallyHelp {
+       font-style: italic;
+       color: gray;
+}
+
+.toggle {
+       margin-left: 2em;
+       text-indent: -2em;
+}
+
+/* Classes for EXIF data display */
+table.mw_metadata {
+       font-size: 0.8em;
+       margin-left: 0.5em;
+       margin-bottom: 0.5em;
+       width: 300px;
+}
+
+table.mw_metadata caption {
+       font-weight: bold;
+}
+
+table.mw_metadata th {
+       font-weight: normal;
+}
+
+table.mw_metadata td {
+       padding: 0.1em;
+}
+
+table.mw_metadata {
+       border: none;
+       border-collapse: collapse;
+}
+
+table.mw_metadata td, table.mw_metadata th {
+       text-align: center;
+       border: 1px solid #aaaaaa;
+       padding-left: 0.1em;
+       padding-right: 0.1em;
+}
+
+table.mw_metadata th {
+       background-color: #f9f9f9;
+}
+
+table.mw_metadata td {
+       background-color: #fcfcfc;
+}
+
+table.collapsed tr.collapsable {
+       display: none;
+}
+
+
+/* filetoc */
+ul#filetoc {
+       text-align: center;
+       border: 1px solid #aaaaaa;
+       background-color: #f9f9f9;
+       padding: 5px;
+       font-size: 95%;
+       margin-bottom: 0.5em;
+       margin-left: 0;
+       margin-right: 0;
+}
+
+#filetoc li {
+       display: inline;
+       list-style-type: none;
+       padding-right: 2em;
+}
+
+input#wpSummary {
+       width: 80%;
+}
+
+/* @bug 1714 */
+input#wpSave, input#wpDiff {
+       margin-right: 0.33em;
+}
+
+#wpSave {
+       font-weight: bold;
+}
+
+/* Classes for article validation */
+
+table.revisionform_default {
+       border: 1px solid #000000;
+}
+
+table.revisionform_focus {
+       border: 1px solid #000000;
+       background-color:#00BBFF;
+}
+
+tr.revision_tr_default {
+       background-color:#EEEEEE;
+}
+
+tr.revision_tr_first {
+       background-color:#DDDDDD;
+}
+
+p.revision_saved {
+       color: green;
+       font-weight:bold;
+}
+
+#mw_trackbacks {
+       border: solid 1px #bbbbff;
+       background-color: #eeeeff;
+       padding: 0.2em;
+}
+
+
+/* Allmessages table */
+
+#allmessagestable th {
+       background-color: #b2b2ff;
+}
+
+#allmessagestable tr.orig {
+       background-color: #ffe2e2;
+}
+
+#allmessagestable tr.new {
+       background-color: #e2ffe2;
+}
+
+#allmessagestable tr.def {
+       background-color: #f0f0ff;
+}
+
+
+/* noarticletext */
+div.noarticletext {
+       border: 1px solid #ccc;
+       background: #fff;
+       padding: .2em 1em;
+       color: #000;
+}
+
+div#searchTargetContainer {
+       left:       10px;
+       top:        10px;
+       width:      90%;
+       background: white;
+}
+
+div#searchTarget {
+       padding:    3px;
+       margin:     5px;
+       background: #F0F0F0;
+       border:     solid 1px blue;
+}
+
+div#searchTarget ul li {
+       list-style: none;
+}
+
+div#searchTarget ul li:before {
+       color: orange;
+       content: "\00BB \0020";
+}
+
+div#searchTargetHide {
+       float:right;
+       border:solid 1px black;
+       background:#DCDCDC;
+       padding:2px;
+}
+
+#powersearch p {
+       margin-top:0px;
+}
+
+div.multipageimagenavbox {
+   border: solid 1px silver;
+   padding: 4px;
+   margin: 1em;
+   background: #f0f0f0;
+}
+
+div.multipageimagenavbox div.thumb {
+   border: none;
+   margin-left: 2em;
+   margin-right: 2em;
+}
+
+div.multipageimagenavbox hr {
+   margin: 6px;
+}
+
+table.multipageimage td {
+   text-align: center;
+}
+
+/** Special:Version */
+
+table#sv-ext, table#sv-hooks, table#sv-software {
+       margin: 1em;
+       padding:0em;
+}
+
+#sv-ext td, #sv-hooks td, #sv-software td,
+#sv-ext th, #sv-hooks th, #sv-software th {
+       border: 1px solid #A0A0A0;
+       padding: 0 0.15em 0 0.15em;
+}
+#sv-ext th, #sv-hooks th, #sv-software th {
+       background-color: #F0F0F0;
+       color: black;
+       padding: 0 0.15em 0 0.15em;
+}
+tr.sv-space{
+       height: 0.8em;
+       border:none;
+}
+tr.sv-space td { display: none; }
+
+/*
+  Table pager (e.g. Special:Imagelist)
+  - remove underlines from the navigation link
+  - collapse borders
+  - set the borders to outsets (similar to Special:Allmessages)
+  - remove line wrapping for all td and th, set background color
+  - restore line wrapping for the last two table cells (description and size)
+*/
+.TablePager { min-width: 80%; }
+.TablePager_nav a { text-decoration: none; }
+.TablePager { border-collapse: collapse; }
+.TablePager, .TablePager td, .TablePager th { 
+       border: 1px solid #aaaaaa;
+       padding: 0 0.15em 0 0.15em;
+}
+.TablePager th { background-color: #eeeeff }
+.TablePager td { background-color: #ffffff }
+.TablePager tr:hover td { background-color: #eeeeff }
+
+.imagelist td, .imagelist th { white-space: nowrap }
+.imagelist .TablePager_col_links { background-color: #eeeeff }
+.imagelist .TablePager_col_img_description { white-space: normal }
+.imagelist th.TablePager_sort { background-color: #ccccff }
+
+.templatesUsed { margin-top: 1.5em; }
+
+.mw-summary-preview {
+       margin: 0.1em 0;
+}
+
+/* Friendlier slave lag warnings */
+div.mw-lag-warn-normal,
+div.mw-lag-warn-high {
+       padding: 3px;
+       text-align: center;
+       margin: 3px auto;
+}
+div.mw-lag-warn-normal {
+       border: 1px solid #FFCC66;
+       background-color: #FFFFCC;
+}
+div.mw-lag-warn-high {
+       font-weight: bold;
+       border: 2px solid #FF0033;
+       background-color: #FFCCCC;
+}
+
+.MediaTransformError {
+       background-color: #ccc;
+       padding: 0.1em;
+}
+.MediaTransformError td {
+       text-align: center;
+       vertical-align: middle;
+       font-size: 90%;
+}
+
+/** Special:Search stuff */
+div#mw-search-interwiki-caption {
+       text-align: center;
+       font-weight: bold;
+       font-size: 95%;
+}
+
+.mw-search-interwiki-project {
+       font-size: 97%;
+       text-align: left;
+       padding-left: 0.2em;
+       padding-right: 0.15em;
+       padding-bottom: 0.2em;
+       padding-top: 0.15em;
+       background: #cae8ff;
+}
+
+/* God-damned hack for the crappy layout */
+.os-suggest {
+       font-size: 127%;
+}
diff --git a/skins/monobook/news_icon.png b/skins/monobook/news_icon.png
new file mode 100644 (file)
index 0000000..dd1541d
Binary files /dev/null and b/skins/monobook/news_icon.png differ
diff --git a/skins/monobook/required.gif b/skins/monobook/required.gif
new file mode 100644 (file)
index 0000000..bd71976
Binary files /dev/null and b/skins/monobook/required.gif differ
diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css
new file mode 100644 (file)
index 0000000..fbd5ab3
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+Right-to-left fixes for MonoBook.
+Places sidebar on right, tweaks various alignment issues.
+
+Works mostly ok nicely on Safari 1.2.1; fine in Mozilla.
+
+Safari bugs (1.2.1):
+* Tabs are still appearing in left-to-right order. (Try after localizing)
+
+Opera bugs (7.23 linux):
+* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other
+
+IE/mac bugs:
+* The thing barfs on Hebrew and Arabic anyway, so no point testing.
+
+Missing features due to lack of support:
+* external link icons
+
+To test:
+* Opera6
+* IE 5.0
+* etc
+
+*/
+body {
+       direction: rtl;
+       unicode-bidi: embed;
+}
+#column-content {
+       margin: 0 -12.2em 0 0;
+       float: left;
+}
+#column-content #content{
+       margin-left: 0;
+       margin-right: 12.2em;
+       border-right: 1px solid #aaaaaa;
+       border-left: none;
+}
+html > body .portlet {
+       float: right;
+       clear: right;
+}
+.editsection {
+       float: left;
+       margin-right: 5px;
+       margin-left: 0; /* bug 9122: undo default LTR */
+}
+/* recover IEMac (might be fine with the float, but usually it's close to IE */
+*>body .portlet {
+       float: none;
+       clear: none;
+}
+.pBody {
+       padding-right: 0.8em;
+       padding-left: 0.5em;
+}
+
+/* Fix alignment */
+.documentByLine,
+.portletDetails,
+.portletMore,
+#p-personal {
+       text-align: left;
+}
+
+div div.thumbcaption {
+       text-align: right;
+}
+
+div.magnify,
+#p-logo {
+       left: auto;
+       right: 0;
+}
+#p-personal {
+       left: auto;
+       right: 0;
+}
+
+#p-cactions {
+       left: auto;
+       right: 11.5em;
+       padding-left: 0;
+       padding-right: 1em;
+}
+#p-cactions li {
+       margin-left: 0.3em;
+       margin-right: 0;
+       float: right;
+}
+* html #p-cactions li a {
+       display: block;
+       padding-bottom: 0;
+}
+* html #p-cactions li a:hover {
+       padding-bottom: 0.2em;
+}
+/* offsets to distinguish the tab groups */
+li#ca-talk {
+       margin-right: auto;
+       margin-left: 1.6em;
+}
+li#ca-watch,li#ca-unwatch {
+       margin-right: 1.6em !important;
+}
+
+/* Fix margins for non-css2 browsers */
+/* top right bottom left */
+
+ul {
+       margin-left: 0;
+       margin-right: 1.5em;
+}
+ol {
+       margin-left: 0;
+       margin-right: 2.4em;
+}
+dd {
+       margin-left: 0;
+       margin-right: 1.6em;
+}
+#contentSub {
+       margin-right: 1em;
+       margin-left: 0;
+}
+.tocindent {
+       margin-left: 0;
+       margin-right: 2em;
+}
+div.tright, div.floatright, table.floatright {
+       clear: none;
+}
+div.tleft, div.floatleft, table.floatleft {
+       clear: left;
+}
+#p-personal li {
+       margin-left: 0;
+       margin-right: 1em;
+}
+
+li#ca-talk,
+li#ca-watch {
+       margin-right: auto;
+       margin-left: 1.6em;
+}
+
+#p-personal li {
+       float: left;
+}
+/* Fix link icons */
+.external {
+       padding: 0 !important;
+       background: none !important;
+}
+#footer {
+       clear: both;
+}
+* html #footer {
+       margin-left: 0;
+       margin-right: 13.6em;
+       border-left: 0;
+       border-right: 1px solid #fabd23;
+} 
+* html #column-content { 
+       float: none;
+       margin-left: 0;
+       margin-right: 0;
+}
+* html #column-content #content {
+       margin-left: 0;
+       margin-top: 3em;
+}
+* html #column-one { right: 0; }
+
+/* js pref toc */
+
+#preftoc {
+       margin-right: 1em;
+}
+
+.errorbox, .successbox, #preftoc li, .prefsection fieldset {
+       float: right;
+}
+
+.prefsection {
+       padding-right: 2em;
+}
+
+/* workaround for moz bug, displayed bullets on left side */
+
+#toc ul {
+       text-align: right;
+}
+
+#toc ul ul {
+       margin: 0 2em 0 0;
+}
+
+input#wpSave, input#wpDiff {
+       margin-right: 0;
+       margin-left: .33em;
+}
+
+#userlogin {
+       float: right;
+       margin: 0 0 1em 3em;
+}
+/* Convenience links to edit block, delete and protect reasons */
+p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
+p.mw-filedelete-editreasons, p.mw-delete-editreasons {
+       float: left;
+}
+
+.toggle {
+       margin-left: 0em;
+       margin-right: 2em;
+}
+table.filehistory th {
+       text-align: right;
+}
+
+/**
+ * Lists:
+ * The following lines don't have a visible effect on non-Gecko browsers
+ * They fix a problem ith Gecko browsers rendering lists to the right of
+ * left-floated objects in an RTL layout.
+ */
+html > body div#bodyContent ul {
+       display: table;
+}
+html > body div#bodyContent ul#filetoc {
+       display: block;
+}
diff --git a/skins/monobook/user.gif b/skins/monobook/user.gif
new file mode 100644 (file)
index 0000000..c9c9ab9
Binary files /dev/null and b/skins/monobook/user.gif differ
diff --git a/skins/monobook/video.png b/skins/monobook/video.png
new file mode 100644 (file)
index 0000000..38103da
Binary files /dev/null and b/skins/monobook/video.png differ
diff --git a/skins/monobook/wiki-indexed.png b/skins/monobook/wiki-indexed.png
new file mode 100644 (file)
index 0000000..189a2ae
Binary files /dev/null and b/skins/monobook/wiki-indexed.png differ
diff --git a/skins/monobook/wiki.png b/skins/monobook/wiki.png
new file mode 100644 (file)
index 0000000..69fce98
Binary files /dev/null and b/skins/monobook/wiki.png differ
diff --git a/skins/myskin/main.css b/skins/myskin/main.css
new file mode 100644 (file)
index 0000000..f3ab020
--- /dev/null
@@ -0,0 +1 @@
+/* this file must be empty */
diff --git a/skins/simple/discussionitem_icon.gif b/skins/simple/discussionitem_icon.gif
new file mode 100644 (file)
index 0000000..baec471
Binary files /dev/null and b/skins/simple/discussionitem_icon.gif differ
diff --git a/skins/simple/external.png b/skins/simple/external.png
new file mode 100644 (file)
index 0000000..419c06f
Binary files /dev/null and b/skins/simple/external.png differ
diff --git a/skins/simple/file_icon.gif b/skins/simple/file_icon.gif
new file mode 100644 (file)
index 0000000..847f648
Binary files /dev/null and b/skins/simple/file_icon.gif differ
diff --git a/skins/simple/link_icon.gif b/skins/simple/link_icon.gif
new file mode 100644 (file)
index 0000000..815ccb1
Binary files /dev/null and b/skins/simple/link_icon.gif differ
diff --git a/skins/simple/lock_icon.gif b/skins/simple/lock_icon.gif
new file mode 100644 (file)
index 0000000..8a87e28
Binary files /dev/null and b/skins/simple/lock_icon.gif differ
diff --git a/skins/simple/mail_icon.gif b/skins/simple/mail_icon.gif
new file mode 100644 (file)
index 0000000..50a87a9
Binary files /dev/null and b/skins/simple/mail_icon.gif differ
diff --git a/skins/simple/main.css b/skins/simple/main.css
new file mode 100644 (file)
index 0000000..6f3e8eb
--- /dev/null
@@ -0,0 +1,391 @@
+/* For clarity, explicitly state some recommendations from <http://www.w3.org/
+   TR/CSS21/sample.html> to make sure the editsection links scale right */
+
+h1 { font-size: 2em; }
+h2 { font-size: 1.5em; }
+h3 { font-size: 1.17em; }
+h5 { font-size: .83em; }
+h6 { font-size: .75em; }
+h1, h2, h3, h4, h5, h6 { font-weight: bolder }
+
+/* Now the custom parts */
+
+/* Make edit sections (which are inside h# tags) normal-sized */
+.editsection {
+       font-weight: normal;
+}
+h1 .editsection { font-size: 50% }
+h2 .editsection { font-size: 66.7% }
+h3 .editsection { font-size: 85.5% }
+h5 .editsection { font-size: 120% }
+h6 .editsection { font-size: 133% }
+
+
+#toolbar {
+  display: none;
+}
+
+div.center {
+  text-align: center;
+}
+
+#contentSub {
+  padding-left: 2em;
+}
+
+a {
+  text-decoration: none;
+}
+
+a:hover {
+  text-decoration: underline;
+}
+
+#column-content {
+  width: 100%;
+  float: right;
+  margin: 0 0 0.6em -12.2em;
+  padding:0;
+}
+
+#content {
+    margin: 0em 0 0 12.2em;
+    padding: 0em 1em 1.5em 1em;
+    border-left: 1px solid #959595;
+    line-height: 1.5em;
+}
+
+#column-one {
+  position: absolute;
+  top: 0px; left: 0px;
+}
+
+#footer {
+       display: none;
+}
+
+body {
+    margin: 0;
+    padding: 0;
+}
+
+#globalWrapper {
+  width: 100%;
+  height: 100%;
+  margin: 0;
+  padding: 0;
+}
+.visualClear { clear: both; }
+
+img {
+    border: none;
+}
+p {
+    margin: 0.4em 0em 0.5em 0em;
+    line-height: 1.5em;
+}
+p img { margin: 0; }
+
+h1, h2, h3, h4, h5, h6 {
+    margin: 0;
+    padding-top: 0.5em;
+    padding-bottom: 0.17em;
+}
+fieldset {
+    margin: 1em 0em 1em 0em;
+    padding: 0em 1em 1em 1em;
+}
+.usermessage {
+    background-color: #ffce7b;
+    border: 1px solid #ffa500;
+    color: Black;
+    font-weight: bold;
+    margin: 2em 0em 1em 0em;
+    padding: 0.5em 1em;
+    vertical-align: middle;
+}
+.error {
+    color: red;
+    font-size: larger;
+}
+
+table.rimage {
+    float:right;
+    position:relative;
+    margin-left:1em;
+    margin-bottom:1em;
+    text-align:center;
+}
+
+.portlet {
+    border: none;
+    float: none;
+    padding: 0;
+    width: 11.8em;
+    overflow: hidden;
+}
+.portlet h4 {
+    font-weight: normal;
+    white-space: nowrap;
+}
+.portlet h5 {
+  padding: 0em 1em 0em 0.5em;
+  display: inline;
+  height: 1em;
+  font-weight: normal;
+  white-space: nowrap;
+}
+.portlet h6 {
+    padding: 0em 1em 0em 1em;
+    display: block;
+    height: 1.2em;
+    font-weight: normal;
+    white-space: nowrap;
+}
+.pBody {
+    border-collapse: collapse;
+    padding: 0 0.8em 0.3em 0.5em;
+}
+.portlet h1,
+.portlet h2,
+.portlet h3,
+.portlet h4 {
+  margin: 0;
+  padding: 0;
+  font-size: small;
+}
+
+#p-search .pBody {
+    text-align: center;
+}
+
+#searchInput {
+  width: 100%;
+  clear: both;
+  margin: 0 0 0 0;
+}
+
+input.searchButton {
+    margin-top:1px;
+    padding: 0 0.4em;
+    cursor: pointer;
+}
+
+#p-search .pBody {
+    padding: 0.5em 0.4em 0.4em 0.4em;
+}
+
+textarea {
+  width: 100%;
+}
+
+.pBody li, .pBody ul {
+       padding-left: 0em;
+       margin-left: 0.5em;
+}
+
+pre {
+  margin: 2em;
+  border: solid 1px black;
+}
+
+h1.firstHeading, h2 {
+  border-bottom: solid 1px black;
+}
+#bodyContent a[href ^="http://"],
+#bodyContent a[href ^="gopher://"] {
+    background: url("external.png") center right no-repeat;
+    padding-right: 13px;
+}
+#bodyContent a[href ^="https://"],
+.link-https {
+    background: url("lock_icon.gif") center right no-repeat;
+    padding-right: 16px;
+}
+#bodyContent a[href ^="mailto:"],
+.link-mailto {
+    background: url("mail_icon.gif") center right no-repeat;
+    padding-right: 18px;
+}
+#bodyContent a[href ^="news://"] {
+    background: url("news_icon.png") center right no-repeat;
+    padding-right: 18px;
+}
+#bodyContent a[href ^="ftp://"],
+.link-ftp {
+    background: url("file_icon.gif") center right no-repeat;
+    padding-right: 18px;
+}
+#bodyContent a[href ^="irc://"],
+#bodyContent a.extiw[href ^="irc://"],
+.link-irc {
+    background: url("discussionitem_icon.gif")  center right no-repeat;
+    padding-right: 18px;
+}
+
+#bodyContent a.extiw,
+#bodyContent a.extiw:active {
+  color: #5E7CFF;
+  background: none;
+  padding: 0;
+}
+
+td.diff-addedline {
+    background-color: #B9FFB0;
+}
+
+td.diff-deletedline {
+    background-color: #f8ffaa;
+}
+
+.diffchange { background-color: #FFCDF3; text-decoration: none; }
+#pagehistory li { border: none; }
+
+span.urlexpansion {
+  display: none;
+}
+
+div.tocindent {
+  margin-left: 2em;
+}
+#toc {
+  text-align: left;
+  border-top: solid 1px black;
+  border-bottom: solid 1px black;
+}
+
+div.floatright, table.floatright {
+    clear: right;
+    float: right;
+    margin: 0;
+    position: relative;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.floatright p { font-style: italic; }
+div.floatleft, table.floatleft {
+    float: left;
+    clear: left;
+    margin: 0.3em 0.5em 0.5em 0;
+    position: relative;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+div.floatleft p { font-style: italic; }
+/* thumbnails */
+div.thumb {
+    margin-bottom: 0.5em;
+    width: auto;
+}
+div.thumb div {
+    padding: 3px !important;
+    text-align: center;
+    overflow: hidden;
+}
+
+div.thumb div div.thumbcaption {
+    border: none;
+    text-align: left;
+    line-height: 1.4;
+    padding: 0.3em 0 0.1em 0;
+}
+div.magnify {
+    float: right;
+    border: none !important;
+    background: none !important;
+}
+div.magnify a, div.magnify img {
+    display: block;
+    border: none !important;
+    background: none !important;
+}
+div.tright {
+    clear: right;
+    float: right;
+    border-width: 0.5em 0 0.8em 1.4em;
+}
+div.tleft {
+    float: left;
+    clear: left;
+    margin-right:0.5em;
+    border-width: 0.5em 1.4em 0.8em 0;
+}
+img.thumbborder {
+       border: 1px solid #dddddd;
+}
+
+a.stub { color: #772233; }
+a.new,
+#p-personal a.new {
+       text-decoration: line-through;
+}
+li.new {
+       text-decoration: line-through;
+}
+.catlinks {
+  text-align: center;
+  width: 80%;
+  margin-left: auto;
+  margin-right: auto;
+  padding: 3px;
+}
+
+#mytabs {
+  background-color: inherit;
+}
+#p-cactions {
+  background-color: inherit;
+}
+div.printfooter {
+  display: none;
+}
+
+#n-portal,
+#n-currentevents,
+#n-help,
+#n-sitesupport {
+  display: none;
+}
+
+#preftoc {
+    float: left;
+    margin: 1em;
+    width: 13em;
+}
+#preftoc li {
+}
+#preftoc li.selected {
+    border: 1px dashed #aaa;
+}
+#preftoc a,
+#preftoc a:active {
+    display: block;
+}
+#prefcontrol {
+    clear: both;
+    float: left;
+    margin-top: 1em;
+}
+div.prefsectiontip {
+    font-size: 95%;
+    margin-top: 1em;
+}
+
+#mw_trackbacks {
+       border-style: groove;
+       padding: 0.2em;
+}
+
+#jump-to-nav {
+  display: none;
+}
+
+table.collapsed tr.collapsable {
+       display: none;
+}
+
+.editsection {
+       float: right;
+       margin-left: 5px;
+}
+
+.templatesUsed { margin-top: 1.5em; }
+
diff --git a/skins/simple/rtl.css b/skins/simple/rtl.css
new file mode 100644 (file)
index 0000000..1ba1431
--- /dev/null
@@ -0,0 +1,176 @@
+/*
+Right-to-left fixes for Simple.
+Places sidebar on right, tweaks various alignment issues.
+
+Works mostly ok nicely on Safari 1.2.1; fine in Mozilla.
+
+Safari bugs (1.2.1):
+* Tabs are still appearing in left-to-right order. (Try after localizing)
+
+Opera bugs (7.23 linux):
+* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other
+
+IE/mac bugs:
+* The thing barfs on Hebrew and Arabic anyway, so no point testing.
+
+Missing features due to lack of support:
+* external link icons
+
+To test:
+* Opera6
+* IE 5.0
+* etc
+
+*/
+body {
+       direction: rtl;
+       unicode-bidi: embed;
+}
+#column-content {
+       margin: 0 -12.2em 0 0;
+       float: left;
+}
+#column-content #content{
+       margin-left: 0;
+       margin-right: 12.2em;
+       border-right: 1px solid #aaaaaa;
+       border-left: none;
+}
+html>body .portlet {
+       float: right;
+       clear: right;
+}
+.editsection {
+       float: left;
+       margin-right: 5px;
+       margin-left: 0; /* bug 9122: undo default LTR */
+}
+/* recover IEMac (might be fine with the float, but usually it's close to IE */
+*>body .portlet {
+       float: none;
+       clear: none;
+}
+.pBody {
+       padding: 0 0.5em 0.3em 0.8em;
+}
+
+/* Fix alignment */
+.documentByLine,
+.portletDetails,
+.portletMore {
+       text-align: left;
+}
+
+div div.thumbcaption {
+       text-align: right;
+}
+
+div.magnify,
+#p-logo {
+       left: auto;
+       right: 0;
+}
+
+/* Fix margins for non-css2 browsers */
+/* top right bottom left */
+
+dd {
+       margin-left: 0;
+       margin-right: 1.6em;
+}
+#contentSub {
+       margin-right: 1em;
+       margin-left: 0;
+}
+.tocindent {
+       margin-left: 0;
+       margin-right: 2em;
+}
+div.tright, div.floatright, table.floatright {
+       clear: none;
+}
+div.tleft, div.floatleft, table.floatleft {
+       clear: left;
+}
+
+/* Fix link icons */
+.external {
+       padding: 0 !important;
+       background: none !important;
+}
+#footer {
+       clear: both;
+}
+* html #footer {
+       margin-left: 0;
+       margin-right: 13.6em;
+       border-left: 0;
+       border-right: 1px solid #fabd23;
+} 
+* html #column-content { 
+       float: none;
+       margin-left: 0;
+       margin-right: 0;
+}
+* html #column-content #content {
+       margin-left: 0;
+       margin-top: 3em;
+}
+* html #column-one { right: 0; }
+
+/* js pref toc */
+
+#preftoc {
+       margin-right: 1em;
+}
+
+.errorbox, .successbox, #preftoc li, .prefsection fieldset {
+       float: right;
+}
+
+.prefsection {
+       padding-right: 2em;
+}
+
+/* workaround for moz bug, displayed bullets on left side */
+
+#toc ul {
+       text-align: right;
+}
+
+#toc ul ul {
+       margin: 0 2em 0 0;
+}
+
+input#wpSave, input#wpDiff {
+       margin-right: 0;
+       margin-left: .33em;
+}
+
+#userlogin {
+       float: right;
+       margin: 0 0 1em 3em;
+}
+/* Convenience links to edit block, delete and protect reasons */
+p.mw-ipb-conveniencelinks, p.mw-protect-editreasons,
+p.mw-filedelete-editreasons, p.mw-delete-editreasons {
+       float: left;
+}
+
+.toggle {
+       margin-left: 0em;
+       margin-right: 2em;
+}
+table.filehistory th {
+       text-align: right;
+}
+
+/**
+ * Lists:
+ * The following lines don't have a visible effect on non-Gecko browsers
+ * They fix a problem ith Gecko browsers rendering lists to the right of
+ * left-floated objects in an RTL layout.
+ */
+html > body div#bodyContent ul {
+       display: table;
+}