diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 18:12:39 +0000 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2006-10-11 18:12:39 +0000 |
commit | 183851b06bd6c52f3cae5375f433da720d410447 (patch) | |
tree | a477257decbf3360127f6739c2f9d0ec57a03d39 /skins |
MediaWiki 1.7.1 wiederhergestellt
Diffstat (limited to 'skins')
162 files changed, 11437 insertions, 0 deletions
diff --git a/skins/ArchLinux.deps.php b/skins/ArchLinux.deps.php new file mode 100644 index 00000000..8a78ae6b --- /dev/null +++ b/skins/ArchLinux.deps.php @@ -0,0 +1,9 @@ +<?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://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html + +require_once('includes/SkinTemplate.php'); +?>
\ No newline at end of file diff --git a/skins/ArchLinux.php b/skins/ArchLinux.php new file mode 100644 index 00000000..df9f66a8 --- /dev/null +++ b/skins/ArchLinux.php @@ -0,0 +1,283 @@ +<?php +/** + * ArchLinux nouveau + * + * Translated from gwicke's previous TAL template version to remove + * dependency on PHPTAL. + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once('includes/SkinTemplate.php'); + +/** + * Inherit main code from SkinTemplate, set the CSS and template filter. + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinArchLinux extends SkinTemplate { + /** Using archlinux. */ + function initPage( &$out ) { + SkinTemplate::initPage( $out ); + $this->skinname = 'archlinux'; + $this->stylename = 'archlinux'; + $this->template = 'ArchLinuxTemplate'; + } +} + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class ArchLinuxTemplate extends QuickTemplate { + /** + * Template filter callback for ArchLinux 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() { + // 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="http://www.w3.org/1999/xhtml" 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>archlinux.de :: <?php $this->text('pagetitle') ?></title> + <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?9"; /*]]>*/</style> + <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" /> + <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> + <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> + <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]--> + <!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?1";</style><![endif]--> + <!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> + <meta http-equiv="imagetoolbar" content="no" /><![endif]--> + <style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/archlinux.css";</style> + <script type="<?php $this->text('jsmimetype') ?>">var skin = '<?php $this->text('skinname')?>';var stylepath = '<?php $this->text('stylepath')?>';</script> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?1"><!-- wikibits js --></script> +<?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 Scripts --> + <?php $this->html('headscripts') ?> + <link rel="shortcut icon" href="favicon.ico" /> + </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="<?php $this->text('nsclass') ?> <?php $this->text('dir') ?>"> + + <?php if (empty($_REQUEST['printable'])) {?> + <div id="head_container"> + <div id="title"> + <div id="logo"><img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/logo.png" alt="Arch logo" /></div> + <img src="<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/title.png" alt="Arch linux" /> + </div> + <div id="main_nav"> + <ul> + <li><a href="http://wiki.archlinux.de/?title=Download">Dateien</a></li> + <li><a href="http://wiki.archlinux.de/?title=AUR">AUR</a></li> + <li><a href="http://wiki.archlinux.de/?title=Bugs">Bugs</a></li> + <li class="selected"><a href="#">Wiki</a></li> + <li><a href="http://www.laber-land.de/?page=Forums;id=20">Forum</a></li> + <li><a href="http://www.archlinux.de">Start</a></li> + </ul> + </div> + </div> + <div style="clear:both;background-image:url(FunnyDotImage.php);background-repeat:no-repeat;visibility:hidden;"> </div> + <?php } ?> + + <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 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->text('title'):$this->html('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']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> + <!-- end content --> + <div class="visualClear"></div> + </div> + </div> + </div> + <div id="column-one"> + <div id="p-cactions" class="portlet"> + <h5><?php $this->msg('views') ?></h5> + <ul> +<?php foreach($this->data['content_actions'] as $key => $tab) { ?> + <li id="ca-<?php echo htmlspecialchars($key) ?>"<?php + if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php } + ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php + echo htmlspecialchars($tab['text']) ?></a></li> +<?php } ?> + </ul> + </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="pt-<?php echo htmlspecialchars($key) ?>"<?php + if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php + echo htmlspecialchars($item['href']) ?>"<?php + if(!empty($item['class'])) { ?> class="<?php + echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php + echo htmlspecialchars($item['text']) ?></a></li> +<?php } ?> + </ul> + </div> + </div> + + <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> + <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> + <div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'> + <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5> + <div class='pBody'> + <ul> +<?php foreach($cont as $key => $val) { ?> + <li id="<?php echo htmlspecialchars($val['id']) ?>"<?php + if ( $val['active'] ) { ?> class="active" <?php } + ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text']) ?></a></li> +<?php } ?> + </ul> + </div> + </div> + <?php } ?> + <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 + if($this->haveMsg('accesskey-search')) { + ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } + if( isset( $this->data['search'] ) ) { + ?> value="<?php $this->text('search') ?>"<?php } ?> /> + <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('go') ?>" /> + <input type='submit' name="fulltext" class="searchButton" value="<?php $this->msg('search') ?>" /> + </div></form> + </div> + </div> + <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 $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 $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 $this->msg('trackbacklink') ?></a></li> +<?php } + if($this->data['feeds']) { ?> + <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) { + ?><span id="feed-<?php echo htmlspecialchars($key) ?>"><a href="<?php + echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a> </span> + <?php } ?></li><?php + } + + foreach( array('contributions', '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 $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 $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 $this->msg('permalink') ?></a></li><?php + } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> + <li id="t-ispermalink"><?php $this->msg('permalink') ?></li><?php + } + + wfRunHooks( 'ArchLinuxTemplateToolboxEnd', array( &$this ) ); +?> + </ul> + </div> + </div> +<?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> + </div> +<?php } ?> + </div><!-- end of the left (by default at least) column --> + <div class="visualClear"></div> + <div id="footer"> + <ul id="f-list"> +<?php + $footerlinks = array( + 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', 'tagline', + ); + foreach( $footerlinks as $aLink ) { + if( $this->data[$aLink] ) { +?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> +<?php } + } +?> + </ul> + </div> + <script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script> +</div> +<?php $this->html('reporttime') ?> + +</body></html> +<?php + wfRestoreWarnings(); + } // end of execute() method +} // end of class +?> diff --git a/skins/Chick.deps.php b/skins/Chick.deps.php new file mode 100644 index 00000000..273ac18b --- /dev/null +++ b/skins/Chick.deps.php @@ -0,0 +1,10 @@ +<?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://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html + +require_once('includes/SkinTemplate.php'); +require_once('MonoBook.php'); +?>
\ No newline at end of file diff --git a/skins/Chick.php b/skins/Chick.php new file mode 100644 index 00000000..d5a4a080 --- /dev/null +++ b/skins/Chick.php @@ -0,0 +1,30 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once('MonoBook.php'); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinChick extends SkinTemplate { + function initPage( &$out ) { + SkinTemplate::initPage( $out ); + $this->skinname = 'chick'; + $this->stylename = 'chick'; + $this->template = 'MonoBookTemplate'; + } +} + +?> diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php new file mode 100644 index 00000000..b5f7c917 --- /dev/null +++ b/skins/CologneBlue.php @@ -0,0 +1,315 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinCologneBlue extends Skin { + + function getStylesheet() { + return "common/cologneblue.css?2"; + } + 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->makeKnownLink( wfMsgForContent( "mainpage" ) ) . " | " + . $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 doGetUserStyles() { + global $wgOut; + $s = parent::doGetUserStyles(); + $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->makeKnownLink( wfMsgForContent( "mainpage" ), wfMsg( "mainpage" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ) + . " | " . + $this->specialLink( "specialpages" ) . " | "; + + if ( $wgUser->isLoggedIn() ) { + $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q ); + } else { + $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q ); + } + + /* show links to different language variants */ + global $wgDisableLangConversion; + $variants = $wgContLang->getVariants(); + if( !$wgDisableLangConversion && sizeof( $variants ) > 1 ) { + $actstr = ''; + foreach( $variants as $code ) { + $varname = $wgContLang->getVariantname( $code ); + if( $varname == 'disable' ) + continue; + $s .= ' | <a href="' . $wgTitle->getLocalUrl( 'variant=' . $code ) . '">' . $varname . '</a>'; + } + } + + 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(); + $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( Title::makeTitle( NS_SPECIAL, "Contributions" ), + wfMsg( "mycontris" ), "target=" . wfUrlencode($wgUser->getName() ) ) + . $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" ) + . $sep . $this->bugReportsLink(); + 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( + Title::makeTitle( NS_SPECIAL, '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=\"search\" method=\"get\" class=\"inline\" action=\"$action\">"; + if ( "" != $label ) { $s .= "{$label}: "; } + + $s .= "<input type='text' name=\"search\" size='14' value=\"" + . htmlspecialchars(substr($search,0,256)) . "\" />" + . "<br /><input type='submit' name=\"go\" value=\"" . htmlspecialchars( wfMsg( "go" ) ) . "\" /> <input type='submit' name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" /></form>"; + + return $s; + } +} + +?> diff --git a/skins/MonoBook.deps.php b/skins/MonoBook.deps.php new file mode 100644 index 00000000..8a78ae6b --- /dev/null +++ b/skins/MonoBook.deps.php @@ -0,0 +1,9 @@ +<?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://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html + +require_once('includes/SkinTemplate.php'); +?>
\ No newline at end of file diff --git a/skins/MonoBook.php b/skins/MonoBook.php new file mode 100644 index 00000000..c80700d0 --- /dev/null +++ b/skins/MonoBook.php @@ -0,0 +1,275 @@ +<?php +/** + * MonoBook nouveau + * + * Translated from gwicke's previous TAL template version to remove + * dependency on PHPTAL. + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once('includes/SkinTemplate.php'); + +/** + * Inherit main code from SkinTemplate, set the CSS and template filter. + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinMonoBook extends SkinTemplate { + /** Using monobook. */ + function initPage( &$out ) { + SkinTemplate::initPage( $out ); + $this->skinname = 'monobook'; + $this->stylename = 'monobook'; + $this->template = 'MonoBookTemplate'; + } +} + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class MonoBookTemplate extends QuickTemplate { + /** + * 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() { + // 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="http://www.w3.org/1999/xhtml" xml:lang="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>"> + <head> + <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" /> + <?php $this->html('headlinks') ?> + <title><?php $this->text('pagetitle') ?></title> + <style type="text/css" media="screen,projection">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/main.css?9"; /*]]>*/</style> + <link rel="stylesheet" type="text/css" <?php if(empty($this->data['printable']) ) { ?>media="print"<?php } ?> href="<?php $this->text('stylepath') ?>/common/commonPrint.css" /> + <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> + <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> + <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]--> + <!--[if IE 7]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE70Fixes.css?1";</style><![endif]--> + <!--[if lt IE 7]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> + <meta http-equiv="imagetoolbar" content="no" /><![endif]--> + <script type="<?php $this->text('jsmimetype') ?>">var skin = '<?php $this->text('skinname')?>';var stylepath = '<?php $this->text('stylepath')?>';</script> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js?1"><!-- wikibits js --></script> +<?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 Scripts --> + <?php $this->html('headscripts') ?> + </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="<?php $this->text('nsclass') ?> <?php $this->text('dir') ?>"> + <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 class="firstHeading"><?php $this->data['displaytitle']!=""?$this->text('title'):$this->html('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']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> + <!-- end content --> + <div class="visualClear"></div> + </div> + </div> + </div> + <div id="column-one"> + <div id="p-cactions" class="portlet"> + <h5><?php $this->msg('views') ?></h5> + <ul> +<?php foreach($this->data['content_actions'] as $key => $tab) { ?> + <li id="ca-<?php echo htmlspecialchars($key) ?>"<?php + if($tab['class']) { ?> class="<?php echo htmlspecialchars($tab['class']) ?>"<?php } + ?>><a href="<?php echo htmlspecialchars($tab['href']) ?>"><?php + echo htmlspecialchars($tab['text']) ?></a></li> +<?php } ?> + </ul> + </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="pt-<?php echo htmlspecialchars($key) ?>"<?php + if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php + echo htmlspecialchars($item['href']) ?>"<?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 + ?>title="<?php $this->msg('mainpage') ?>"></a> + </div> + <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> + <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> + <div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'> + <h5><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo $bar; else echo $out; ?></h5> + <div class='pBody'> + <ul> +<?php foreach($cont as $key => $val) { ?> + <li id="<?php echo htmlspecialchars($val['id']) ?>"<?php + if ( $val['active'] ) { ?> class="active" <?php } + ?>><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text']) ?></a></li> +<?php } ?> + </ul> + </div> + </div> + <?php } ?> + <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 + if($this->haveMsg('accesskey-search')) { + ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } + if( isset( $this->data['search'] ) ) { + ?> value="<?php $this->text('search') ?>"<?php } ?> /> + <input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('go') ?>" /> + <input type='submit' name="fulltext" class="searchButton" value="<?php $this->msg('search') ?>" /> + </div></form> + </div> + </div> + <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 $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 $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 $this->msg('trackbacklink') ?></a></li> +<?php } + if($this->data['feeds']) { ?> + <li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) { + ?><span id="feed-<?php echo htmlspecialchars($key) ?>"><a href="<?php + echo htmlspecialchars($feed['href']) ?>"><?php echo htmlspecialchars($feed['text'])?></a> </span> + <?php } ?></li><?php + } + + foreach( array('contributions', '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 $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 $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 $this->msg('permalink') ?></a></li><?php + } elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?> + <li id="t-ispermalink"><?php $this->msg('permalink') ?></li><?php + } + + wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) ); +?> + </ul> + </div> + </div> +<?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> + </div> +<?php } ?> + </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 +?> + <ul id="f-list"> +<?php + $footerlinks = array( + 'lastmod', 'viewcount', 'numberofwatchingusers', 'credits', 'copyright', + 'privacy', 'about', 'disclaimer', 'tagline', + ); + foreach( $footerlinks as $aLink ) { + if( $this->data[$aLink] ) { +?> <li id="<?php echo$aLink?>"><?php $this->html($aLink) ?></li> +<?php } + } +?> + </ul> + </div> + <script type="text/javascript"> if (window.runOnloadHook) runOnloadHook();</script> +</div> +<?php $this->html('reporttime') ?> + +</body></html> +<?php + wfRestoreWarnings(); + } // end of execute() method +} // end of class +?> diff --git a/skins/MySkin.deps.php b/skins/MySkin.deps.php new file mode 100644 index 00000000..ea0455f2 --- /dev/null +++ b/skins/MySkin.deps.php @@ -0,0 +1,10 @@ +<?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://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html + +require_once('includes/SkinTemplate.php'); +require_once('MonoBook.php'); +?>
\ No newline at end of file diff --git a/skins/MySkin.php b/skins/MySkin.php new file mode 100644 index 00000000..cb24fdc4 --- /dev/null +++ b/skins/MySkin.php @@ -0,0 +1,30 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once('MonoBook.php'); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinMySkin extends SkinTemplate { + function initPage( &$out ) { + SkinTemplate::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 index 00000000..1b54aab9 --- /dev/null +++ b/skins/Nostalgia.php @@ -0,0 +1,93 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinNostalgia extends Skin { + + function getStylesheet() { + return 'common/nostalgia.css?1'; + } + function getSkinName() { + return "nostalgia"; + } + + function doBeforeContent() { + + $s = "\n<div id='content'>\n<div id='topbar'>"; + $s .= $this->logoText( "right" ); + + $s .= $this->pageTitle(); + $s .= $this->pageSubtitle() . "\n"; + + $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' /><hr />\n</div>\n"; + $s .= "\n<div id='article'>"; + + return $s; + } + + function topLinks() { + global $wgOut, $wgUser; + $sep = " |\n"; + + $s = $this->mainPageLink() . $sep + . $this->specialLink( "recentchanges" ); + + if ( $wgOut->isArticle() ) { + $s .= $sep . $this->editThisPage() + . $sep . $this->historyLink(); + } + if ( $wgUser->isAnon() ) { + $s .= $sep . $this->specialLink( "userlogin" ); + } else { + $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 index 00000000..ffc51557 --- /dev/null +++ b/skins/Simple.deps.php @@ -0,0 +1,10 @@ +<?php +// This file exists to ensure that base classes are preloaded before +// Simple.php is compiled, working around a bug in the APC opcode +// cache on PHP 5, where cached code can break if the include order +// changed on a subsequent page view. +// see http://mail.wikipedia.org/pipermail/wikitech-l/2006-January/033660.html + +require_once('includes/SkinTemplate.php'); +require_once('MonoBook.php'); +?>
\ No newline at end of file diff --git a/skins/Simple.php b/skins/Simple.php new file mode 100644 index 00000000..d1ebd7d9 --- /dev/null +++ b/skins/Simple.php @@ -0,0 +1,70 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once('MonoBook.php'); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinSimple extends SkinTemplate { + function initPage( &$out ) { + SkinTemplate::initPage( $out ); + $this->skinname = 'simple'; + $this->stylename = 'simple'; + $this->template = 'MonoBookTemplate'; + } + + function reallyDoGetUserStyles() { + 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 index 00000000..c011c143 --- /dev/null +++ b/skins/Skin.sample @@ -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/SkinPHPTal.sample b/skins/SkinPHPTal.sample new file mode 100644 index 00000000..683c2080 --- /dev/null +++ b/skins/SkinPHPTal.sample @@ -0,0 +1,28 @@ +<?php +require_once('includes/SkinPHPTal.php'); + +# Test if PHPTal is enabled. If not MediaWiki will load the 'standard' skin +# which doesnt use PHPTal +if( class_exists( 'SkinPHPTal' ) ) { + + # Your class extension is defined there. + # + # The class name MUST begin with 'Skin' and the rest is the name of the file + # excluding '.php' + # This file is named SkinPHPTal.sample (but it should end with php). So the + # class name will be 'Skin' . 'SkinPHPTal' + + class SkinSkinPHPTal extends SkinPHPTal { + function initPage( &$out ) { + SkinPHPTal::initPage( $out ); + $this->skinname = 'name of your skin all lower case'; + $this->template = 'phptal template used do not put the .pt'; + } + + # Override method below + # + + } + +} +?> diff --git a/skins/Standard.php b/skins/Standard.php new file mode 100644 index 00000000..8140b7d6 --- /dev/null +++ b/skins/Standard.php @@ -0,0 +1,294 @@ +<?php +/** + * See skin.txt + * + * @todo document + * @package MediaWiki + * @subpackage Skins + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinStandard extends Skin { + + /** + * + */ + function getHeadScripts() { + global $wgStylePath, $wgJsMimeType; + + $s = parent::getHeadScripts(); + if ( 3 == $this->qbSetting() ) { # Floating left + $s .= "<script language='javascript' type='$wgJsMimeType' " . + "src='{$wgStylePath}/common/sticky.js'></script>\n"; + } + return $s; + } + + /** + * + */ + function getUserStyles() { + global $wgStylePath; + $s = ''; + if ( 3 == $this->qbSetting() ) { # Floating left + $s .= "<style type='text/css'>\n" . + "@import '{$wgStylePath}/common/quickbar.css';\n</style>\n"; + } else if ( 4 == $this->qbSetting() ) { # Floating right + $s .= "<style type='text/css'>\n" . + "@import '{$wgStylePath}/common/quickbar-right.css';\n</style>\n"; + } + $s .= parent::getUserStyles(); + return $s; + } + + /** + * + */ + function doGetUserStyles() { + global $wgStylePath; + + $s = parent::doGetUserStyles(); + $qb = $this->qbSetting(); + + if ( 2 == $qb ) { # Right + $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . + "border-left: 2px solid #000000; }\n" . + "#article { 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 { margin-left: 152px; margin-right: 4px; }\n"; + } else if ( 4 == $qb) { + $s .= "#quickbar { border-right: 1px solid gray; }\n" . + "#article { 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(); + $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 0: + $text = wfMsg('articlepage'); + break; + case 1: + $text = wfMsg('viewtalkpage'); + break; + case 2: + $text = wfMsg('userpage'); + break; + case 3: + $text = wfMsg('viewtalkpage'); + break; + case 4: + $text = wfMsg('projectpage'); + break; + case 5: + $text = wfMsg('viewtalkpage'); + break; + case 6: + $text = wfMsg('imagepage'); + break; + case 7: + $text = wfMsg('viewtalkpage'); + 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§ion=new' ); + + #if( $tns%2 && $action!='edit' && !$wpPreview) { + #$s.= '<br />'.$this->makeKnownLink($wgTitle->getPrefixedText(),wfMsg('postcomment'),'action=edit§ion=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->userCanEdit() ) + $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' ) + . $sep . $this->bugReportsLink(); + + 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/archlinux/IE50Fixes.css b/skins/archlinux/IE50Fixes.css new file mode 100644 index 00000000..027e32ed --- /dev/null +++ b/skins/archlinux/IE50Fixes.css @@ -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/archlinux/IE55Fixes.css b/skins/archlinux/IE55Fixes.css new file mode 100644 index 00000000..637daae1 --- /dev/null +++ b/skins/archlinux/IE55Fixes.css @@ -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/archlinux/IE60Fixes.css b/skins/archlinux/IE60Fixes.css new file mode 100644 index 00000000..6b646c70 --- /dev/null +++ b/skins/archlinux/IE60Fixes.css @@ -0,0 +1,84 @@ +/* 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; +} +/*{ border:1px solid Red !important;}*/ + diff --git a/skins/archlinux/IE70Fixes.css b/skins/archlinux/IE70Fixes.css new file mode 100644 index 00000000..2a2c9c77 --- /dev/null +++ b/skins/archlinux/IE70Fixes.css @@ -0,0 +1,75 @@ +/* 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. + */ + padding-top: 0; +} +.rtl #column-one #p-navigation { + 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/archlinux/IEMacFixes.css b/skins/archlinux/IEMacFixes.css new file mode 100644 index 00000000..f1b05719 --- /dev/null +++ b/skins/archlinux/IEMacFixes.css @@ -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/archlinux/KHTMLFixes.css b/skins/archlinux/KHTMLFixes.css new file mode 100644 index 00000000..97fba0c4 --- /dev/null +++ b/skins/archlinux/KHTMLFixes.css @@ -0,0 +1,3 @@ +/* KHTML fix stylesheet */ +/* work around the horizontal scrollbars */ +#column-content { margin-left: 0; } diff --git a/skins/archlinux/Opera6Fixes.css b/skins/archlinux/Opera6Fixes.css new file mode 100644 index 00000000..88704739 --- /dev/null +++ b/skins/archlinux/Opera6Fixes.css @@ -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/archlinux/Opera7Fixes.css b/skins/archlinux/Opera7Fixes.css new file mode 100644 index 00000000..446ea44c --- /dev/null +++ b/skins/archlinux/Opera7Fixes.css @@ -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/archlinux/archlinux.css b/skins/archlinux/archlinux.css new file mode 100644 index 00000000..eede2680 --- /dev/null +++ b/skins/archlinux/archlinux.css @@ -0,0 +1,45 @@ +#head_container {margin: 0; padding: 0; height: 140px;} + +#main_nav ul { + list-style: none; + margin: 0; + padding: 20px; + padding-right: 10px; + padding-top: 48px; +} + +#main_nav ul li { + display: block; + float: right; + width: 67px; + height: 20px; + margin: 0; + padding-top: 2px; + margin-left: 3px; + background: url("tab.png") repeat-x bottom left #fbf8f1; + text-align: center; + font-size: 13px; +} + +#main_nav ul li[class~=selected] { + background: #fbf8f1; +} + +#main_nav ul li a { +color: #35526f; + font-weight: bold; + text-decoration: none; +} + + + +#title {margin: 0; padding: 0; + height: 140px; + float: left; +} + +#logo {margin: 0; padding: 0; + float: left; + width: 140px; + height: 140px; +}
\ No newline at end of file diff --git a/skins/archlinux/bullet.gif b/skins/archlinux/bullet.gif Binary files differnew file mode 100644 index 00000000..b43de48a --- /dev/null +++ b/skins/archlinux/bullet.gif diff --git a/skins/archlinux/discussionitem_icon.gif b/skins/archlinux/discussionitem_icon.gif Binary files differnew file mode 100644 index 00000000..baec471a --- /dev/null +++ b/skins/archlinux/discussionitem_icon.gif diff --git a/skins/archlinux/external.png b/skins/archlinux/external.png Binary files differnew file mode 100644 index 00000000..419c06fb --- /dev/null +++ b/skins/archlinux/external.png diff --git a/skins/archlinux/file_icon.gif b/skins/archlinux/file_icon.gif Binary files differnew file mode 100644 index 00000000..847f6485 --- /dev/null +++ b/skins/archlinux/file_icon.gif diff --git a/skins/archlinux/headbg.jpg b/skins/archlinux/headbg.jpg Binary files differnew file mode 100644 index 00000000..5491c6e4 --- /dev/null +++ b/skins/archlinux/headbg.jpg diff --git a/skins/archlinux/link_icon.gif b/skins/archlinux/link_icon.gif Binary files differnew file mode 100644 index 00000000..815ccb1b --- /dev/null +++ b/skins/archlinux/link_icon.gif diff --git a/skins/archlinux/lock_icon.gif b/skins/archlinux/lock_icon.gif Binary files differnew file mode 100644 index 00000000..8a87e283 --- /dev/null +++ b/skins/archlinux/lock_icon.gif diff --git a/skins/archlinux/logo.png b/skins/archlinux/logo.png Binary files differnew file mode 100644 index 00000000..b2b6d863 --- /dev/null +++ b/skins/archlinux/logo.png diff --git a/skins/archlinux/magnify-clip.png b/skins/archlinux/magnify-clip.png Binary files differnew file mode 100644 index 00000000..992aa2e3 --- /dev/null +++ b/skins/archlinux/magnify-clip.png diff --git a/skins/archlinux/mail_icon.gif b/skins/archlinux/mail_icon.gif Binary files differnew file mode 100644 index 00000000..50a87a9a --- /dev/null +++ b/skins/archlinux/mail_icon.gif diff --git a/skins/archlinux/main.css b/skins/archlinux/main.css new file mode 100644 index 00000000..fa382299 --- /dev/null +++ b/skins/archlinux/main.css @@ -0,0 +1,1450 @@ +/* +** 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: 0.3em 0 0 12.2em; + padding: 0 1em 1.5em 1em; + background: white; + color: black; + border: 1px solid #8faecd; + border-right: none; + line-height: 1.5em; + position: relative; + z-index: 2; +} +#column-one { + padding-top: 0; +} +/* 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 { + background: url("title_back.png") repeat-x top left #fbf8f1; + padding: 0px 30px; + margin: 0; + color: #46494d; + font-family: sans-serif; + font-size:10px; +} + +/* scale back up to a sane default */ +#globalWrapper { + font-size: 127%; + width: 100%; + margin: 0; + padding: 0; +} +.visualClear { + clear: both; +} + +/* general styles */ + +table { + background: white; + font-size: 100%; + color: black; +} +a { + text-decoration: none; + color: #35526f; + 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: #8faecd; + background-color: #8faecd; + border: 0; + margin: .2em 0 .2em 0; +} + +h1, h2, h3, h4, h5, h6 { + color: #35526f; + background: none; + font-weight: normal; + margin: 0; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px dotted #8faecd; +} +h1 { font-size: 188%; } +h2 { font-size: 150%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 0 0 1.5em; + padding: 0; +/* color:#8faecd; */ +/* 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 #8faecd; + margin: 1em 0 1em 0; + padding: 0 1em 1em; + line-height: 1.5em; +} +legend { + background: white; + 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 #8faecd; + 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; +} + +/* user notification thing */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #8faecd; + 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; +} +.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 #8faecd; + 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; + 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.thumb div { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +div.thumb div a img { + border: 1px solid #ccc; +} +div.thumb div div.thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: .3em 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: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} + +.hiddenStructure { + display: none; + speak: none; +} +img.tex { + vertical-align: middle; +} +span.texhtml { + font-family: serif; +} + +/* +** 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%; +} +div.townBox { + position: relative; + float: right; + background: white; + margin-left: 1em; + border: 1px solid gray; + padding: .3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 .3em; + font-size: 96%; +} +div.townBox dl dt { + background: none; + margin: .4em 0 0; +} +div.townBox dl dd { + margin: .1em 0 0 1.1em; + background-color: #f3f3f3; +} + +/* +** edit views etc +*/ +.special li { + line-height: 1.4em; + margin: 0; + padding: 0; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { + color: gray; +} +#pagehistory span.user { + margin-left: 1.4em; + margin-right: .4em; +} +#pagehistory span.minor { + font-weight: bold; +} +#pagehistory li { + border: 1px solid white; +} +#pagehistory li.selected { + background-color: #f9f9f9; + border: 1px dashed #aaa; +} + +/* +** Diff rendering +*/ +table.diff, td.diff-otitle, td.diff-ntitle { + background-color: white; +} +td.diff-addedline { + background: #cfc; + font-size: smaller; +} +td.diff-deletedline { + background: #ffa; + font-size: smaller; +} +td.diff-context { + background: #eee; + font-size: smaller; +} +span.diffchange { + color: red; + font-weight: bold; +} + +/* +** 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://"], +.link-irc { + background: url(discussionitem_icon.gif) center right no-repeat; + padding-right: 18px; +} +/* 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 #8faecd; + 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: #e1e3e6; + color: #46494d; + border-collapse: collapse; + border: 1px solid #8faecd; + 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 { + z-index: 3; + position: absolute; /*needed to use z-index */ + top: 0; + left: 0; + 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; +} + +/* +** the navigation portlet +*/ + +#p-navigation { + position: relative; + z-index: 3; +} + +#p-navigation .pBody { + padding-right: 0; +} + +#p-navigation a { + display: block; +} + +#p-navigation li.active a, #p-navigation li.active a:hover { + text-decoration: none; + display: inline; + font-weight: bold; +} + + +/* +** 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 { + width: 100%; + white-space: nowrap; + padding: 0; + margin: 0; + position: absolute; + left: 0; + top: 80px; + z-index: 0; + border: none; + background: none; + overflow: visible; + line-height: 1.2em; +} + +#p-personal h5 { + display: none; +} +#p-personal .portlet, +#p-personal .pBody { + padding: 0; + margin: 0; + border: none; + z-index: 0; + 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; + text-transform: lowercase; + 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.active { + font-weight: bold; +} +#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; +} + +/* +** the page-related actions- page/talk, edit etc +*/ +#p-cactions { + position: absolute; + top: 137px; + left: 14.5em; + margin: 0; + white-space: nowrap; + width: 76%; + line-height: 1px; + overflow: visible; + background: none; + border-collapse: collapse; + padding-left: 1em; + list-style: none; + font-size: 95%; +} +#p-cactions .hiddenStructure { + display: none; +} +#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; + text-decoration: none; + text-transform: lowercase; + position: relative; + z-index: 0; + margin: 0; +} +#p-cactions li.selected a { + z-index: 3; + background-color: #fff; + padding: 0 1em .2em!important; +} +#p-cactions .new a { + color: #ba0000; +} +#p-cactions li a:hover { + z-index: 3; + text-decoration: none; + background-color: #fff; +} +#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; +} + +/* +** the remaining portlets +*/ +#p-tbx, +#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: #f6efe0; + border-top: 1px solid #eee4cb; + border-bottom: 1px solid #eee4cb; + 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; +} +/* hide from incapable browsers */ +head:first-child+body #footer li { white-space: nowrap; } +#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 { + margin: 1px -2px 1px 2px; + float: left; + padding: 2px 0 3px 0; + background-color: #f0f0f0; + color: #000; + 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: 95%; + margin-top: 0; + background-color: #FFC1C1; + padding: .2em .7em; + clear: both; +} +.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; +} + +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 { + border: 1px solid #bbb; + padding: 1.5em 2em; + width: 400px; + background-color: white; +} + + +#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 { + font-size: 75%; + text-align: right; +} +span.newpage, span.minor, span.searchmatch, span.bot { + font-weight: bold; +} +span.unpatrolled { + font-weight: bold; + color: red; +} + +span.searchmatch { + color: red; +} +.sharedUploadNotice { + font-style: italic; +} + +span.updatedmarker { + color: black; + background-color: #0f0; +} +span.newpageletter { + font-weight: bold; + color: black; + background-color: yellow; +} +span.minoreditletter { + color: black; + background-color: #c5ffe6; +} + +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; +} + +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +} + +div.gallerybox { + margin: 2px; + width: 150px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; +} + +div.gallerytext { + 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; +} + +li span.deleted, span.history-deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +.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; +} + +/* @bug 1714 */ +input#wpSave, input#wpDiff { + margin-right: 0.33em; +} + +#editform .editOptions { + display: inline; +} + +#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"; +} + diff --git a/skins/archlinux/news_icon.png b/skins/archlinux/news_icon.png Binary files differnew file mode 100644 index 00000000..dd1541d1 --- /dev/null +++ b/skins/archlinux/news_icon.png diff --git a/skins/archlinux/required.gif b/skins/archlinux/required.gif Binary files differnew file mode 100644 index 00000000..bd719769 --- /dev/null +++ b/skins/archlinux/required.gif diff --git a/skins/archlinux/rtl.css b/skins/archlinux/rtl.css new file mode 100644 index 00000000..91e2fb37 --- /dev/null +++ b/skins/archlinux/rtl.css @@ -0,0 +1,212 @@ +/* +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: bidi-override;*/ + 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; +} +/* 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, +#div.townBox, +#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; +} +div.townBox { + margin-left: 0; + margin-right: 1em; +} +div.townBox dl dd { + margin-left: 0; + margin-right: 1.1em; +} +#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; +} diff --git a/skins/archlinux/tab.png b/skins/archlinux/tab.png Binary files differnew file mode 100644 index 00000000..56d2e617 --- /dev/null +++ b/skins/archlinux/tab.png diff --git a/skins/archlinux/title.png b/skins/archlinux/title.png Binary files differnew file mode 100644 index 00000000..2adaee1b --- /dev/null +++ b/skins/archlinux/title.png diff --git a/skins/archlinux/title_back.png b/skins/archlinux/title_back.png Binary files differnew file mode 100644 index 00000000..95c98d7a --- /dev/null +++ b/skins/archlinux/title_back.png diff --git a/skins/archlinux/user.gif b/skins/archlinux/user.gif Binary files differnew file mode 100644 index 00000000..bc934396 --- /dev/null +++ b/skins/archlinux/user.gif diff --git a/skins/archlinux/wiki-indexed.png b/skins/archlinux/wiki-indexed.png Binary files differnew file mode 100644 index 00000000..189a2ae3 --- /dev/null +++ b/skins/archlinux/wiki-indexed.png diff --git a/skins/archlinux/wiki.png b/skins/archlinux/wiki.png Binary files differnew file mode 100644 index 00000000..69fce988 --- /dev/null +++ b/skins/archlinux/wiki.png diff --git a/skins/chick/IE50Fixes.css b/skins/chick/IE50Fixes.css new file mode 100644 index 00000000..dd9eda3e --- /dev/null +++ b/skins/chick/IE50Fixes.css @@ -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 index 00000000..2f785612 --- /dev/null +++ b/skins/chick/IE55Fixes.css @@ -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 index 00000000..feec15f1 --- /dev/null +++ b/skins/chick/IE60Fixes.css @@ -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 index 00000000..5d3d15bd --- /dev/null +++ b/skins/chick/main.css @@ -0,0 +1,481 @@ +/* +** 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; +} +h1 { font-size: 188%; } +h2 { font-size: 150%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +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; +} +p.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; + 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; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; +} + +.hiddenStructure { + display: none; +} +img.tex { vertical-align: middle; } +span.texhtml { font-family: serif; } + +/* +** 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%; +} +div.townBox { + position:relative; + float:right; + background:White; + margin-left:1em; + border: 1px solid gray; + padding:0.3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 0.3em 0; + font-size: 96%; +} +div.townBox dl dt { + background: none; + margin: 0.4em 0 0 0; +} +div.townBox dl dd { + margin: 0.1em 0 0 1.1em; + background-color: #f3f3f3; +} + +/* +** edit views etc +*/ +.special li { + line-height: 1.4em; + margin: 0; + padding: 0; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { color: gray; } +#pagehistory span.user { + margin-left: 1.4em; + margin-right: 0.4em; +} +#pagehistory span.minor { font-weight: bold; } +#pagehistory li { border: 1px solid White; } +#pagehistory li.selected { + background-color:#f9f9f9; + border:1px dashed #aaaaaa; +} +/* +** Diff rendering +*/ +table.diff { background:white; } +td.diff-otitle { background:#ffffff; } +td.diff-ntitle { background:#ffffff; } +td.diff-addedline { + background:#ccffcc; + font-size: smaller; +} +td.diff-deletedline { + background:#ffffaa; + font-size: smaller; +} +td.diff-context { + background:#eeeeee; + font-size: smaller; +} +span.diffchange { color: red; } + +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; +} +span.newpageletter { + font-weight:bold; + color:black; + background-color:yellow; +} +span.minoreditletter { + color:black; + background-color:#C5FFE6; +} + +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 { + font-size: 94%; + padding: 2px 4px; +} + +#jump-to-nav { + display: none; +}
\ No newline at end of file diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js new file mode 100644 index 00000000..9c25adf0 --- /dev/null +++ b/skins/common/IEFixes.js @@ -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); +}
\ No newline at end of file diff --git a/skins/common/ajax.js b/skins/common/ajax.js new file mode 100644 index 00000000..90676548 --- /dev/null +++ b/skins/common/ajax.js @@ -0,0 +1,177 @@ +// remote scripting library +// (c) copyright 2005 modernmethod, inc +var sajax_debug_mode = false; +var sajax_request_type = "GET"; + +var started; +var typing; +var memory=null; +var body=null; +var oldbody=null; + +function sajax_debug(text) { + if (sajax_debug_mode) + alert("RSD: " + text) +} + + +function sajax_init_object() { + sajax_debug("sajax_init_object() called..") + var A; + try { + A=new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + A=new ActiveXObject("Microsoft.XMLHTTP"); + } catch (oc) { + A=null; + } + } + if(!A && typeof XMLHttpRequest != "undefined") + A = new XMLHttpRequest(); + if (!A) + sajax_debug("Could not create connection object."); + return A; +} + + +function sajax_do_call(func_name, args) { + var i, x, n; + var uri; + var post_data; + uri = wgServer + "/" + wgScriptPath + "/index.php?action=ajax"; + if (sajax_request_type == "GET") { + if (uri.indexOf("?") == -1) + uri = uri + "?rs=" + escape(func_name); + else + uri = uri + "&rs=" + escape(func_name); + for (i = 0; i < args.length-1; i++) + uri = uri + "&rsargs[]=" + escape(args[i]); + //uri = uri + "&rsrnd=" + new Date().getTime(); + post_data = null; + } else { + post_data = "rs=" + escape(func_name); + for (i = 0; i < args.length-1; i++) + post_data = post_data + "&rsargs[]=" + escape(args[i]); + } + x = sajax_init_object(); + x.open(sajax_request_type, uri, true); + 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.responseText); + var status; + var data; + status = x.responseText.charAt(0); + data = x.responseText.substring(2); + if (status == "-") + alert("Error: " + data); + else + args[args.length-1](data); + } + x.send(post_data); + sajax_debug(func_name + " uri = " + uri + "/post = " + post_data); + sajax_debug(func_name + " waiting.."); + delete x; +} + +// Remove the typing barrier to allow call() to complete +function Search_doneTyping() +{ + typing=false; +} + +// Wait 500ms to run call() +function Searching_Go() +{ + setTimeout("Searching_Call()", 500); +} + +// If the user is typing wait until they are done. +function Search_Typing() { + started=true; + typing=true; + window.status = "Waiting until you're done typing..."; + setTimeout("Search_doneTyping()", 500); + + // I believe these are needed by IE for when the users press return? + if (window.event) + { + if (event.keyCode == 13) + { + event.cancelBubble = true; + event.returnValue = false; + } + } +} + +// Set the body div to the results +function Searching_SetResult(result) +{ + //body.innerHTML = result; + t = document.getElementById("searchTarget"); + if ( t == null ) { + oldbody=body.innerHTML; + body.innerHTML= '<div id="searchTargetContainer"><div id="searchTarget" ></div></div>' ; + t = document.getElementById("searchTarget"); + } + t.innerHTML = result; + t.style.display='block'; +} + +function Searching_Hide_Results() +{ + t = document.getElementById("searchTarget"); + t.style.display='none'; + body.innerHTML = oldbody; +} + + +// This will call the php function that will eventually +// return a results table +function Searching_Call() +{ + var x; + Searching_Go(); + + //Don't proceed if user is typing + if (typing) + return; + + x = document.getElementById("searchInput").value; + + // Don't search again if the query is the same + if (x==memory) + return; + + memory=x; + if (started) { + // Don't search for blank or < 3 chars. + if ((x=="") || (x.length < 3)) + { + return; + } + x_wfSajaxSearch(x, Searching_SetResult); + } +} + +function x_wfSajaxSearch() { + sajax_do_call( "wfSajaxSearch", x_wfSajaxSearch.arguments ); +} + + +//Initialize +function sajax_onload() { + x = document.getElementById( 'searchInput' ); + x.onkeypress= function() { Search_Typing(); }; + Searching_Go(); + body = document.getElementById("content"); +} + +hookEvent("load", sajax_onload); diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css new file mode 100644 index 00000000..33c12abb --- /dev/null +++ b/skins/common/cologneblue.css @@ -0,0 +1,96 @@ +@import url("common.css?2"); + +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: 18pt; font-weight: bold; line-height: 21pt; +} +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%; }
\ No newline at end of file diff --git a/skins/common/common.css b/skins/common/common.css new file mode 100644 index 00000000..09409fd6 --- /dev/null +++ b/skins/common/common.css @@ -0,0 +1,386 @@ +/* + * common.css + * This file contains CSS settings common to Wikistandard, Nostalgia and CologneBlue + */ +#footer { clear: both } +/* images */ +div.floatright { float: right; margin: 0 0 1em 1em; } +div.floatright p { font-style: italic; } +div.floatleft { float: 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: 10px; + text-align: center; + width: auto; +} +div.thumb div { + border: 1px solid #8888aa; + background-color: #f7f8ff; + padding: 2px; + font-size: 94%; + text-align: center; + overflow: hidden; +} +div.thumb div * { + border: none; + background: none; +} +div.thumb img { + border:1px solid #8888AA; + margin-bottom:3px; + background:#FFFFFF; +} +div.thumbcaption, +div.thumbcaption * { + border: none !important; + background: none !important; +} +div.thumbcaption { + padding: 0.2em 0 0.2em 0 !important; + text-align: left !important; +} +div.tright { + float: right; + margin-left:0.5em; +} +div.tleft { + float: left; + margin-right:0.5em; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { color: #4b4b4b; } +#pagehistory span.user { + margin-left: 1.4em; + margin-right: 0.4em; +} +#pagehistory span.minor { font-weight: bold; } +#pagehistory li { border: 1px solid White; } +#pagehistory li.selected { + background-color:#f9f9f9; + border:1px dashed #aaaaaa; +} + +table.diff { background:white; } +td.diff-otitle { background:#cccccc; } +td.diff-ntitle { background:#cccccc; } +td.diff-addedline { + background:#ccffcc; + font-size: 94%; +} +td.diff-deletedline { + background:#ffffaa; + font-size: 94%; +} +td.diff-context { + background:#eeeeee; + font-size: 94%; +} +span.diffchange { color: red; font-weight: bold; } + +img { border: none; } +img.tex { vertical-align: middle; } +span.texhtml { font-family: serif; } + + +#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: 1em; +} +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% } + +div.townBox { + position:relative; + float:right; + background:White; + margin-left:1em; + border: 1px solid gray; + padding:0.3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 0.3em 0; + font-size: 96%; +} +div.townBox dl dt { + background: none; + margin: 0.4em 0 0 0; +} +div.townBox dl dd { + margin: 0.1em 0 0 1.1em; + background-color: #f3f3f3; +} +/* 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; +} +.searchmatch { + color: red; + font-weight: bold; +} +.sharedUploadNotice { + font-style: italic; +} +span.unpatrolled { + font-weight:bold; + color:red; +} + +span.updatedmarker { + color:black; + background-color:#00FF00; +} +span.newpageletter { + font-weight:bold; + color:black; + background-color:yellow; +} +span.minoreditletter { + color:black; + background-color:#C5FFE6; +} + +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 { + 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; +} + +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +}
\ No newline at end of file diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css new file mode 100644 index 00000000..7dcb5700 --- /dev/null +++ b/skins/common/commonPrint.css @@ -0,0 +1,288 @@ +/* +** 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; +} +.toctoggle, .editsection { + font-size: smaller; +} + +/* images */ +div.floatright { + 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 { + 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; + 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; +} + +/* 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#f-viewcount, +li#f-about, +li#f-disclaimer, +li#f-privacy { + /* Hides all the elements irrelevant for printing */ + display: none; +} + +ul { + list-style-type: square; +} + +#content { + background: none; + border: none ! important; + font-size: 11pt; + 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; + 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; } + +div.townBox { + position:relative; + float:right; + background:White; + margin-left:1em; + border: 1px solid gray; + padding:0.3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 0.3em 0; + font-size: 96%; +} +div.townBox dl dt { + background: none; + margin: 0.4em 0 0 0; +} +div.townBox dl dd { + margin: 0.1em 0 0 1.1em; + background-color: #f3f3f3; +} + +#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; +} +span.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 index 00000000..8f50b2ab --- /dev/null +++ b/skins/common/common_rtl.css @@ -0,0 +1,15 @@ +/* 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 span.user { + margin-right: 1.4em; + margin-left: 0.4em; +} diff --git a/skins/common/feed.css b/skins/common/feed.css new file mode 100644 index 00000000..94396639 --- /dev/null +++ b/skins/common/feed.css @@ -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/images/Arr_.png b/skins/common/images/Arr_.png Binary files differnew file mode 100644 index 00000000..83fafc74 --- /dev/null +++ b/skins/common/images/Arr_.png diff --git a/skins/common/images/Arr_d.png b/skins/common/images/Arr_d.png Binary files differnew file mode 100644 index 00000000..421dd101 --- /dev/null +++ b/skins/common/images/Arr_d.png diff --git a/skins/common/images/Arr_l.png b/skins/common/images/Arr_l.png Binary files differnew file mode 100644 index 00000000..9db66232 --- /dev/null +++ b/skins/common/images/Arr_l.png diff --git a/skins/common/images/Arr_r.png b/skins/common/images/Arr_r.png Binary files differnew file mode 100644 index 00000000..d1b161b0 --- /dev/null +++ b/skins/common/images/Arr_r.png diff --git a/skins/common/images/Arr_r.xcf b/skins/common/images/Arr_r.xcf Binary files differnew file mode 100644 index 00000000..83b7b2a8 --- /dev/null +++ b/skins/common/images/Arr_r.xcf diff --git a/skins/common/images/Zoom_sans.gif b/skins/common/images/Zoom_sans.gif Binary files differnew file mode 100644 index 00000000..6ba0adca --- /dev/null +++ b/skins/common/images/Zoom_sans.gif diff --git a/skins/common/images/bullet.gif b/skins/common/images/bullet.gif Binary files differnew file mode 100644 index 00000000..b43de48a --- /dev/null +++ b/skins/common/images/bullet.gif diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png Binary files differnew file mode 100644 index 00000000..5e52deed --- /dev/null +++ b/skins/common/images/button_bold.png diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png Binary files differnew file mode 100644 index 00000000..12ec5f2e --- /dev/null +++ b/skins/common/images/button_extlink.png diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png Binary files differnew file mode 100644 index 00000000..aa0ca540 --- /dev/null +++ b/skins/common/images/button_headline.png diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png Binary files differnew file mode 100644 index 00000000..19cfc480 --- /dev/null +++ b/skins/common/images/button_hr.png diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png Binary files differnew file mode 100644 index 00000000..6c3c3308 --- /dev/null +++ b/skins/common/images/button_image.png diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png Binary files differnew file mode 100644 index 00000000..96b1fb9f --- /dev/null +++ b/skins/common/images/button_italic.png diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png Binary files differnew file mode 100644 index 00000000..e9507b97 --- /dev/null +++ b/skins/common/images/button_link.png diff --git a/skins/common/images/button_math.png b/skins/common/images/button_math.png Binary files differnew file mode 100644 index 00000000..e91fb613 --- /dev/null +++ b/skins/common/images/button_math.png diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png Binary files differnew file mode 100644 index 00000000..02070790 --- /dev/null +++ b/skins/common/images/button_media.png diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png Binary files differnew file mode 100644 index 00000000..7b2d5392 --- /dev/null +++ b/skins/common/images/button_nowiki.png diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png Binary files differnew file mode 100644 index 00000000..ef3a46d2 --- /dev/null +++ b/skins/common/images/button_sig.png diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png Binary files differnew file mode 100644 index 00000000..8e9cc267 --- /dev/null +++ b/skins/common/images/button_template.png diff --git a/skins/common/images/fileicon.xcf b/skins/common/images/fileicon.xcf Binary files differnew file mode 100644 index 00000000..85a0a610 --- /dev/null +++ b/skins/common/images/fileicon.xcf diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png Binary files differnew file mode 100644 index 00000000..1371aba8 --- /dev/null +++ b/skins/common/images/gnu-fdl.png diff --git a/skins/common/images/gnu-fdl.xcf b/skins/common/images/gnu-fdl.xcf Binary files differnew file mode 100644 index 00000000..364440dd --- /dev/null +++ b/skins/common/images/gnu-fdl.xcf diff --git a/skins/common/images/icons/COPYING b/skins/common/images/icons/COPYING new file mode 100644 index 00000000..136530a9 --- /dev/null +++ b/skins/common/images/icons/COPYING @@ -0,0 +1,43 @@ +The icons used here are derived from the crystalsvg icons in the the +pics/crystalsvg/ directory of kdelibs-3.4.0 they were modified on 2005-05-15 +by Ævar Arnfjörð Bjarmason for use in MediaWiki. + +What follows is the contents of the LICENSE.crystalsvg file found in the pics/ +subdirectory of kdelibs-3.4.0: + +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +This copyright and license notice covers all CrystalSVG images. +Note the license notice contains an add-on. +******************************************************************************** +KDE Crystal theme icons. +Copyright (C) 2002 and following years KDE Artists +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation, +version 2.1 of the License. +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + **** NOTE THIS ADD-ON **** +The GNU Lesser General Public License or LGPL is written for software libraries +in the first place. We expressly want the LGPL to be valid for this artwork +library too. +KDE Crystal theme icons is a special kind of software library, it is an +artwork library, it's elements can be used in a Graphical User Interface, or +GUI. +Source code, for this library means: + - for vectors svg; + - for pixels, if applicable, the multi-layered formats xcf or psd, or +otherwise png. +The LGPL in some sections obliges you to make the files carry +notices. With images this is in some cases impossible or hardly useful. +With this library a notice is placed at a prominent place in the directory +containing the elements. You may follow this practice. +The exception in section 6 of the GNU Lesser General Public License covers +the use of elements of this art library in a GUI. +kde-artists [at] kde.org +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png Binary files differnew file mode 100644 index 00000000..6da6916e --- /dev/null +++ b/skins/common/images/icons/fileicon-c.png diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png Binary files differnew file mode 100644 index 00000000..ba54e77f --- /dev/null +++ b/skins/common/images/icons/fileicon-cpp.png diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png Binary files differnew file mode 100644 index 00000000..ac1e2cf9 --- /dev/null +++ b/skins/common/images/icons/fileicon-deb.png diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png Binary files differnew file mode 100644 index 00000000..2e1e2c9b --- /dev/null +++ b/skins/common/images/icons/fileicon-djvu.png diff --git a/skins/common/images/icons/fileicon-djvu.xcf b/skins/common/images/icons/fileicon-djvu.xcf Binary files differnew file mode 100644 index 00000000..8043dcdb --- /dev/null +++ b/skins/common/images/icons/fileicon-djvu.xcf diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png Binary files differnew file mode 100644 index 00000000..6c7aa1a1 --- /dev/null +++ b/skins/common/images/icons/fileicon-dvi.png diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png Binary files differnew file mode 100644 index 00000000..6ccf1821 --- /dev/null +++ b/skins/common/images/icons/fileicon-exe.png diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png Binary files differnew file mode 100644 index 00000000..d091afff --- /dev/null +++ b/skins/common/images/icons/fileicon-h.png diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png Binary files differnew file mode 100644 index 00000000..7c479525 --- /dev/null +++ b/skins/common/images/icons/fileicon-html.png diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png Binary files differnew file mode 100644 index 00000000..b4192e9e --- /dev/null +++ b/skins/common/images/icons/fileicon-iso.png diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png Binary files differnew file mode 100644 index 00000000..757c6aec --- /dev/null +++ b/skins/common/images/icons/fileicon-java.png diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png Binary files differnew file mode 100644 index 00000000..aa826070 --- /dev/null +++ b/skins/common/images/icons/fileicon-mid.png diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png Binary files differnew file mode 100644 index 00000000..2c0da0d8 --- /dev/null +++ b/skins/common/images/icons/fileicon-mov.png diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png Binary files differnew file mode 100644 index 00000000..bf051cb8 --- /dev/null +++ b/skins/common/images/icons/fileicon-o.png diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png Binary files differnew file mode 100644 index 00000000..b8ba7714 --- /dev/null +++ b/skins/common/images/icons/fileicon-ogg.png diff --git a/skins/common/images/icons/fileicon-ogg.xcf b/skins/common/images/icons/fileicon-ogg.xcf Binary files differnew file mode 100644 index 00000000..a91024bf --- /dev/null +++ b/skins/common/images/icons/fileicon-ogg.xcf diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png Binary files differnew file mode 100644 index 00000000..ee39b6c3 --- /dev/null +++ b/skins/common/images/icons/fileicon-pdf.png diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png Binary files differnew file mode 100644 index 00000000..f1f504d7 --- /dev/null +++ b/skins/common/images/icons/fileicon-ps.png diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png Binary files differnew file mode 100644 index 00000000..5ba04e5a --- /dev/null +++ b/skins/common/images/icons/fileicon-rm.png diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png Binary files differnew file mode 100644 index 00000000..0f1c3b87 --- /dev/null +++ b/skins/common/images/icons/fileicon-rpm.png diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png Binary files differnew file mode 100644 index 00000000..8dc6d30f --- /dev/null +++ b/skins/common/images/icons/fileicon-svg.png diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png Binary files differnew file mode 100644 index 00000000..a4b15d7f --- /dev/null +++ b/skins/common/images/icons/fileicon-tar.png diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png Binary files differnew file mode 100644 index 00000000..ee8c0226 --- /dev/null +++ b/skins/common/images/icons/fileicon-tex.png diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png Binary files differnew file mode 100644 index 00000000..1b53066e --- /dev/null +++ b/skins/common/images/icons/fileicon-ttf.png diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png Binary files differnew file mode 100644 index 00000000..76e98909 --- /dev/null +++ b/skins/common/images/icons/fileicon-txt.png diff --git a/skins/common/images/icons/fileicon.png b/skins/common/images/icons/fileicon.png Binary files differnew file mode 100644 index 00000000..5675170b --- /dev/null +++ b/skins/common/images/icons/fileicon.png diff --git a/skins/common/images/link_icon.gif b/skins/common/images/link_icon.gif Binary files differnew file mode 100644 index 00000000..815ccb1b --- /dev/null +++ b/skins/common/images/link_icon.gif diff --git a/skins/common/images/magnify-clip.png b/skins/common/images/magnify-clip.png Binary files differnew file mode 100644 index 00000000..50abcb68 --- /dev/null +++ b/skins/common/images/magnify-clip.png diff --git a/skins/common/images/mediawiki-small.xcf b/skins/common/images/mediawiki-small.xcf Binary files differnew file mode 100644 index 00000000..75355171 --- /dev/null +++ b/skins/common/images/mediawiki-small.xcf diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png Binary files differnew file mode 100644 index 00000000..69fce988 --- /dev/null +++ b/skins/common/images/mediawiki.png diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png Binary files differnew file mode 100644 index 00000000..ce1765d1 --- /dev/null +++ b/skins/common/images/poweredby_mediawiki_88x31.png diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png Binary files differnew file mode 100644 index 00000000..9110ca13 --- /dev/null +++ b/skins/common/images/redirectltr.png diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png Binary files differnew file mode 100644 index 00000000..60fd59d3 --- /dev/null +++ b/skins/common/images/redirectrtl.png diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png Binary files differnew file mode 100644 index 00000000..49913f6a --- /dev/null +++ b/skins/common/images/wiki.png diff --git a/skins/common/metadata.js b/skins/common/metadata.js new file mode 100644 index 00000000..9f7a8e01 --- /dev/null +++ b/skins/common/metadata.js @@ -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/nostalgia.css b/skins/common/nostalgia.css new file mode 100644 index 00000000..cc427bc9 --- /dev/null +++ b/skins/common/nostalgia.css @@ -0,0 +1,18 @@ +@import url("common.css?1"); +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/preview.js b/skins/common/preview.js new file mode 100644 index 00000000..b117e85b --- /dev/null +++ b/skins/common/preview.js @@ -0,0 +1,53 @@ +// Live preview + +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 livePreview(target, text, postUrl) { + prevTarget = target; + if( !target ) { + window.alert('Live preview failed!\nTry normal preview.'); + var fallback = document.getElementById('wpPreview'); + if ( fallback ) { fallback.style.display = 'inline'; } + } + prevReq = openXMLHttpRequest(); + if( !prevReq ) return false; + + prevReq.onreadystatechange = updatePreviewText; + prevReq.open("POST", postUrl, true); + + var postData = 'wpTextbox1=' + encodeURIComponent(text); + prevReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + prevReq.send(postData); + return true; +} + +function updatePreviewText() { + if( prevReq.readyState != 4 ) { + return; + } + if( prevReq.status != 200 ) { + window.alert('Failed to connect: ' + prevReq.status + + ' "' + prevReq.statusText + '"'); + var fallback = document.getElementById('wpPreview'); + if ( fallback ) { fallback.style.display = 'inline'; } + return; + } + prevTarget.innerHTML = prevReq.responseText; + + /* Hide the active diff if it exists */ + var diff = document.getElementById('wikiDiff'); + if ( diff ) { diff.style.display = 'none'; } +} diff --git a/skins/common/protect.js b/skins/common/protect.js new file mode 100644 index 00000000..a144e5eb --- /dev/null +++ b/skins/common/protect.js @@ -0,0 +1,126 @@ +function protectInitialize(tableId, labelText) { + if (document.createTextNode) { + var box = document.getElementById(tableId); + if (!box) + return false; + + var tbody = box.getElementsByTagName('tbody')[0]; + var row = document.createElement('tr'); + tbody.appendChild(row); + + row.appendChild(document.createElement('td')); + var col2 = document.createElement('td'); + row.appendChild(col2); + + var check = document.createElement('input'); + check.id = "mwProtectUnchained"; + check.type = "checkbox"; + check.onclick = protectChainUpdate; + col2.appendChild(check); + + var label = document.createElement('label'); + label.setAttribute("for", "mwProtectUnchained"); + label.appendChild(document.createTextNode(labelText)); + col2.appendChild(label); + + if (protectAllMatch()) { + check.checked = false; + protectEnable(false); + } else { + check.checked = true; + protectEnable(true); + } + + return true; + } + return false; +} + +function protectLevelsUpdate(source) { + if (!protectUnchained()) { + protectUpdateAll(source.selectedIndex); + } +} + +function protectChainUpdate() { + if (protectUnchained()) { + protectEnable(true); + } else { + protectChain(); + protectEnable(false); + } +} + + +function protectAllMatch() { + var values = new Array(); + protectForSelectors(function(set) { + values[values.length] = set.selectedIndex; + }); + for (var i = 1; i < values.length; i++) { + if (values[i] != values[0]) { + return false; + } + } + return true; +} + +function protectUnchained() { + var unchain = document.getElementById("mwProtectUnchained"); + if (!unchain) { + alert("This shouldn't happen"); + return false; + } + return unchain.checked; +} + +function protectChain() { + // Find the highest-protected action and bump them all to this level + var maxIndex = -1; + protectForSelectors(function(set) { + if (set.selectedIndex > maxIndex) { + maxIndex = set.selectedIndex; + } + }); + protectUpdateAll(maxIndex); +} + +function protectUpdateAll(index) { + protectForSelectors(function(set) { + if (set.selectedIndex != index) { + set.selectedIndex = index; + } + }); +} + +function protectForSelectors(func) { + var selectors = protectSelectors(); + for (var i = 0; i < selectors.length; i++) { + func(selectors[i]); + } +} + +function protectSelectors() { + var all = document.getElementsByTagName("select"); + var ours = new Array(); + for (var i = 0; i < all.length; i++) { + var set = all[i]; + if (set.id.match(/^mwProtect-level-/)) { + ours[ours.length] = set; + } + } + return ours; +} + +function protectEnable(val) { + // fixme + var first = true; + protectForSelectors(function(set) { + if (first) { + first = false; + } else { + set.disabled = !val; + set.style.visible = val ? "visible" : "hidden"; + } + }); +} diff --git a/skins/common/quickbar-right.css b/skins/common/quickbar-right.css new file mode 100644 index 00000000..43bd427a --- /dev/null +++ b/skins/common/quickbar-right.css @@ -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 index 00000000..d7930c2a --- /dev/null +++ b/skins/common/quickbar.css @@ -0,0 +1 @@ +#quickbar { position: fixed; padding: 4px; } diff --git a/skins/common/sticky.js b/skins/common/sticky.js new file mode 100644 index 00000000..cf248c3e --- /dev/null +++ b/skins/common/sticky.js @@ -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"; + }
\ No newline at end of file diff --git a/skins/common/upload.js b/skins/common/upload.js new file mode 100644 index 00000000..160fbf27 --- /dev/null +++ b/skins/common/upload.js @@ -0,0 +1,23 @@ +function licenseSelectorCheck() { + var selector = document.getElementById("wpLicense"); + if (selector.selectedIndex > 0 && + selector.options[selector.selectedIndex].value == "" ) { + // Browser is broken, doesn't respect disabled attribute on <option> + selector.selectedIndex = 0; + } +} + +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"); + 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; + } + } +} + +addOnloadHook(licenseSelectorFixup); diff --git a/skins/common/wikibits.js b/skins/common/wikibits.js new file mode 100644 index 00000000..d95c4dcc --- /dev/null +++ b/skins/common/wikibits.js @@ -0,0 +1,748 @@ +// MediaWiki JavaScript support functions + +var clientPC = navigator.userAgent.toLowerCase(); // Get client info +var is_gecko = ((clientPC.indexOf('gecko')!=-1) && (clientPC.indexOf('spoofer')==-1) + && (clientPC.indexOf('khtml') == -1) && (clientPC.indexOf('netscape/7.0')==-1)); +var is_safari = ((clientPC.indexOf('applewebkit')!=-1) && (clientPC.indexOf('spoofer')==-1)); +var is_khtml = (navigator.vendor == 'KDE' || ( document.childNodes && !document.all && !navigator.taintEnabled )); +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); +} + +// 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 + onloadFuncts[onloadFuncts.length] = hookFunct; +} + +function runOnloadHook() { + // don't run anything below this for non-dom browsers + if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) + return; + + histrowinit(); + unhidetzbutton(); + tabbedprefs(); + akeytt(); + scrollEditBox(); + setupCheckboxShiftClick(); + + // Run any added-on functions + for (var i = 0; i < onloadFuncts.length; i++) + onloadFuncts[i](); + + doneOnloadHook = true; +} + +function hookEvent(hookName, hookFunct) { + if (window.addEventListener) + addEventListener(hookName, hookFunct, false); + else if (window.attachEvent) + attachEvent("on" + hookName, hookFunct); +} + +hookEvent("load", runOnloadHook); + +// document.write special stylesheet links +if (typeof stylepath != 'undefined' && typeof skin != 'undefined') { + if (is_opera_preseven) { + document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera6Fixes.css">'); + } else if (is_opera_seven) { + document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/Opera7Fixes.css">'); + } else if (is_khtml) { + document.write('<link rel="stylesheet" type="text/css" href="'+stylepath+'/'+skin+'/KHTMLFixes.css">'); + } +} +// Un-trap us from framesets +if (window.top != window) + window.top.location = window.location; + +// for enhanced RecentChanges +function toggleVisibility(_levelId, _otherId, _linkId) { + var thisLevel = document.getElementById(_levelId); + var otherLevel = document.getElementById(_otherId); + var linkLevel = document.getElementById(_linkId); + if (thisLevel.style.display == 'none') { + thisLevel.style.display = 'block'; + otherLevel.style.display = 'none'; + linkLevel.style.display = 'inline'; + } else { + thisLevel.style.display = 'none'; + otherLevel.style.display = 'inline'; + linkLevel.style.display = 'none'; + } +} + +// 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(); +} + +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 (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; +} + +// 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 = new Array(); + 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] = new Object(); + 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'; +} + +// 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(); +} + +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 + +// 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) { + // Don't generate buttons for browsers which don't fully + // support it. + mwEditButtons[mwEditButtons.length] = + {"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.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 && textbox.selectionStart == null) + return false; + + for (var i in mwEditButtons) { + mwInsertEditButton(toolbar, mwEditButtons[i]); + } + for (var i in mwCustomEditButtons) { + mwInsertEditButton(toolbar, mwCustomEditButtons[i]); + } + return true; +} + +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,"&"); + var re = new RegExp('"',"g"); + text = text.replace(re,"""); + var re = new RegExp('<',"g"); + text = text.replace(re,"<"); + var re = new RegExp('>',"g"); + text = text.replace(re,">"); + return text; +} + +// apply tagOpen/tagClose to selection in textarea, +// use sampleText instead of selection if there is none +// copied and adapted from phpBB +function insertTags(tagOpen, tagClose, sampleText) { + if (document.editform) + var txtarea = document.editform.wpTextbox1; + else { + // some alternate form? take the first one we can find + var areas = document.getElementsByTagName('textarea'); + var txtarea = areas[0]; + } + + // IE + if (document.selection && !is_gecko) { + var theSelection = document.selection.createRange().text; + if (!theSelection) + theSelection=sampleText; + txtarea.focus(); + if (theSelection.charAt(theSelection.length - 1) == " ") { // exclude ending space char, if any + theSelection = theSelection.substring(0, theSelection.length - 1); + document.selection.createRange().text = tagOpen + theSelection + tagClose + " "; + } else { + document.selection.createRange().text = tagOpen + theSelection + tagClose; + } + + // Mozilla + } else if(txtarea.selectionStart || txtarea.selectionStart == '0') { + var replaced = false; + var startPos = txtarea.selectionStart; + var endPos = txtarea.selectionEnd; + if (endPos-startPos) + replaced = true; + var scrollTop = txtarea.scrollTop; + var myText = (txtarea.value).substring(startPos, endPos); + if (!myText) + myText=sampleText; + if (myText.charAt(myText.length - 1) == " ") { // exclude ending space char, if any + subst = tagOpen + myText.substring(0, (myText.length - 1)) + tagClose + " "; + } else { + subst = tagOpen + myText + tagClose; + } + txtarea.value = txtarea.value.substring(0, startPos) + subst + + txtarea.value.substring(endPos, txtarea.value.length); + txtarea.focus(); + //set new selection + if (replaced) { + var cPos = startPos+(tagOpen.length+myText.length+tagClose.length); + txtarea.selectionStart = cPos; + txtarea.selectionEnd = cPos; + } else { + txtarea.selectionStart = startPos+tagOpen.length; + txtarea.selectionEnd = startPos+tagOpen.length+myText.length; + } + txtarea.scrollTop = scrollTop; + + // All other browsers get no toolbar. + // There was previously support for a crippled "help" + // bar, but that caused more problems than it solved. + } + // reposition cursor if possible + if (txtarea.createTextRange) + txtarea.caretPos = document.selection.createRange().duplicate(); +} + +function akeytt() { + if (typeof ta == "undefined" || !ta) + return; + var pref = 'alt-'; + if (is_safari || navigator.userAgent.toLowerCase().indexOf('mac') + 1 + || navigator.userAgent.toLowerCase().indexOf('konqueror') + 1 ) + pref = 'control-'; + if (is_opera) + pref = 'shift-esc-'; + + 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]; + } + + if (a) { + a.accessKey = ta[id][0]; + ak = ' ['+pref+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; + } + } + } +} + +function setupRightClickEdit() { + if (document.getElementsByTagName) { + var divs = document.getElementsByTagName('div'); + for (var i = 0; i < divs.length; i++) { + var el = divs[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 following a + var next = el.nextSibling; + while (next.nodeType != 1) + next = next.nextSibling; + + // find the following header + next = next.nextSibling; + while (next.nodeType != 1) + next = next.nextSibling; + + if (next && next.nodeType == 1 && + next.nodeName.match(/^[Hh][1-6]$/)) { + next.oncontextmenu = function() { + document.location = editHref; + return false; + } + } + } + } +} + +function setupCheckboxShiftClick() { + if (document.getElementsByTagName) { + var uls = document.getElementsByTagName('ul'); + var len = uls.length; + for (var i = 0; i < len; ++i) { + addCheckboxClickHandlers(uls[i]); + } + } +} + +function addCheckboxClickHandlers(ul, start, finish) { + if (ul.checkboxHandlersTimer) { + clearInterval(ul.checkboxHandlersTimer); + } + if ( !ul.childNodes ) { + return; + } + var len = ul.childNodes.length; + if (len < 2) { + return; + } + start = start || 0; + finish = finish || start + 250; + if ( finish > len ) { finish = len; } + ul.checkboxes = ul.checkboxes || []; + ul.lastCheckbox = ul.lastCheckbox || null; + for (var i = start; i<finish; ++i) { + var child = ul.childNodes[i]; + if ( child && child.childNodes && child.childNodes[0] ) { + var cb = child.childNodes[0]; + if ( !cb.nodeName || cb.nodeName.toLowerCase() != 'input' || + !cb.type || cb.type.toLowerCase() != 'checkbox' ) { + return; + } + cb.index = ul.checkboxes.push(cb) - 1; + cb.container = ul; + cb.onmouseup = checkboxMouseupHandler; + } + } + if (finish < len) { + var f=function(){ addCheckboxClickHandlers(ul, finish, finish+250); }; + ul.checkboxHandlersTimer=setInterval(f, 200); + } +} + +function checkboxMouseupHandler(e) { + if (typeof e == 'undefined') { + e = window.event; + } + if ( !e.shiftKey || this.container.lastCheckbox === null ) { + this.container.lastCheckbox = this.index; + return true; + } + var endState = !this.checked; + if ( is_opera ) { // opera has already toggled the checkbox by this point + endState = !endState; + } + var start, finish; + if ( this.index < this.container.lastCheckbox ) { + start = this.index + 1; + finish = this.container.lastCheckbox; + } else { + start = this.container.lastCheckbox; + finish = this.index - 1; + } + for (var i = start; i <= finish; ++i ) { + this.container.checkboxes[i].checked = endState; + } + this.container.lastCheckbox = this.index; + return true; +} + +function fillDestFilename() { + if (!document.getElementById) + return; + var path = document.getElementById('wpUploadFile').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; +} + + +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 scrollEditBox() { + var editBoxEl = document.getElementById("wpTextbox1"); + var scrollTopEl = document.getElementById("wpScrolltop"); + var editFormEl = document.getElementById("editform"); + + if (editBoxEl && scrollTopEl) { + if (scrollTopEl.value) editBoxEl.scrollTop = scrollTopEl.value; + editFormEl.onsubmit = function() { + document.getElementById("wpScrolltop").value = document.getElementById("wpTextbox1").scrollTop; + } + } +} + +hookEvent("load", scrollEditBox); + +function allmessagesfilter() { + text = document.getElementById('allmessagesinput').value; + k = document.getElementById('allmessagestable'); + if (!k) { return;} + + var items = k.getElementsByTagName('span'); + + if ( text.length > allmessages_prev.length ) { + for (var i = items.length-1, j = 0; i >= 0; i--) { + j = allmessagesforeach(items, i, j); + } + } else { + for (var i = 0, j = 0; i < items.length; i++) { + j = allmessagesforeach(items, i, j); + } + } + allmessages_prev = text; +} + +function allmessagesforeach(items, i, j) { + var hItem = items[i].getAttribute('id'); + if (hItem.substring(0,17) == 'sp-allmessages-i-') { + if (items[i].firstChild && items[i].firstChild.nodeName == '#text' && items[i].firstChild.nodeValue.indexOf(text) != -1) { + var itemA = document.getElementById( hItem.replace('i', 'r1') ); + var itemB = document.getElementById( hItem.replace('i', 'r2') ); + if ( itemA.style.display != '' ) { + var s = "allmessageshider(\"" + hItem.replace('i', 'r1') + "\", \"" + hItem.replace('i', 'r2') + "\", '')"; + var k = window.setTimeout(s,j++*5); + } + } else { + var itemA = document.getElementById( hItem.replace('i', 'r1') ); + var itemB = document.getElementById( hItem.replace('i', 'r2') ); + if ( itemA.style.display != 'none' ) { + var s = "allmessageshider(\"" + hItem.replace('i', 'r1') + "\", \"" + hItem.replace('i', 'r2') + "\", 'none')"; + var k = window.setTimeout(s,j++*5); + } + } + } + return j; +} + + +function allmessageshider(idA, idB, cstyle) { + var itemA = document.getElementById( idA ); + var itemB = document.getElementById( idB ); + if (itemA) { itemA.style.display = cstyle; } + if (itemB) { itemB.style.display = cstyle; } +} + +function allmessagesmodified() { + allmessages_modified = !allmessages_modified; + k = document.getElementById('allmessagestable'); + if (!k) { return;} + var items = k.getElementsByTagName('tr'); + for (var i = 0, j = 0; i< items.length; i++) { + if (!allmessages_modified ) { + if ( items[i].style.display != '' ) { + var s = "allmessageshider(\"" + items[i].getAttribute('id') + "\", null, '')"; + var k = window.setTimeout(s,j++*5); + } + } else if (items[i].getAttribute('class') == 'def' && allmessages_modified) { + if ( items[i].style.display != 'none' ) { + var s = "allmessageshider(\"" + items[i].getAttribute('id') + "\", null, 'none')"; + var k = window.setTimeout(s,j++*5); + } + } + } +} + +function allmessagesshow() { + k = document.getElementById('allmessagesfilter'); + if (k) { k.style.display = ''; } + + allmessages_prev = ''; + allmessages_modified = false; +} + +hookEvent("load", allmessagesshow); +hookEvent("load", mwSetupToolbar); diff --git a/skins/common/wikiprintable.css b/skins/common/wikiprintable.css new file mode 100644 index 00000000..58e132d6 --- /dev/null +++ b/skins/common/wikiprintable.css @@ -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, #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 index 00000000..3985f1d9 --- /dev/null +++ b/skins/common/wikistandard.css @@ -0,0 +1,44 @@ +@import url("common.css?1"); + +#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; 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%; } +h2 { font-size: 120%; } +h2, h3, h4, h5, h6 { margin-bottom: 0;} +h3 { font-size: 106.25%; } +h4 { font-size: 103.125%; } +h5 { font-size: 100%; } +h6 { font-size: 95%; } +hr.sep { color:gray;height:1px;background-color:gray;} +p.subpages { font-size:small;} +p.subtitle { padding-top: 0; margin-top: 0;} +p.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/HTMLDump.php b/skins/disabled/HTMLDump.php new file mode 100644 index 00000000..20ec01e3 --- /dev/null +++ b/skins/disabled/HTMLDump.php @@ -0,0 +1,228 @@ +<?php + +/** + * Default skin for HTML dumps, based on MonoBook.php + */ + +if( !defined( 'MEDIAWIKI' ) ) + die( -1 ); + +/** */ +require_once( 'includes/SkinTemplate.php' ); + +/** + * Inherit main code from SkinTemplate, set the CSS and template filter. + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class SkinHTMLDump extends SkinTemplate { + /** Using monobook. */ + function initPage( &$out ) { + SkinTemplate::initPage( $out ); + $this->template = 'HTMLDumpTemplate'; + } + + function buildSidebar() { + $sections = parent::buildSidebar(); + $badMessages = array( 'recentchanges-url', 'randompage-url' ); + $badUrls = array(); + foreach ( $badMessages as $msg ) { + $badUrls[] = $this->makeInternalOrExternalUrl( wfMsgForContent( $msg ) ); + } + + foreach ( $sections as $heading => $section ) { + foreach ( $section as $index => $link ) { + if ( in_array( $link['href'], $badUrls ) ) { + unset( $sections[$heading][$index] ); + } + } + } + return $sections; + } + + function buildContentActionUrls() { + global $wgHTMLDump; + + $content_actions = array(); + $nskey = $this->getNameSpaceKey(); + $content_actions[$nskey] = $this->tabAction( + $this->mTitle->getSubjectPage(), + $nskey, + !$this->mTitle->isTalkPage() ); + + $content_actions['talk'] = $this->tabAction( + $this->mTitle->getTalkPage(), + 'talk', + $this->mTitle->isTalkPage(), + '', + true); + + if ( isset( $wgHTMLDump ) ) { + $content_actions['current'] = array( + 'text' => wfMsg( 'currentrev' ), + 'href' => str_replace( '$1', wfUrlencode( $this->mTitle->getPrefixedDBkey() ), + $wgHTMLDump->oldArticlePath ), + 'class' => false + ); + } + return $content_actions; + } + + function makeBrokenLinkObj( &$nt, $text = '', $query = '', $trail = '', $prefix = '' ) { + if ( !isset( $nt ) ) { + return "<!-- ERROR -->{$prefix}{$text}{$trail}"; + } + + if ( $nt->getNamespace() == NS_CATEGORY ) { + return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix ); + } + + if ( $text == '' ) { + $text = $nt->getPrefixedText(); + } + return $prefix . $text . $trail; + } +} + +/** + * @todo document + * @package MediaWiki + * @subpackage Skins + */ +class HTMLDumpTemplate extends QuickTemplate { + /** + * 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() { + wfSuppressWarnings(); +?><!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="<?php $this->text('lang') ?>" lang="<?php $this->text('lang') ?>" dir="<?php $this->text('dir') ?>"> + <head> + <meta http-equiv="Content-Type" content="<?php $this->text('mimetype') ?>; charset=<?php $this->text('charset') ?>" /> + <?php $this->html('headlinks') ?> + <title><?php $this->text('pagetitle') ?></title> + <style type="text/css">/*<![CDATA[*/ @import "<?php $this->text('stylepath') ?>/htmldump/main.css"; /*]]>*/</style> + <link rel="stylesheet" type="text/css" media="print" href="<?php $this->text('stylepath') ?>/common/commonPrint.css" /> + <!--[if lt IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE50Fixes.css";</style><![endif]--> + <!--[if IE 5.5000]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE55Fixes.css";</style><![endif]--> + <!--[if IE 6]><style type="text/css">@import "<?php $this->text('stylepath') ?>/<?php $this->text('stylename') ?>/IE60Fixes.css";</style><![endif]--> + <!--[if IE]><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath') ?>/common/IEFixes.js"></script> + <meta http-equiv="imagetoolbar" content="no" /><![endif]--> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/common/wikibits.js"></script> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/htmldump/md5.js"></script> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/htmldump/utf8.js"></script> + <script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('stylepath' ) ?>/htmldump/lookup.js"></script> + <?php if($this->data['jsvarurl' ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('jsvarurl' ) ?>"></script><?php } ?> + <?php if($this->data['pagecss' ]) { ?><style type="text/css"><?php $this->html('pagecss' ) ?></style><?php } ?> + <?php if($this->data['usercss' ]) { ?><style type="text/css"><?php $this->html('usercss' ) ?></style><?php } ?> + <?php if($this->data['userjs' ]) { ?><script type="<?php $this->text('jsmimetype') ?>" src="<?php $this->text('userjs' ) ?>"></script><?php } ?> + <?php if($this->data['userjsprev']) { ?><script type="<?php $this->text('jsmimetype') ?>"><?php $this->html('userjsprev') ?></script><?php } ?> + </head> + <body + <?php if($this->data['nsclass' ]) { ?>class="<?php $this->text('nsclass') ?>"<?php } ?>> + <div id="globalWrapper"> + <div id="column-content"> + <div id="content"> + <a name="top" id="contentTop"></a> + <?php if($this->data['sitenotice']) { ?><div id="siteNotice"><?php $this->html('sitenotice') ?></div><?php } ?> + <h1 class="firstHeading"><?php $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="contentSub"><?php $this->html('undelete') ?></div><?php } ?> + <?php if($this->data['newtalk'] ) { ?><div class="usermessage"><?php $this->html('newtalk') ?></div><?php } ?> + <!-- start content --> + <?php $this->html('bodytext') ?> + <?php if($this->data['catlinks']) { ?><div id="catlinks"><?php $this->html('catlinks') ?></div><?php } ?> + <!-- end content --> + <div class="visualClear"></div> + </div> + </div> + </div> + <div id="column-one"> + <div id="p-cactions" class="portlet"> + <h5>Views</h5> + <ul> + <?php foreach($this->data['content_actions'] as $key => $action) { + ?><li id="ca-<?php echo htmlspecialchars($key) ?>" + <?php if($action['class']) { ?>class="<?php echo htmlspecialchars($action['class']) ?>"<?php } ?> + ><a href="<?php echo htmlspecialchars($action['href']) ?>"><?php + echo htmlspecialchars($action['text']) ?></a></li><?php + } ?> + </ul> + </div> + <div class="portlet" id="p-logo"> + <a style="background-image: url(<?php $this->text('logopath') ?>);" + href="<?php echo htmlspecialchars($this->data['nav_urls']['mainpage']['href'])?>" + title="<?php $this->msg('mainpage') ?>"></a> + </div> + <script type="<?php $this->text('jsmimetype') ?>"> if (window.isMSIE55) fixalpha(); </script> + <?php foreach ($this->data['sidebar'] as $bar => $cont) { ?> + <div class='portlet' id='p-<?php echo htmlspecialchars($bar) ?>'> + <h5><?php $this->msg( $bar ) ?></h5> + <div class='pBody'> + <ul> + <?php foreach($cont as $key => $val) { ?> + <li id="<?php echo htmlspecialchars($val['id']) ?>"><a href="<?php echo htmlspecialchars($val['href']) ?>"><?php echo htmlspecialchars($val['text'])?></a></li> + <?php } ?> + </ul> + </div> + </div> + <?php } ?> + <div id="p-search" class="portlet"> + <h5><label for="searchInput"><?php $this->msg('search') ?></label></h5> + <div class="pBody"> + <form action="javascript:goToStatic(3)" id="searchform"><div> + <input id="searchInput" name="search" type="text" + <?php if($this->haveMsg('accesskey-search')) { + ?>accesskey="<?php $this->msg('accesskey-search') ?>"<?php } + if( isset( $this->data['search'] ) ) { + ?> value="<?php $this->text('search') ?>"<?php } ?> /> + <input type='submit' name="go" class="searchButton" id="searchGoButton" + value="<?php $this->msg('go') ?>" /> + </div></form> + </div> + </div> + <?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> + <a href="<?php echo htmlspecialchars($langlink['href']) + ?>"><?php echo $langlink['text'] ?></a> + </li> + <?php } ?> + </ul> + </div> + </div> + <?php } ?> + </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 } ?> + <?php if($this->data['copyrightico']) { ?><div id="f-copyrightico"><?php $this->html('copyrightico') ?></div><?php } ?> + <ul id="f-list"> + <?php if($this->data['lastmod' ]) { ?><li id="f-lastmod"><?php $this->html('lastmod') ?></li><?php } ?> + <?php if($this->data['numberofwatchingusers' ]) { ?><li id="f-numberofwatchingusers"><?php $this->html('numberofwatchingusers') ?></li><?php } ?> + <?php if($this->data['credits' ]) { ?><li id="f-credits"><?php $this->html('credits') ?></li><?php } ?> + <?php if($this->data['copyright' ]) { ?><li id="f-copyright"><?php $this->html('copyright') ?></li><?php } ?> + <?php if($this->data['about' ]) { ?><li id="f-about"><?php $this->html('about') ?></li><?php } ?> + <?php if($this->data['disclaimer']) { ?><li id="f-disclaimer"><?php $this->html('disclaimer') ?></li><?php } ?> + <?php if($this->data['tagline']) { ?><li id="f-tagline"><?php echo $this->data['tagline'] ?></li><?php } ?> + </ul> + </div> + </div> + </body> +</html> +<?php + wfRestoreWarnings(); + } +} +?> diff --git a/skins/disabled/MonoBook.tpl b/skins/disabled/MonoBook.tpl new file mode 100644 index 00000000..a5a259c8 --- /dev/null +++ b/skins/disabled/MonoBook.tpl @@ -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§ion=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}}" /> + <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> </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 index 00000000..0474ad7c --- /dev/null +++ b/skins/disabled/MonoBookCBT.php @@ -0,0 +1,1390 @@ +<?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 = $this->makeUrl('-','action=raw&smaxage=0&gen=js'); + } else { + $url = $this->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( $this->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( $this->makeNSUrl('Common.css', $query, NS_MEDIAWIKI) ) . "\n"; + $sitecss .= $this->makeStylesheetLink( $this->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( $this->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 = $this->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("newtalkseperator")); + $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->userCanEdit()), 'dynamic' ); } + function can_move() { return cbt_value( (string)($this->mTitle->userCanMove()), '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 $this->makeI18nUrl( 'mainpage' ); } + + 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 = $this->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 $this->makeSpecialUrl('Upload'); + } + } + + function nav_specialpages() { + return $this->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 = $this->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/htmldump/lookup.js b/skins/htmldump/lookup.js new file mode 100644 index 00000000..5fd8d019 --- /dev/null +++ b/skins/htmldump/lookup.js @@ -0,0 +1,91 @@ +/** + * "Go" function for static HTML dump + */ +function goToStatic(depth) { + var url = getStaticURL(document.getElementById("searchInput").value, depth); + if (url != "") { + location = url; + } else { + alert("Invalid title"); + } +} + +/** + * Determine relative path for a given non-canonical title + */ +function getStaticURL(text, depth) { + var pdbk = getPDBK(text); + if (pdbk == "") { + return ""; + } else { + var i; + var path = getHashedDirectory(pdbk, depth) + "/" + getFriendlyName(pdbk) + ".html"; + if (!/(index\.html|\/)$/.exec(location)) { + for (i = 0; i < depth; i++) { + path = "../" + path; + } + } + return path; + } +} + +function getPDBK(text) { + // Spaces to underscores + text = text.replace(/ /g, "_"); + + // Trim leading and trailing space + text = text.replace(/^_+/g, ""); + text = text.replace(/_+$/g, ""); + + // Capitalise first letter + return ucfirst(text); +} + +function getHashedDirectory(pdbk, depth) { + // Find the first colon if there is one, use characters after it + var dbk = pdbk.replace(/^[^:]*:_*(.*)$/, "$1"); + var i, c, dir = ""; + + for (i=0; i < depth; i++) { + if (i) { + dir += "/"; + } + if (i >= dbk.length) { + dir += "_"; + } else { + c = dbk.charAt(i); + cc = dbk.charCodeAt(i); + + if (cc >= 128 || /[a-zA-Z0-9!#$%&()+,[\]^_`{}-]/.exec(c)) { + dir += c.toLowerCase(); + } else { + dir += binl2hex([cc]).substr(0,2).toUpperCase(); + } + } + } + return dir; +} + +function ucfirst(s) { + return s.charAt(0).toUpperCase() + s.substring(1, s.length); +} + +function getFriendlyName(name) { + // Replace illegal characters for Windows paths with underscores + var friendlyName = name.replace(/[\/\\*?"<>|~]/g, "_"); + + // Work out lower case form. We assume we're on a system with case-insensitive + // filenames, so unless the case is of a special form, we have to disambiguate + var lowerCase = ucfirst(name.toLowerCase()); + + // Make it mostly unique + if (lowerCase != friendlyName) { + friendlyName += "_" + hex_md5(_to_utf8(name)).substring(0, 4); + } + // Handle colon specially by replacing it with tilde + // Thus we reduce the number of paths with hashes appended + friendlyName = friendlyName.replace(":", "~"); + + return friendlyName; +} + diff --git a/skins/htmldump/main.css b/skins/htmldump/main.css new file mode 100644 index 00000000..d1b4a92b --- /dev/null +++ b/skins/htmldump/main.css @@ -0,0 +1,9 @@ +@import "../monobook/main.css"; + +#footer li { + display: block; +} +head:first-child + body #footer li { white-space: normal; } +.usermessage { display: none; } +.editsection { display: none; } + diff --git a/skins/htmldump/md5.js b/skins/htmldump/md5.js new file mode 100644 index 00000000..46d2aab7 --- /dev/null +++ b/skins/htmldump/md5.js @@ -0,0 +1,256 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_md5(s){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));} +function b64_md5(s){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));} +function str_md5(s){ return binl2str(core_md5(str2binl(s), s.length * chrsz));} +function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); } +function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); } +function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); } + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() +{ + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Calculate the HMAC-MD5, of a key and some data + */ +function core_hmac_md5(key, data) +{ + var bkey = str2binl(key); + if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz); + return core_md5(opad.concat(hash), 512 + 128); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert a string to an array of little-endian words + * If chrsz is ASCII, characters >255 have their hi-byte silently ignored. + */ +function str2binl(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32); + return bin; +} + +/* + * Convert an array of little-endian words to a string + */ +function binl2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask); + return str; +} + +/* + * Convert an array of little-endian words to a hex string. + */ +function binl2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of little-endian words to a base-64 string + */ +function binl2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} diff --git a/skins/htmldump/utf8.js b/skins/htmldump/utf8.js new file mode 100644 index 00000000..ea3b890c --- /dev/null +++ b/skins/htmldump/utf8.js @@ -0,0 +1,72 @@ +/** + * Obtained from http://homepage3.nifty.com/aokura/jscript/index.html + * The webpage says, among other things: + * * ソースコードの全てあるいは一部を使用したことにより生じた損害に関しては一切責任を負いません。 + * * ソースコードの使用、配布に制限はありません。ご自由にお使いください。 + * * 動作チェックが不充分な場合もありますので、注意してください。 + * + * Which, loosely translated, means: + * * The author takes no responsibility for damage which occurs due to the use of this code. + * * There is no restriction on the use and distribution of the source code. Please use freely. + * * Please be careful, testing may have been insufficient. + */ + + +/********************************************************************** + * + * Unicode ⇔ UTF-8 + * + * Copyright (c) 2005 AOK <soft@aokura.com> + * + **********************************************************************/ + +function _to_utf8(s) { + var c, d = ""; + for (var i = 0; i < s.length; i++) { + c = s.charCodeAt(i); + if (c <= 0x7f) { + d += s.charAt(i); + } else if (c >= 0x80 && c <= 0x7ff) { + d += String.fromCharCode(((c >> 6) & 0x1f) | 0xc0); + d += String.fromCharCode((c & 0x3f) | 0x80); + } else { + d += String.fromCharCode((c >> 12) | 0xe0); + d += String.fromCharCode(((c >> 6) & 0x3f) | 0x80); + d += String.fromCharCode((c & 0x3f) | 0x80); + } + } + return d; +} + +function _from_utf8(s) { + var c, d = "", flag = 0, tmp; + for (var i = 0; i < s.length; i++) { + c = s.charCodeAt(i); + if (flag == 0) { + if ((c & 0xe0) == 0xe0) { + flag = 2; + tmp = (c & 0x0f) << 12; + } else if ((c & 0xc0) == 0xc0) { + flag = 1; + tmp = (c & 0x1f) << 6; + } else if ((c & 0x80) == 0) { + d += s.charAt(i); + } else { + flag = 0; + } + } else if (flag == 1) { + flag = 0; + d += String.fromCharCode(tmp | (c & 0x3f)); + } else if (flag == 2) { + flag = 3; + tmp |= (c & 0x3f) << 6; + } else if (flag == 3) { + flag = 0; + d += String.fromCharCode(tmp | (c & 0x3f)); + } else { + flag = 0; + } + } + return d; +} + diff --git a/skins/monobook/IE50Fixes.css b/skins/monobook/IE50Fixes.css new file mode 100644 index 00000000..027e32ed --- /dev/null +++ b/skins/monobook/IE50Fixes.css @@ -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 index 00000000..637daae1 --- /dev/null +++ b/skins/monobook/IE55Fixes.css @@ -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 index 00000000..6b646c70 --- /dev/null +++ b/skins/monobook/IE60Fixes.css @@ -0,0 +1,84 @@ +/* 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; +} +/*{ border:1px solid Red !important;}*/ + diff --git a/skins/monobook/IE70Fixes.css b/skins/monobook/IE70Fixes.css new file mode 100644 index 00000000..2a2c9c77 --- /dev/null +++ b/skins/monobook/IE70Fixes.css @@ -0,0 +1,75 @@ +/* 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. + */ + padding-top: 0; +} +.rtl #column-one #p-navigation { + 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 index 00000000..f1b05719 --- /dev/null +++ b/skins/monobook/IEMacFixes.css @@ -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 index 00000000..97fba0c4 --- /dev/null +++ b/skins/monobook/KHTMLFixes.css @@ -0,0 +1,3 @@ +/* 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 index 00000000..88704739 --- /dev/null +++ b/skins/monobook/Opera6Fixes.css @@ -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 index 00000000..446ea44c --- /dev/null +++ b/skins/monobook/Opera7Fixes.css @@ -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/bullet.gif b/skins/monobook/bullet.gif Binary files differnew file mode 100644 index 00000000..b43de48a --- /dev/null +++ b/skins/monobook/bullet.gif diff --git a/skins/monobook/discussionitem_icon.gif b/skins/monobook/discussionitem_icon.gif Binary files differnew file mode 100644 index 00000000..baec471a --- /dev/null +++ b/skins/monobook/discussionitem_icon.gif diff --git a/skins/monobook/external.png b/skins/monobook/external.png Binary files differnew file mode 100644 index 00000000..419c06fb --- /dev/null +++ b/skins/monobook/external.png diff --git a/skins/monobook/file_icon.gif b/skins/monobook/file_icon.gif Binary files differnew file mode 100644 index 00000000..847f6485 --- /dev/null +++ b/skins/monobook/file_icon.gif diff --git a/skins/monobook/headbg.jpg b/skins/monobook/headbg.jpg Binary files differnew file mode 100644 index 00000000..5491c6e4 --- /dev/null +++ b/skins/monobook/headbg.jpg diff --git a/skins/monobook/link_icon.gif b/skins/monobook/link_icon.gif Binary files differnew file mode 100644 index 00000000..815ccb1b --- /dev/null +++ b/skins/monobook/link_icon.gif diff --git a/skins/monobook/lock_icon.gif b/skins/monobook/lock_icon.gif Binary files differnew file mode 100644 index 00000000..8a87e283 --- /dev/null +++ b/skins/monobook/lock_icon.gif diff --git a/skins/monobook/magnify-clip.png b/skins/monobook/magnify-clip.png Binary files differnew file mode 100644 index 00000000..992aa2e3 --- /dev/null +++ b/skins/monobook/magnify-clip.png diff --git a/skins/monobook/mail_icon.gif b/skins/monobook/mail_icon.gif Binary files differnew file mode 100644 index 00000000..50a87a9a --- /dev/null +++ b/skins/monobook/mail_icon.gif diff --git a/skins/monobook/main.css b/skins/monobook/main.css new file mode 100644 index 00000000..6373d18f --- /dev/null +++ b/skins/monobook/main.css @@ -0,0 +1,1448 @@ +/* +** 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 1.5em 1em; + background: white; + color: black; + border: 1px solid #aaa; + border-right: none; + line-height: 1.5em; + position: relative; + z-index: 2; +} +#column-one { + padding-top: 160px; +} +/* 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 { + background: white; + font-size: 100%; + color: black; +} +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%; } +h2 { font-size: 150%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} +h3 { font-size: 132%; } +h4 { font-size: 116%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } + +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; +} +legend { + background: white; + 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; +} + +/* 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; +} +.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; + 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.thumb div { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +div.thumb div a img { + border: 1px solid #ccc; +} +div.thumb div div.thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: .3em 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: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} + +.hiddenStructure { + display: none; + speak: none; +} +img.tex { + vertical-align: middle; +} +span.texhtml { + font-family: serif; +} + +/* +** 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%; +} +div.townBox { + position: relative; + float: right; + background: white; + margin-left: 1em; + border: 1px solid gray; + padding: .3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 .3em; + font-size: 96%; +} +div.townBox dl dt { + background: none; + margin: .4em 0 0; +} +div.townBox dl dd { + margin: .1em 0 0 1.1em; + background-color: #f3f3f3; +} + +/* +** edit views etc +*/ +.special li { + line-height: 1.4em; + margin: 0; + padding: 0; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { + color: gray; +} +#pagehistory span.user { + margin-left: 1.4em; + margin-right: .4em; +} +#pagehistory span.minor { + font-weight: bold; +} +#pagehistory li { + border: 1px solid white; +} +#pagehistory li.selected { + background-color: #f9f9f9; + border: 1px dashed #aaa; +} + +/* +** Diff rendering +*/ +table.diff, td.diff-otitle, td.diff-ntitle { + background-color: white; +} +td.diff-addedline { + background: #cfc; + font-size: smaller; +} +td.diff-deletedline { + background: #ffa; + font-size: smaller; +} +td.diff-context { + background: #eee; + font-size: smaller; +} +span.diffchange { + color: red; + font-weight: bold; +} + +/* +** 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://"], +.link-irc { + background: url(discussionitem_icon.gif) center right no-repeat; + padding-right: 18px; +} +/* 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 { + z-index: 3; + position: absolute; /*needed to use z-index */ + top: 0; + left: 0; + 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; +} + +/* +** the navigation portlet +*/ + +#p-navigation { + position: relative; + z-index: 3; +} + +#p-navigation .pBody { + padding-right: 0; +} + +#p-navigation a { + display: block; +} + +#p-navigation li.active a, #p-navigation li.active a:hover { + text-decoration: none; + display: inline; + font-weight: bold; +} + + +/* +** 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 { + width: 100%; + white-space: nowrap; + padding: 0; + margin: 0; + position: absolute; + left: 0; + top: 0; + z-index: 0; + border: none; + background: none; + overflow: visible; + line-height: 1.2em; +} + +#p-personal h5 { + display: none; +} +#p-personal .portlet, +#p-personal .pBody { + padding: 0; + margin: 0; + border: none; + z-index: 0; + 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; + text-transform: lowercase; + 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.active { + font-weight: bold; +} +#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; +} + +/* +** 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 .hiddenStructure { + display: none; +} +#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; + text-decoration: none; + text-transform: lowercase; + position: relative; + z-index: 0; + margin: 0; +} +#p-cactions li.selected a { + z-index: 3; + background-color: #fff; + padding: 0 1em .2em!important; +} +#p-cactions .new a { + color: #ba0000; +} +#p-cactions li a:hover { + z-index: 3; + text-decoration: none; + background-color: #fff; +} +#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; +} + +/* +** the remaining portlets +*/ +#p-tbx, +#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; +} +/* hide from incapable browsers */ +head:first-child+body #footer li { white-space: nowrap; } +#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 { + margin: 1px -2px 1px 2px; + float: left; + padding: 2px 0 3px 0; + background-color: #f0f0f0; + color: #000; + 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: 95%; + margin-top: 0; + background-color: #FFC1C1; + padding: .2em .7em; + clear: both; +} +.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; +} + +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 { + border: 1px solid #bbb; + padding: 1.5em 2em; + width: 400px; + background-color: white; +} + + +#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 { + font-size: 75%; + text-align: right; +} +span.newpage, span.minor, span.searchmatch, span.bot { + font-weight: bold; +} +span.unpatrolled { + font-weight: bold; + color: red; +} + +span.searchmatch { + color: red; +} +.sharedUploadNotice { + font-style: italic; +} + +span.updatedmarker { + color: black; + background-color: #0f0; +} +span.newpageletter { + font-weight: bold; + color: black; + background-color: yellow; +} +span.minoreditletter { + color: black; + background-color: #c5ffe6; +} + +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; +} + +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +} + +div.gallerybox { + margin: 2px; + width: 150px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; +} + +div.gallerytext { + 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; +} + +li span.deleted, span.history-deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +.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; +} + +/* @bug 1714 */ +input#wpSave, input#wpDiff { + margin-right: 0.33em; +} + +#editform .editOptions { + display: inline; +} + +#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"; +} + diff --git a/skins/monobook/news_icon.png b/skins/monobook/news_icon.png Binary files differnew file mode 100644 index 00000000..dd1541d1 --- /dev/null +++ b/skins/monobook/news_icon.png diff --git a/skins/monobook/required.gif b/skins/monobook/required.gif Binary files differnew file mode 100644 index 00000000..bd719769 --- /dev/null +++ b/skins/monobook/required.gif diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css new file mode 100644 index 00000000..91e2fb37 --- /dev/null +++ b/skins/monobook/rtl.css @@ -0,0 +1,212 @@ +/* +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: bidi-override;*/ + 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; +} +/* 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, +#div.townBox, +#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; +} +div.townBox { + margin-left: 0; + margin-right: 1em; +} +div.townBox dl dd { + margin-left: 0; + margin-right: 1.1em; +} +#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; +} diff --git a/skins/monobook/user.gif b/skins/monobook/user.gif Binary files differnew file mode 100644 index 00000000..bc934396 --- /dev/null +++ b/skins/monobook/user.gif diff --git a/skins/monobook/wiki-indexed.png b/skins/monobook/wiki-indexed.png Binary files differnew file mode 100644 index 00000000..189a2ae3 --- /dev/null +++ b/skins/monobook/wiki-indexed.png diff --git a/skins/monobook/wiki.png b/skins/monobook/wiki.png Binary files differnew file mode 100644 index 00000000..69fce988 --- /dev/null +++ b/skins/monobook/wiki.png diff --git a/skins/myskin/main.css b/skins/myskin/main.css new file mode 100644 index 00000000..f3ab0204 --- /dev/null +++ b/skins/myskin/main.css @@ -0,0 +1 @@ +/* this file must be empty */ diff --git a/skins/simple/discussionitem_icon.gif b/skins/simple/discussionitem_icon.gif Binary files differnew file mode 100644 index 00000000..baec471a --- /dev/null +++ b/skins/simple/discussionitem_icon.gif diff --git a/skins/simple/external.png b/skins/simple/external.png Binary files differnew file mode 100644 index 00000000..419c06fb --- /dev/null +++ b/skins/simple/external.png diff --git a/skins/simple/file_icon.gif b/skins/simple/file_icon.gif Binary files differnew file mode 100644 index 00000000..847f6485 --- /dev/null +++ b/skins/simple/file_icon.gif diff --git a/skins/simple/link_icon.gif b/skins/simple/link_icon.gif Binary files differnew file mode 100644 index 00000000..815ccb1b --- /dev/null +++ b/skins/simple/link_icon.gif diff --git a/skins/simple/lock_icon.gif b/skins/simple/lock_icon.gif Binary files differnew file mode 100644 index 00000000..8a87e283 --- /dev/null +++ b/skins/simple/lock_icon.gif diff --git a/skins/simple/mail_icon.gif b/skins/simple/mail_icon.gif Binary files differnew file mode 100644 index 00000000..50a87a9a --- /dev/null +++ b/skins/simple/mail_icon.gif diff --git a/skins/simple/main.css b/skins/simple/main.css new file mode 100644 index 00000000..d55552fc --- /dev/null +++ b/skins/simple/main.css @@ -0,0 +1,404 @@ +#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; +} + +div.townBox { + position:relative; + float:right; + margin-left:1em; + padding:0.3em; + width: 200px; + overflow: hidden; + clear: right; +} +div.townBox dl { + padding: 0; + margin: 0 0 0.3em 0; +} +div.townBox dl dt { + background: none; + margin: 0.4em 0 0 0; +} +div.townBox dl dd { + margin: 0.1em 0 0 1.1em; +} +.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%; +} + +#p-personal li, #p-personal ul, +#p-tb li, #p-tb ul, +#p-navigation li, #p-navigation ul, +#p-cactions li, #p-cactions ul, +#p-newlinks li, #p-newlinks ul { + padding-left: 0em; + margin-left: 0.5em; +} + +#p-cactions li, #p-cactions ul { + margin-left: 0.7em; +} + +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://"], +.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; +} + +span.diffchange { background-color: #FFCDF3; } +.autocomment { color: grey; } +#pagehistory span.user { + margin-left: 1.4em; + margin-right: 0.4em; +} +#pagehistory span.minor { font-weight: bold; } +#pagehistory li.selected { + background-color:#f9f9f9; + border:1px dashed #aaaaaa; +} +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; + 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; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; +} + +a.stub { color: #772233; } +a.new, +#p-personal a.new { + text-decoration: line-through; +} +li.new { + text-decoration: line-through; +} +p.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; +} + + +#ca-addsection a:before { + content: "Add section"; + font-size: 10pt; +} + +#ca-addsection a { + font-size: 0px; +} + +#n-portal, +#n-currentevents, +#n-help, +#n-sitesupport { + display: none; +} + +span.searchmatch { + font-weight: bold; +} + +#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; +} |