From: Matt Lee Date: Mon, 20 Jul 2009 20:57:49 +0000 (+0000) Subject: checked in skins, courtesy of djbclark X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=64a19c3de221c2aa567edd3372c6b17239452d1f;p=libreplanet-static.git checked in skins, courtesy of djbclark --- diff --git a/skins/Chick.deps.php b/skins/Chick.deps.php new file mode 100644 index 00000000..a7cb0844 --- /dev/null +++ b/skins/Chick.deps.php @@ -0,0 +1,13 @@ +skinname = 'chick'; + $this->stylename = 'chick'; + $this->template = 'MonoBookTemplate'; + } + + function setupSkinUserCss( OutputPage $out ){ + parent::setupSkinUserCss( $out ); + // Append to the default screen common & print styles... + $out->addStyle( 'chick/main.css', 'screen,handheld' ); + $out->addStyle( 'chick/IE50Fixes.css', 'screen,handheld', 'lt IE 5.5000' ); + $out->addStyle( 'chick/IE55Fixes.css', 'screen,handheld', 'IE 5.5000' ); + $out->addStyle( 'chick/IE60Fixes.css', 'screen,handheld', 'IE 6' ); + } +} + + diff --git a/skins/CologneBlue.php b/skins/CologneBlue.php new file mode 100644 index 00000000..f3806dc9 --- /dev/null +++ b/skins/CologneBlue.php @@ -0,0 +1,311 @@ +qbSetting(); + $mainPageObj = Title::newMainPage(); + + $s .= "\n
\n
" . + ""; + + $s .= "
"; + $s .= "escapeLocalURL() . "\">"; + $s .= "" . wfMsg( "sitetitle" ) . ""; + + $s .= ""; + $s .= $this->sysLinks(); + $s .= "
"; + + $s .= ""; + $s .= htmlspecialchars( wfMsg( "sitesubtitle" ) ) . ""; + $s .= "" ; + + $s .= "" ; + $s .= str_replace ( "
" , "" , $this->otherLanguages() ); + $cat = $this->getCategoryLinks(); + if( $cat ) $s .= "
$cat\n"; + $s .= "
" . $this->pageTitleLinks(); + $s .= "
"; + + $s .= "
\n"; + + $s .= "\n
\n
"; + + $notice = wfGetSiteNotice(); + if( $notice ) { + $s .= "\n
$notice
\n"; + } + $s .= $this->pageTitle(); + $s .= $this->pageSubtitle() . "\n"; + return $s; + } + + function doAfterContent() + { + global $wgOut; + + $s = "\n

\n"; + + $s .= "\n\n
\n"; + + if ( 0 != $qb ) { $s .= $this->quickBar(); } + return $s; + } + + function reallyGenerateUserStylesheet() { + $s = parent::reallyGenerateUserStylesheet(); + $qb = $this->qbSetting(); + + if ( 2 == $qb ) { # Right + $s .= "#quickbar { position: absolute; right: 4px; }\n" . + "#article { margin-left: 4px; margin-right: 148px; }\n"; + } else if ( 1 == $qb ) { + $s .= "#quickbar { position: absolute; left: 4px; }\n" . + "#article { margin-left: 148px; margin-right: 4px; }\n"; + } else if ( 3 == $qb ) { # Floating left + $s .= "#quickbar { position:absolute; left:4px } \n" . + "#topbar { margin-left: 148px }\n" . + "#article { margin-left:148px; margin-right: 4px; } \n" . + "body>#quickbar { position:fixed; left:4px; top:4px; overflow:auto ;bottom:4px;} \n"; # Hides from IE + } else if ( 4 == $qb ) { # Floating right + $s .= "#quickbar { position: fixed; right: 4px; } \n" . + "#topbar { margin-right: 148px }\n" . + "#article { margin-right: 148px; margin-left: 4px; } \n" . + "body>#quickbar { position: fixed; right: 4px; top: 4px; overflow: auto ;bottom:4px;} \n"; # Hides from IE + } + return $s; + } + + function sysLinks() { + global $wgUser, $wgContLang, $wgTitle; + $li = $wgContLang->specialPage("Userlogin"); + $lo = $wgContLang->specialPage("Userlogout"); + + $rt = $wgTitle->getPrefixedURL(); + if ( 0 == strcasecmp( urlencode( $lo ), $rt ) ) { + $q = ""; + } else { + $q = "returnto={$rt}"; + } + + $s = "" . + $this->mainPageLink() + . " | " . + $this->makeKnownLink( wfMsgForContent( "aboutpage" ), wfMsg( "about" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "helppage" ), wfMsg( "help" ) ) + . " | " . + $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") ) + . " | " . + $this->specialLink( "specialpages" ); + + /* show links to different language variants */ + $s .= $this->variantLinks(); + $s .= $this->extensionTabLinks(); + + $s .= " | "; + if ( $wgUser->isLoggedIn() ) { + $s .= $this->makeKnownLink( $lo, wfMsg( "logout" ), $q ); + } else { + $s .= $this->makeKnownLink( $li, wfMsg( "login" ), $q ); + } + + return $s; + } + + /** + * Compute the sidebar + * @access private + */ + function quickBar() + { + global $wgOut, $wgTitle, $wgUser, $wgLang, $wgContLang, $wgEnableUploads; + + $tns=$wgTitle->getNamespace(); + + $s = "\n
"; + + $sep = "
"; + $s .= $this->menuHead( "qbfind" ); + $s .= $this->searchForm(); + + $s .= $this->menuHead( "qbbrowse" ); + + # Use the first heading from the Monobook sidebar as the "browse" section + $bar = $this->buildSidebar(); + unset( $bar['SEARCH'] ); + unset( $bar['LANGUAGES'] ); + unset( $bar['TOOLBOX'] ); + $browseLinks = reset( $bar ); + + foreach ( $browseLinks as $link ) { + if ( $link['text'] != '-' ) { + $s .= "" . + htmlspecialchars( $link['text'] ) . '' . $sep; + } + } + + if ( $wgOut->isArticle() ) { + $s .= $this->menuHead( "qbedit" ); + $s .= "" . $this->editThisPage() . ""; + + $s .= $sep . $this->makeKnownLink( wfMsgForContent( "edithelppage" ), wfMsg( "edithelp" ) ); + + if( $wgUser->isLoggedIn() ) { + $s .= $sep . $this->moveThisPage(); + } + if ( $wgUser->isAllowed('delete') ) { + $dtp = $this->deleteThisPage(); + if ( "" != $dtp ) { + $s .= $sep . $dtp; + } + } + if ( $wgUser->isAllowed('protect') ) { + $ptp = $this->protectThisPage(); + if ( "" != $ptp ) { + $s .= $sep . $ptp; + } + } + $s .= $sep; + + $s .= $this->menuHead( "qbpageoptions" ); + $s .= $this->talkLink() + . $sep . $this->commentLink() + . $sep . $this->printableLink(); + if ( $wgUser->isLoggedIn() ) { + $s .= $sep . $this->watchThisPage(); + } + + $s .= $sep; + + $s .= $this->menuHead("qbpageinfo") + . $this->historyLink() + . $sep . $this->whatLinksHere() + . $sep . $this->watchPageLinksLink(); + + if( $tns == NS_USER || $tns == NS_USER_TALK ) { + $id=User::idFromName($wgTitle->getText()); + if ($id != 0) { + $s .= $sep . $this->userContribsLink(); + if( $this->showEmailUser( $id ) ) { + $s .= $sep . $this->emailUserLink(); + } + } + } + $s .= $sep; + } + + $s .= $this->menuHead( "qbmyoptions" ); + if ( $wgUser->isLoggedIn() ) { + $name = $wgUser->getName(); + $tl = $this->makeKnownLinkObj( $wgUser->getTalkPage(), + wfMsg( 'mytalk' ) ); + if ( $wgUser->getNewtalk() ) { + $tl .= " *"; + } + + $s .= $this->makeKnownLinkObj( $wgUser->getUserPage(), + wfMsg( "mypage" ) ) + . $sep . $tl + . $sep . $this->specialLink( "watchlist" ) + . $sep . $this->makeKnownLinkObj( SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), + wfMsg( "mycontris" ) ) + . $sep . $this->specialLink( "preferences" ) + . $sep . $this->specialLink( "userlogout" ); + } else { + $s .= $this->specialLink( "userlogin" ); + } + + $s .= $this->menuHead( "qbspecialpages" ) + . $this->specialLink( "newpages" ) + . $sep . $this->specialLink( "imagelist" ) + . $sep . $this->specialLink( "statistics" ); + if ( $wgUser->isLoggedIn() && $wgEnableUploads ) { + $s .= $sep . $this->specialLink( "upload" ); + } + global $wgSiteSupportPage; + if( $wgSiteSupportPage) { + $s .= $sep."" + .wfMsg( "sitesupport" ).""; + } + + $s .= $sep . $this->makeKnownLinkObj( + SpecialPage::getTitleFor( 'Specialpages' ), + wfMsg( 'moredotdotdot' ) ); + + $s .= $sep . "\n
\n"; + return $s; + } + + function menuHead( $key ) + { + $s = "\n
" . wfMsg( $key ) . "
"; + return $s; + } + + function searchForm( $label = "" ) + { + global $wgRequest; + + $search = $wgRequest->getText( 'search' ); + $action = $this->escapeSearchLink(); + $s = "
searchboxes}\" method=\"get\" class=\"inline\" action=\"$action\">"; + if ( "" != $label ) { $s .= "{$label}: "; } + + $s .= "searchboxes}\" class=\"mw-searchInput\" name=\"search\" size=\"14\" value=\"" + . htmlspecialchars(substr($search,0,256)) . "\" />
" + . "searchboxes}\" class=\"searchButton\" name=\"go\" value=\"" . htmlspecialchars( wfMsg( "searcharticle" ) ) . "\" />" + . "searchboxes}\" class=\"searchButton\" name=\"fulltext\" value=\"" . htmlspecialchars( wfMsg( "search" ) ) . "\" />
"; + + // Ensure unique id's for search boxes made after the first + $this->searchboxes = $this->searchboxes == '' ? 2 : $this->searchboxes + 1; + + return $s; + } +} + + diff --git a/skins/Modern.deps.php b/skins/Modern.deps.php new file mode 100644 index 00000000..e76ab997 --- /dev/null +++ b/skins/Modern.deps.php @@ -0,0 +1,12 @@ +Powered by MediaWiki $wgVersion"; + } + + function initPage( OutputPage $out ) { + parent::initPage( $out ); + $this->skinname = 'modern'; + $this->stylename = 'modern'; + $this->template = 'ModernTemplate'; + } + + function setupSkinUserCss( OutputPage $out ){ + // Do not call parent::setupSkinUserCss(), we have our own print style + $out->addStyle( 'common/shared.css', 'screen' ); + $out->addStyle( 'modern/main.css', 'screen' ); + $out->addStyle( 'modern/print.css', 'print' ); + $out->addStyle( 'modern/rtl.css', 'screen', '', 'rtl' ); + } +} + +/** + * @todo document + * @ingroup Skins + */ +class ModernTemplate extends QuickTemplate { + var $skin; + /** + * Template filter callback for Modern skin. + * Takes an associative array of data set from a SkinTemplate-based + * class, and a wrapper for MediaWiki's localization database, and + * outputs a formatted page. + * + * @access private + */ + function execute() { + global $wgRequest; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + + // Suppress warnings to prevent notices about missing indexes in $this->data + wfSuppressWarnings(); + +?> +data['xhtmlnamespaces'] as $tag => $ns) { + ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> + + + html('headlinks') ?> + <?php $this->text('pagetitle') ?> + html('csslinks') ?> + + + data ); ?> + + + +html('headscripts') ?> +data['jsvarurl' ]) { ?> + + +data['pagecss' ]) { ?> + +data['usercss' ]) { ?> + +data['userjs' ]) { ?> + +data['userjsprev']) { ?> + +data['trackbackhtml']) print $this->data['trackbackhtml']; ?> + +data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" +data['body_onload' ]) { ?> onload="text('body_onload') ?>" + class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> + + +

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

+ +
+
+ +
+
msg('views') ?>
+ +
+ + +
+ +
+
+ +
msg('tagline') ?>
+ data['newtalk'] ) { + ?>
html('newtalk') ?>
+ + data['sitenotice']) { + ?>
html('sitenotice') ?>
+ +
+ +
html('subtitle') ?>
+ + data['undelete']) { ?>
html('undelete') ?>
+ data['showjumplinks']) { ?> + + html('bodytext') ?> +
+ data['catlinks']) { $this->html('catlinks'); } ?> + html ('dataAfterContent') ?> +
+
+
+ +
+ + + data['sidebar']; + if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; + if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; + if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; + + foreach ($sidebar as $boxName => $cont) { + if ( $boxName == 'SEARCH' ) { + $this->searchBox(); + } elseif ( $boxName == 'TOOLBOX' ) { + $this->toolbox(); + } elseif ( $boxName == 'LANGUAGES' ) { + $this->languageBox(); + } else { + $this->customBox( $boxName, $cont ); + } + } + ?> + +
+ + +
+ +
+ + +
+
msg('personaltools') ?>
+
+ +
+
+ + + + + + html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> +html('reporttime') ?> +data['debug'] ): ?> + + + + + + + + +
+
msg('toolbox') ?>
+
+ +
+
+ + +data['language_urls'] ) { ?> +
+
msg('otherlanguages') ?>
+
+
    +data['language_urls'] as $langlink) { ?> +
  • + +
+
+
+ +
skin->tooltip('p-'.$bar) ?>> +
+
+ + + +
+
+ diff --git a/skins/MonoBook.deps.php b/skins/MonoBook.deps.php new file mode 100644 index 00000000..dda24e0e --- /dev/null +++ b/skins/MonoBook.deps.php @@ -0,0 +1,12 @@ +skinname = 'monobook'; + $this->stylename = 'monobook'; + $this->template = 'MonoBookTemplate'; + + } + + function setupSkinUserCss( OutputPage $out ) { + global $wgHandheldStyle; + + parent::setupSkinUserCss( $out ); + + // Append to the default screen common & print styles... + $out->addStyle( 'monobook/main.css', 'screen' ); + if( $wgHandheldStyle ) { + // Currently in testing... try 'chick/main.css' + $out->addStyle( $wgHandheldStyle, 'handheld' ); + } + + $out->addStyle( 'monobook/IE50Fixes.css', 'screen', 'lt IE 5.5000' ); + $out->addStyle( 'monobook/IE55Fixes.css', 'screen', 'IE 5.5000' ); + $out->addStyle( 'monobook/IE60Fixes.css', 'screen', 'IE 6' ); + $out->addStyle( 'monobook/IE70Fixes.css', 'screen', 'IE 7' ); + + $out->addStyle( 'monobook/rtl.css', 'screen', '', 'rtl' ); + } +} + +/** + * @todo document + * @ingroup Skins + */ +class MonoBookTemplate extends QuickTemplate { + var $skin; + /** + * Template filter callback for MonoBook skin. + * Takes an associative array of data set from a SkinTemplate-based + * class, and a wrapper for MediaWiki's localization database, and + * outputs a formatted page. + * + * @access private + */ + function execute() { + global $wgRequest; + $this->skin = $skin = $this->data['skin']; + $action = $wgRequest->getText( 'action' ); + + // Suppress warnings to prevent notices about missing indexes in $this->data + wfSuppressWarnings(); + +?> +data['xhtmlnamespaces'] as $tag => $ns) { + ?>xmlns:xml:lang="text('lang') ?>" lang="text('lang') ?>" dir="text('dir') ?>"> + + + html('headlinks') ?> + <?php $this->text('pagetitle') ?> + html('csslinks') ?> + + + + data ); ?> + + + +html('headscripts') ?> +data['jsvarurl']) { ?> + + +data['pagecss']) { ?> + +data['usercss']) { ?> + +data['userjs']) { ?> + +data['userjsprev']) { ?> + +data['trackbackhtml']) print $this->data['trackbackhtml']; ?> + +data['body_ondblclick']) { ?> ondblclick="text('body_ondblclick') ?>" +data['body_onload']) { ?> onload="text('body_onload') ?>" + class="mediawiki text('dir') ?> text('pageclass') ?> text('skinnameclass') ?>"> +
+
+
+ + data['sitenotice']) { ?>
html('sitenotice') ?>
+

data['displaytitle']!=""?$this->html('title'):$this->text('title') ?>

+
+

msg('tagline') ?>

+
html('subtitle') ?>
+ data['undelete']) { ?>
html('undelete') ?>
+ data['newtalk'] ) { ?>
html('newtalk') ?>
+ data['showjumplinks']) { ?> + + html('bodytext') ?> + data['catlinks']) { $this->html('catlinks'); } ?> + + data['dataAfterContent']) { $this->html ('dataAfterContent'); } ?> +
+
+
+
+
+
+
msg('views') ?>
+ +
+
+
msg('personaltools') ?>
+
+ +
+
+ + +data['sidebar']; + if ( !isset( $sidebar['SEARCH'] ) ) $sidebar['SEARCH'] = true; + if ( !isset( $sidebar['TOOLBOX'] ) ) $sidebar['TOOLBOX'] = true; + if ( !isset( $sidebar['LANGUAGES'] ) ) $sidebar['LANGUAGES'] = true; + foreach ($sidebar as $boxName => $cont) { + if ( $boxName == 'SEARCH' ) { + $this->searchBox(); + } elseif ( $boxName == 'TOOLBOX' ) { + $this->toolbox(); + } elseif ( $boxName == 'LANGUAGES' ) { + $this->languageBox(); + } else { + $this->customBox( $boxName, $cont ); + } + } +?> +
+
+ +
+html('bottomscripts'); /* JS call to runBodyOnloadHook */ ?> +html('reporttime') ?> +data['debug'] ): ?> + + + + + + +
+
msg('toolbox') ?>
+
+ +
+
+data['language_urls'] ) { +?> +
+
msg('otherlanguages') ?>
+
+
    +data['language_urls'] as $langlink) { ?> +
  • + +
+
+
+ +
skin->tooltip('p-'.$bar) ?>> +
+
+ + + +
+
+skinname = 'myskin'; + $this->stylename = 'myskin'; + $this->template = 'MonoBookTemplate'; + } +} diff --git a/skins/Nostalgia.php b/skins/Nostalgia.php new file mode 100644 index 00000000..2b9b2f67 --- /dev/null +++ b/skins/Nostalgia.php @@ -0,0 +1,118 @@ +\n
\n"; + $s .= "
".$this->logoText( "right" )."
"; + + $s .= $this->pageTitle(); + $s .= $this->pageSubtitle() . "\n"; + + $s .= "
"; + $s .= $this->topLinks() . "\n
"; + + $notice = wfGetSiteNotice(); + if( $notice ) { + $s .= "\n
$notice
\n"; + } + $s .= $this->pageTitleLinks(); + + $ol = $this->otherLanguages(); + if($ol) $s .= "
" . $ol; + + $cat = $this->getCategoryLinks(); + if($cat) $s .= "
" . $cat; + + $s .= "

\n
\n"; + $s .= "\n
"; + + return $s; + } + + function topLinks() { + global $wgOut, $wgUser, $wgEnableUploads; + $sep = " |\n"; + + $s = $this->mainPageLink() . $sep + . $this->specialLink( 'recentchanges' ); + + if ( $wgOut->isArticle() ) { + $s .= $sep . $this->editThisPage() + . $sep . $this->historyLink(); + } + + /* show links to different language variants */ + $s .= $this->variantLinks(); + $s .= $this->extensionTabLinks(); + if ( $wgUser->isAnon() ) { + $s .= $sep . $this->specialLink( 'userlogin' ); + } else { + $name = $wgUser->getName(); + /* show user page and user talk links */ + $s .= $sep . $this->link( $wgUser->getUserPage(), wfMsgHtml( 'mypage' ) ); + $s .= $sep . $this->link( $wgUser->getTalkPage(), wfMsgHtml( 'mytalk' ) ); + if ( $wgUser->getNewtalk() ) { + $s .= ' *'; + } + /* show watchlist link */ + $s .= $sep . $this->specialLink( 'watchlist' ); + /* show my contributions link */ + $s .= $sep . $this->link( + SpecialPage::getSafeTitleFor( "Contributions", $wgUser->getName() ), + wfMsgHtml( 'mycontris' ) ); + /* show my preferences link */ + $s .= $sep . $this->specialLink( 'preferences' ); + /* show upload file link */ + if ( $wgEnableUploads ) { + $s .= $sep . $this->specialLink( 'upload' ); + } + /* show log out link */ + $s .= $sep . $this->specialLink( 'userlogout' ); + } + + $s .= $sep . $this->specialPagesList(); + + return $s; + } + + function doAfterContent() { + $s = "\n

\n"; + + $s .= "\n\n\n"; + + return $s; + } +} + + diff --git a/skins/Simple.deps.php b/skins/Simple.deps.php new file mode 100644 index 00000000..99fadc6d --- /dev/null +++ b/skins/Simple.deps.php @@ -0,0 +1,13 @@ +skinname = 'simple'; + $this->stylename = 'simple'; + $this->template = 'MonoBookTemplate'; + } + + function setupSkinUserCss( OutputPage $out ){ + $out->addStyle( 'simple/main.css', 'screen' ); + $out->addStyle( 'simple/rtl.css', '', '', 'rtl' ); + + } + + function reallyGenerateUserStylesheet() { + global $wgUser; + $s = ''; + if (($undopt = $wgUser->getOption("underline")) != 2) { + $underline = $undopt ? 'underline' : 'none'; + $s .= "a { text-decoration: $underline; }\n"; + } + if ($wgUser->getOption('highlightbroken')) { + $s .= "a.new, #quickbar a.new { text-decoration: line-through; }\n"; + } else { + $s .= <<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 @@ + diff --git a/skins/Standard.php b/skins/Standard.php new file mode 100644 index 00000000..1f3cab95 --- /dev/null +++ b/skins/Standard.php @@ -0,0 +1,296 @@ +qbSetting() ) { # Floating left + $s .= "\n"; + } + return $s; + } + + /** + * + */ + function setupSkinUserCss( OutputPage $out ){ + if ( 3 == $this->qbSetting() ) { # Floating left + $out->addStyle( 'common/quickbar.css' ); + } else if ( 4 == $this->qbSetting() ) { # Floating right + $out->addStyle( 'common/quickbar-right.css' ); + } + parent::setupSkinUserCss( $out ); + } + + /** + * + */ + function reallyGenerateUserStylesheet() { + $s = parent::reallyGenerateUserStylesheet(); + $qb = $this->qbSetting(); + + if ( 2 == $qb ) { # Right + $s .= "#quickbar { position: absolute; top: 4px; right: 4px; " . + "border-left: 2px solid #000000; }\n" . + "#article, #mw-data-after-content { margin-left: 4px; margin-right: 152px; }\n"; + } else if ( 1 == $qb || 3 == $qb ) { + $s .= "#quickbar { position: absolute; top: 4px; left: 4px; " . + "border-right: 1px solid gray; }\n" . + "#article, #mw-data-after-content { margin-left: 152px; margin-right: 4px; }\n"; + } else if ( 4 == $qb) { + $s .= "#quickbar { border-right: 1px solid gray; }\n" . + "#article, #mw-data-after-content { margin-right: 152px; margin-left: 4px; }\n"; + } + return $s; + } + + /** + * + */ + function getBodyOptions() { + $a = parent::getBodyOptions(); + + if ( 3 == $this->qbSetting() ) { # Floating left + $qb = "setup(\"quickbar\")"; + if($a["onload"]) { + $a["onload"] .= ";$qb"; + } else { + $a["onload"] = $qb; + } + } + return $a; + } + + function doAfterContent() { + global $wgContLang; + $fname = 'SkinStandard::doAfterContent'; + wfProfileIn( $fname ); + wfProfileIn( $fname.'-1' ); + + $s = "\n
\n"; + $s .= "\n\n\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
"; + $s .= "\n" . $this->logoText() . "\n
"; + + $sep = "\n
"; + + # Use the first heading from the Monobook sidebar as the "browse" section + $bar = $this->buildSidebar(); + unset( $bar['SEARCH'] ); + unset( $bar['LANGUAGES'] ); + unset( $bar['TOOLBOX'] ); + $browseLinks = reset( $bar ); + + foreach ( $browseLinks as $link ) { + if ( $link['text'] != '-' ) { + $s .= "" . + htmlspecialchars( $link['text'] ) . '' . $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
"; + $articleExists = $wgTitle->getArticleId(); + if ( $wgOut->isArticle() || $action =='edit' || $action =='history' || $wpPreview) { + if($wgOut->isArticle()) { + $s .= '' . $this->editThisPage() . ''; + } else { # backlink to the article in edit or history mode + if($articleExists){ # no backlink if no article + switch($tns) { + case NS_TALK: + case NS_USER_TALK: + case NS_PROJECT_TALK: + case NS_FILE_TALK: + case NS_MEDIAWIKI_TALK: + case NS_TEMPLATE_TALK: + case NS_HELP_TALK: + case NS_CATEGORY_TALK: + $text = wfMsg('viewtalkpage'); + break; + case NS_MAIN: + $text = wfMsg( 'articlepage' ); + break; + case NS_USER: + $text = wfMsg( 'userpage' ); + break; + case NS_PROJECT: + $text = wfMsg( 'projectpage' ); + break; + case NS_FILE: + $text = wfMsg( 'imagepage' ); + break; + case NS_MEDIAWIKI: + $text = wfMsg( 'mediawikipage' ); + break; + case NS_TEMPLATE: + $text = wfMsg( 'templatepage' ); + break; + case NS_HELP: + $text = wfMsg( 'viewhelppage' ); + break; + case NS_CATEGORY: + $text = wfMsg( 'categorypage' ); + break; + default: + $text= wfMsg( 'articlepage' ); + } + + $link = $wgTitle->getText(); + if ($nstext = $wgContLang->getNsText($tns) ) { # add namespace if necessary + $link = $nstext . ':' . $link ; + } + + $s .= $this->makeLink( $link, $text ); + } elseif( $wgTitle->getNamespace() != NS_SPECIAL ) { + # we just throw in a "New page" text to tell the user that he's in edit mode, + # and to avoid messing with the separator that is prepended to the next item + $s .= '' . wfMsg('newpage') . ''; + } + + } + + # "Post a comment" link + if( ( $wgTitle->isTalkPage() || $wgOut->showNewSectionLink() ) && $action != 'edit' && !$wpPreview ) + $s .= '
' . $this->makeKnownLinkObj( $wgTitle, wfMsg( 'postcomment' ), 'action=edit§ion=new' ); + + #if( $tns%2 && $action!='edit' && !$wpPreview) { + #$s.= '
'.$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->userCan( 'edit' ) ) + $s .= $sep . $this->moveThisPage(); + } + if ( $wgUser->isAllowed('delete') and $articleExists ) { + $s .= $sep . $this->deleteThisPage() . + $sep . $this->protectThisPage(); + } + $s .= $sep . $this->talkLink(); + if ($articleExists && $action !='history') { + $s .= $sep . $this->historyLink(); + } + $s.=$sep . $this->whatLinksHere(); + + if($wgOut->isArticleRelated()) { + $s .= $sep . $this->watchPageLinksLink(); + } + + if ( NS_USER == $wgTitle->getNamespace() + || $wgTitle->getNamespace() == NS_USER_TALK ) { + + $id=User::idFromName($wgTitle->getText()); + $ip=User::isIP($wgTitle->getText()); + + if( $id || $ip ){ + $s .= $sep . $this->userContribsLink(); + } + if( $this->showEmailUser( $id ) ) { + $s .= $sep . $this->emailUserLink(); + } + } + $s .= "\n

"; + } + + if ( $wgUser->isLoggedIn() && ( $wgEnableUploads || $wgRemoteUploads ) ) { + $s .= $this->specialLink( 'upload' ) . $sep; + } + $s .= $this->specialLink( 'specialpages' ); + + global $wgSiteSupportPage; + if( $wgSiteSupportPage ) { + $s .= "\n
' . wfMsg( 'sitesupport' ) . ''; + } + + $s .= "\n
\n"; + wfProfileOut( $fname ); + return $s; + } + + +} diff --git a/skins/chick/IE50Fixes.css b/skins/chick/IE50Fixes.css new file mode 100644 index 00000000..4a193e94 --- /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..fde03301 --- /dev/null +++ b/skins/chick/main.css @@ -0,0 +1,443 @@ +/* +** MediaWiki 'chick' style sheet for PDAs or other small-screen devices. +** Copyright Timwi +** License: GPL (http://www.gnu.org/copyleft/gpl.html) +** +** Loosely based on Monobook by Gabriel Wicke +*/ + +body { + font-family: sans-serif; + color: Black; + margin: 0; + padding: 0.3em; +} + +a { color: #002bb8; } +a:visited { color: #5a3696; } +a:active { color: #ffa500; } +a.stub { color: #772233; } +a.new, +#p-personal a.new { color:#ba0000; } +a.new:visited, +#p-personal a.new:visited { color:#a55858; } + +img { + border: none; + vertical-align: middle; +} +p { + margin: 0.4em 0em 0.5em 0em; + line-height: 1.5em; +} + +p img { margin: 0; } + +hr { + height: 1px; + color: #aaaaaa; + background-color: #aaaaaa; + border: 0; + margin: 0.2em 0 0.2em 0; +} + +h1, h2, h3, h4, h5, h6 { + color: Black; + background: none; + font-weight: normal; + margin: 0; + padding-top: 0.5em; + padding-bottom: 0.17em; + border-bottom: 1px solid #aaaaaa; +} +.editsection { + font-weight: normal; +} +h1 { font-size: 188%; } +h1 .editsection { font-size: 53.2%; } +h2 { font-size: 150%; } +h2 .editsection { font-size: 66.7%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} +h3 { font-size: 132%; } +h3 .editsection { font-size: 75.8%; } +h4 { font-size: 116%; } +h4 .editsection { font-size: 86.2%; } +h5 { font-size: 100%; } +h6 { font-size: 80%; } +h6 .editsection { font-size: 125%; } + +ul { + line-height: 1.5em; + margin: 0.3em 0 0 1.5em; + padding:0; +} +ol { + line-height: 1.5em; + margin: 0.3em 0 0 3.2em; + padding:0; + list-style-image: none; +} +li { margin-bottom: 0.1em; } +dt { + font-weight: bold; + margin-bottom: 0.1em; +} +dl{ + margin-top: 0.2em; + margin-bottom: 0.5em; +} +dd { + line-height: 1.5em; + margin-left: 2em; + margin-bottom: 0.1em; +} + +fieldset { + border: 1px solid #2f6fab; + margin: 1em 0em 1em 0em; + padding: 0em 1em 1em 1em; + line-height: 1.5em; +} +legend { + background: White; + padding: 0.5em; + font-size: 95%; +} +form { + border: none; + margin: 0; +} + +textarea { + border: 1px solid #2f6fab; + color: Black; + background-color: white; + width: 100%; + padding: 0.1em; + overflow: auto; +} +/* hide this from ie/mac and konq2.2 */ +@media All { + head:first-child+body input { + visibility: visible; + border: 1px solid #2f6fab; + color: Black; + background-color: white; + vertical-align: middle; + padding: 0.2em; + } +} +input.historysubmit { + padding: 0 0.3em 0.3em 0.3em !important; + font-size: 94%; + cursor: pointer; + height: 1.7em !important; + margin-left: 1.6em; +} +input[type="radio"], +input[type="checkbox"] { border:none; } +select { + border: 1px solid #2f6fab; + color: Black; + vertical-align: top; +} +abbr, acronym, .explain { + border-bottom: 1px dotted Black; + color: Black; + background: none; + cursor: help; +} +q { + font-family: Times, "Times New Roman", serif; + font-style: italic; +} +code { background-color: #f9f9f9; } +pre { + padding: 1em; + border: 1px dashed #2f6fab; + color: Black; + background-color: #f9f9f9; + line-height: 1.1em; +} + +/* +** the main content area +*/ + +span.subpages { display: block; } + +/* Some space under the headers in the content area */ +#bodyContent h1, #bodyContent h2 { margin-bottom:0.6em; } +#bodyContent h3, +#bodyContent h4, +#bodyContent h5 { + margin-bottom: 0.3em; +} +#firstHeading { margin-bottom:0.1em; } + +/* user notification thing */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: Black; + font-weight: bold; + margin: 0.1em 0 0 0; + padding: 2px 5px; + vertical-align: middle; +} +#siteNotice { + text-align: center; + font-size: 95%; + padding: 0 0.9em 0 0.9em; +} +#siteNotice p { margin: 0; padding: 0; } +.error { + color: red; + font-size: larger; +} +.catlinks { + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding: 2px 5px; + margin: 0.1em 0 0 0; + clear: both; +} +.catlinks { margin: 0; padding: 0; } + + +/* currently unused, intended to be used by a metadata box +in the bottom-right corner of the content area */ +.documentDescription { + /* The summary text describing the document */ + font-weight: bold; + display: block; + margin: 1em 0em; + line-height: 1.5em; +} +.documentByLine { + text-align: right; + font-size: 90%; + clear: both; + font-weight: normal; + color: #76797c; +} + +/* emulate center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} +/* small for tables and similar */ +.small, .small * { font-size: 94%; } +table.small { font-size: 100% } + +/* +** content styles +*/ + +#toc { + /*border:1px solid #2f6fab;*/ + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding:5px; + font-size: 95%; +} +#toc ul { margin-left: 2em; } +#toc .toctoggle { font-size: 94%; } +#toc .editsection { + margin-top: 0.7em; + font-size: 94%; +} + +/* images */ +div.floatright, table.floatright { + clear: right; + float: right; + margin: 0; + position: relative; + border: 0.5em solid White; + border-width: 0.5em 0 0.8em 1.4em; +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: left; + clear: left; + margin: 0.3em 0.5em 0.5em 0; + position: relative; + border: 0.5em solid White; + border-width: 0.5em 1.4em 0.8em 0; +} +div.floatleft p { font-style: italic; } +/* thumbnails */ +div.thumb { + margin-bottom: 0.5em; + border-style: solid; border-color: White; + width: auto; +} +div.thumb div { + border:1px solid #cccccc; + padding: 3px !important; + background-color:#f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +div.thumb div a img { + border:1px solid #cccccc; +} +div.thumb div div.thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 0.3em 0 0.1em 0; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: 0.5em 0 0.8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} + +.hiddenStructure { + display: none; +} + +/* +** classes for special content elements like town boxes +** intended to be referenced directly from the wiki src +*/ + +/* +** User styles +*/ +/* table standards */ +table.rimage { + float:right; + position:relative; + margin-left:1em; + margin-bottom:1em; + text-align:center; +} +.toccolours { + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding:5px; + font-size: 95%; +} + +/* +** edit views etc +*/ +.special li { + line-height: 1.4em; + margin: 0; + padding: 0; +} + +a.external { color: #3366bb; } +div#footer { text-align: center; } +ul#f-list li { list-style: none; text-align: center; } +div.portlet { margin: 0.5em 0; } + +.redirectText { + font-size:150%; + margin:5px; +} + +ul.special li.not-patrolled, ol.special li.not-patrolled { + background-color: #ffa; +} +div.patrollink { + font-size: 75%; + text-align: right; +} +span.newpage, span.minor { + font-weight: bold; +} + +span.updatedmarker { + color:black; + background-color:#00FF00; +} + +table.gallery { + border: 1px solid #cccccc; + margin: 2px; + padding: 2px; + background-color:#ffffff; +} + +table.gallery tr { + vertical-align:top; +} + +table.gallery td { + vertical-align:top; + background-color:#f9f9f9; + border: solid 2px white; +} + +div.gallerybox { + margin: 2px; + width: 150px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #cccccc; + margin: 2px; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; +} + +#xjump-to-nav { + display: none; +} + +.templatesUsed { margin-top: 1.5em; } + +.printfooter { + display: none; +} + +#footer { + background-color: white; + border-top: 1px solid #fabd23; + border-bottom: 1px solid #fabd23; + margin: .6em 0 1em 0; + padding: .4em 0 1.2em 0; + text-align: center; + font-size: 90%; +} +#f-poweredbyico, #f-copyrightico { + display: inline; +} \ No newline at end of file diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js new file mode 100644 index 00000000..f85f506c --- /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"; + } + } + else { + alert("bad target for sajax_do_call: not a function or object: " + target); + } + + return; + } + + sajax_debug(func_name + " uri = " + uri + " / post = " + post_data); + x.send(post_data); + sajax_debug(func_name + " waiting.."); + delete x; + + return true; +} + +/** + * @return boolean whether the browser supports XMLHttpRequest + */ +function wfSupportsAjax() { + var request = sajax_init_object(); + var supportsAjax = request ? true : false; + delete request; + return supportsAjax; +} + diff --git a/skins/common/ajaxwatch.js b/skins/common/ajaxwatch.js new file mode 100644 index 00000000..c8d90b80 --- /dev/null +++ b/skins/common/ajaxwatch.js @@ -0,0 +1,153 @@ +// dependencies: +// * ajax.js: + /*extern sajax_init_object, sajax_do_call */ +// * wikibits.js: + /*extern changeText, akeytt, hookEvent, jsMsg */ + +// These should have been initialized in the generated js +/*extern wgAjaxWatch, wgPageName */ + +if(typeof wgAjaxWatch === "undefined" || !wgAjaxWatch) { + var wgAjaxWatch = { + watchMsg: "Watch", + unwatchMsg: "Unwatch", + watchingMsg: "Watching...", + unwatchingMsg: "Unwatching..." + }; +} + +wgAjaxWatch.supported = true; // supported on current page and by browser +wgAjaxWatch.watching = false; // currently watching page +wgAjaxWatch.inprogress = false; // ajax request in progress +wgAjaxWatch.timeoutID = null; // see wgAjaxWatch.ajaxCall +wgAjaxWatch.watchLinks = []; // "watch"/"unwatch" links + +wgAjaxWatch.setLinkText = function(newText) { + for (i = 0; i < wgAjaxWatch.watchLinks.length; i++) { + changeText(wgAjaxWatch.watchLinks[i], newText); + } +}; + +wgAjaxWatch.setLinkID = function(newId) { + // We can only set the first one + wgAjaxWatch.watchLinks[0].setAttribute( 'id', newId ); + akeytt(newId); // update tooltips for Monobook +}; + +wgAjaxWatch.setHref = function( string ) { + for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { + if( string == 'watch' ) { + wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href + .replace( /&action=unwatch/, '&action=watch' ); + } else if( string == 'unwatch' ) { + wgAjaxWatch.watchLinks[i].href = wgAjaxWatch.watchLinks[i].href + .replace( /&action=watch/, '&action=unwatch' ); + } + } +} + +wgAjaxWatch.ajaxCall = function() { + if(!wgAjaxWatch.supported) { + return true; + } else if (wgAjaxWatch.inprogress) { + return false; + } + if(!wfSupportsAjax()) { + // Lazy initialization so we don't toss up + // ActiveX warnings on initial page load + // for IE 6 users with security settings. + wgAjaxWatch.supported = false; + return true; + } + + wgAjaxWatch.inprogress = true; + wgAjaxWatch.setLinkText( wgAjaxWatch.watching + ? wgAjaxWatch.unwatchingMsg : wgAjaxWatch.watchingMsg); + sajax_do_call( + "wfAjaxWatch", + [wgPageName, (wgAjaxWatch.watching ? "u" : "w")], + wgAjaxWatch.processResult + ); + // if the request isn't done in 10 seconds, allow user to try again + wgAjaxWatch.timeoutID = window.setTimeout( + function() { wgAjaxWatch.inprogress = false; }, + 10000 + ); + return false; +}; + +wgAjaxWatch.processResult = function(request) { + if(!wgAjaxWatch.supported) { + return; + } + var response = request.responseText; + if( response.match(/^/) ) { + wgAjaxWatch.watching = true; + wgAjaxWatch.setLinkText(wgAjaxWatch.unwatchMsg); + wgAjaxWatch.setLinkID("ca-unwatch"); + wgAjaxWatch.setHref( 'unwatch' ); + } else if( response.match(/^/) ) { + wgAjaxWatch.watching = false; + wgAjaxWatch.setLinkText(wgAjaxWatch.watchMsg); + wgAjaxWatch.setLinkID("ca-watch"); + wgAjaxWatch.setHref( 'watch' ); + } else { + // Either we got a error code or it just plain broke. + window.location.href = wgAjaxWatch.watchLinks[0].href; + return; + } + jsMsg( response.substr(4), 'watch' ); + wgAjaxWatch.inprogress = false; + if(wgAjaxWatch.timeoutID) { + window.clearTimeout(wgAjaxWatch.timeoutID); + } + // Bug 12395 - avoid some watch link confusion on edit + var watchthis = document.getElementById("wpWatchthis"); + if( watchthis && response.match(/^<[uw]#>/) ) { + watchthis.checked = response.match(/^/) ? "checked" : ""; + } + return; +}; + +wgAjaxWatch.onLoad = function() { + // This document structure hardcoding sucks. We should make a class and + // toss all this out the window. + var el1 = document.getElementById("ca-unwatch"); + var el2 = null; + if (!el1) { + el1 = document.getElementById("mw-unwatch-link1"); + el2 = document.getElementById("mw-unwatch-link2"); + } + if(el1) { + wgAjaxWatch.watching = true; + } else { + wgAjaxWatch.watching = false; + el1 = document.getElementById("ca-watch"); + if (!el1) { + el1 = document.getElementById("mw-watch-link1"); + el2 = document.getElementById("mw-watch-link2"); + } + if(!el1) { + wgAjaxWatch.supported = false; + return; + } + } + + // The id can be either for the parent (Monobook-based) or the element + // itself (non-Monobook) + wgAjaxWatch.watchLinks.push( el1.tagName.toLowerCase() == "a" + ? el1 : el1.firstChild ); + + if( el2 ) { + wgAjaxWatch.watchLinks.push( el2 ); + } + + // I couldn't get for (watchLink in wgAjaxWatch.watchLinks) to work, if + // you can be my guest. + for( i = 0; i < wgAjaxWatch.watchLinks.length; i++ ) { + wgAjaxWatch.watchLinks[i].onclick = wgAjaxWatch.ajaxCall; + } + return; +}; + +hookEvent("load", wgAjaxWatch.onLoad); diff --git a/skins/common/allmessages.js b/skins/common/allmessages.js new file mode 100644 index 00000000..9f07a481 --- /dev/null +++ b/skins/common/allmessages.js @@ -0,0 +1,83 @@ +var allmessages_nodelist = false; +var allmessages_modified = false; +var allmessages_timeout = false; +var allmessages_running = false; + +function allmessagesmodified() { + allmessages_modified = !allmessages_modified; + allmessagesfilter(); +} + +function allmessagesfilter() { + if ( allmessages_timeout ) + window.clearTimeout( allmessages_timeout ); + + if ( !allmessages_running ) + allmessages_timeout = window.setTimeout( 'allmessagesfilter_do();', 500 ); +} + +function allmessagesfilter_do() { + if ( !allmessages_nodelist ) + return; + + var text = document.getElementById('allmessagesinput').value.toLowerCase(); + var nodef = allmessages_modified; + + allmessages_running = true; + + for ( var name in allmessages_nodelist ) { + var nodes = allmessages_nodelist[name]; + var display = ( name.toLowerCase().indexOf( text ) == -1 ? 'none' : '' ); + + for ( var i = 0; i < nodes.length; i++) + nodes[i].style.display = + ( nodes[i].className == "def" && nodef + ? 'none' : display ); + } + + if ( text != document.getElementById('allmessagesinput').value.toLowerCase() || + nodef != allmessages_modified ) + allmessagesfilter_do(); // repeat + + allmessages_running = false; +} + +function allmessagesfilter_init() { + if ( allmessages_nodelist ) + return; + + var nodelist = new Array(); + var templist = new Array(); + + var table = document.getElementById('allmessagestable'); + if ( !table ) return; + + var rows = document.getElementsByTagName('tr'); + for ( var i = 0; i < rows.length; i++ ) { + var id = rows[i].getAttribute('id') + if ( id && id.substring(0,16) != 'sp-allmessages-r' ) continue; + templist[ id ] = rows[i]; + } + + var spans = table.getElementsByTagName('span'); + for ( var i = 0; i < spans.length; i++ ) { + var id = spans[i].getAttribute('id') + if ( id && id.substring(0,17) != 'sp-allmessages-i-' ) continue; + if ( !spans[i].firstChild || spans[i].firstChild.nodeType != 3 ) continue; + + var nodes = new Array(); + var row1 = templist[ id.replace('i', 'r1') ]; + var row2 = templist[ id.replace('i', 'r2') ]; + + if ( row1 ) nodes[nodes.length] = row1; + if ( row2 ) nodes[nodes.length] = row2; + nodelist[ spans[i].firstChild.nodeValue ] = nodes; + } + + var k = document.getElementById('allmessagesfilter'); + if (k) { k.style.display = ''; } + + allmessages_nodelist = nodelist; +} + +hookEvent( "load", allmessagesfilter_init ); diff --git a/skins/common/block.js b/skins/common/block.js new file mode 100644 index 00000000..6f7be0cd --- /dev/null +++ b/skins/common/block.js @@ -0,0 +1,54 @@ +addOnloadHook(considerChangingExpiryFocus); + +function considerChangingExpiryFocus() { + if (!document.getElementById) { + return; + } + var drop = document.getElementById('wpBlockExpiry'); + if (!drop) { + return; + } + var field = document.getElementById('wpBlockOther'); + if (!field) { + return; + } + var opt = drop.value; + if (opt == 'other') { + field.style.display = ''; + } else { + field.style.display = 'none'; + } +} + +function updateBlockOptions() { + if (!document.getElementById) + return; + + var target = document.getElementById('mw-bi-target'); + if (!target) + return; + + var addy = target.value; + var isEmpty = addy.match(/^\s*$/); + var isIp = addy.match(/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|:(:[0-9A-Fa-f]{1,4}){1,7}|[0-9A-Fa-f]{1,4}(:{1,2}[0-9A-Fa-f]{1,4}|::$){1,7})(\/\d+)?$/); + + var anonymousRow = document.getElementById('wpAnonOnlyRow'); + if( anonymousRow ) { + anonymousRow.style.display = (!isIp && !isEmpty) ? 'none' : ''; + } + + var autoblockRow = document.getElementById('wpEnableAutoblockRow'); + if( autoblockRow ) { + autoblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } + + var emailblockRow = document.getElementById('wpEnableEmailBan'); + if( emailblockRow ) { + emailblockRow.style.display = isIp && !isEmpty ? 'none' : ''; + } + + var hideuserRow = document.getElementById('wpEnableHideUser'); + if( hideuserRow ) { + hideuserRow.style.display = isIp && !isEmpty ? 'none' : ''; + } +} diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css new file mode 100644 index 00000000..2723bbef --- /dev/null +++ b/skins/common/cologneblue.css @@ -0,0 +1,96 @@ +body { margin: 0px; padding: 0px; color: black; } +#specialform { display: inline; } +#content { top: 0; margin: 0; padding: 0; } +#topbar { padding: 0px; } +#powersearch { + background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; +} +#quickbar { + width: 140px; top: 18ex; padding: 2px; visibility: visible; z-index: 99; +} +#article, #article td, #article th, #article p { + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; color: black; +} +#article p { + padding-top: 0; padding-bottom: 0; + margin-top: 1ex; margin-bottom: 0; +} +p, pre, td, th, li, dd, dt { line-height: 12pt; } +textarea { overflow: auto; } + +#footer { padding: 4px; } +#footer form { display: inline; } +#sitetitle { + font-family: Times, serif; + color: white; + font-weight: normal; font-size: 32pt; + line-height: 32pt; +} +td.top { + background-color: #6688AA; color: white; + margin-top: 4px; margin-bottom: 4px; + padding-top: 0; padding-bottom: 0; + text-transform: uppercase; + font-family: Verdana, Arial, sans-serif; font-size: 8pt; +} +td.top a { + font-family: Verdana, Arial, sans-serif; + background-color: #6688AA; color: white; + text-decoration: none; font-size: 10pt; +} +td.bottom { + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; + padding: 0; +} +#pagestats { + font-family: Verdana, Arial, sans-serif; + color: black; + font-size: 9pt; +} +#sitesub { + font-family: Verdana, Arial, sans-serif; + font-size: 9pt; font-weight: bold; + color: black; + padding-top: 0; +} +#quickbar { + font-family: Verdana, Arial, sans-serif; + font-size: 8pt; font-weight: bold; line-height: 9.5pt; + text-decoration: none; + color: black; + padding: 0; margin-top: 0; +} +#quickbar a { color: #446688; } + +#quickbar h6 { + font-family: Verdana, Arial, sans-serif; + font-size: 10pt; font-weight: bold; line-height: 12pt; + text-decoration: none; + color: #666666; + padding: 0; margin-bottom: 2px; margin-top: 6px; +} +#quickbar form { padding: 0; margin-top: 0; } + +h1 { + color: #666666; + font-family: Verdana, Arial, sans-serif; + font-size: 180%; line-height: 21pt; +} +h1 .editsection { font-size: 55.6%; } +h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } +#article p.subtitle { + color: #666666; font-size: 11pt; font-weight: bold; + padding-top: 0; margin-top: 0; padding-bottom: 1ex; +} + +a { color: #223366; } +a.external { color: #336644; } +a:visited { color: #8D0749; } +a.printable { text-decoration: underline; } +a.stub, #quickbar a.stub { color:#772233; text-decoration:none; } +a.new, #quickbar a.new { color: #CC2200; } +h2, h3, h4, h5, h6 { margin-bottom: 0; } +small { font-size: 75%; } +input.mw-searchInput { width: 106px; } diff --git a/skins/common/commonPrint.css b/skins/common/commonPrint.css new file mode 100644 index 00000000..ecf146de --- /dev/null +++ b/skins/common/commonPrint.css @@ -0,0 +1,267 @@ +/* +** MediaWiki Print style sheet for CSS2-capable browsers. +** Copyright Gabriel Wicke, http://www.aulinx.de/ +** +** Derived from the plone (http://plone.org/) styles +** Copyright Alexander Limi +*/ + +/* Thanks to A List Apart (http://alistapart.com/) for useful extras */ +a.stub, +a.new{ color:#ba0000; text-decoration:none; } + +#toc { + /*border:1px solid #2f6fab;*/ + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding:5px; +} +.tocindent { + margin-left: 2em; +} +.tocline { + margin-bottom: 0px; +} + +/* images */ +div.floatright { + float: right; + clear: right; + margin: 0; + position:relative; + border: 0.5em solid White; + border-width: 0.5em 0 0.8em 1.4em; +} +div.floatright p { font-style: italic;} +div.floatleft { + float: left; + margin: 0.3em 0.5em 0.5em 0; + position:relative; + border: 0.5em solid White; + border-width: 0.5em 1.4em 0.8em 0; +} +div.floatleft p { font-style: italic; } +/* thumbnails */ +div.thumb { + margin-bottom: 0.5em; + border-style: solid; border-color: White; + width: auto; + overflow: hidden; +} +div.thumb div { + border:1px solid #cccccc; + padding: 3px !important; + background-color:#f9f9f9; + font-size: 94%; + text-align: center; +} +div.thumb div a img { + border:1px solid #cccccc; +} +div.thumb div div.thumbcaption { + border: none; + padding: 0.3em 0 0.1em 0; +} +div.magnify { display: none; } +div.tright { + float: right; + clear: right; + border-width: 0.5em 0 0.8em 1.4em; +} +div.tleft { + float: left; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} + +/* table standards */ +table.rimage { + float:right; + width:1pt; + position:relative; + margin-left:1em; + margin-bottom:1em; + text-align:center; +} + +body { + background: White; + /*font-size: 11pt !important;*/ + color: Black; + margin: 0; + padding: 0; +} + +.noprint, +div#jump-to-nav, +div.top, +div#column-one, +#colophon, +.editsection, +.toctoggle, +.tochidden, +div#f-poweredbyico, +div#f-copyrightico, +li#viewcount, +li#about, +li#disclaimer, +li#privacy { + /* Hides all the elements irrelevant for printing */ + display: none; +} + +ul { + list-style-type: square; +} + +#content { + background: none; + border: none ! important; + padding: 0 ! important; + margin: 0 ! important; +} +#footer { + background : white; + color : black; + border-top: 1px solid black; +} + +h1, h2, h3, h4, h5, h6 { + font-weight: bold; +} + +p, .documentDescription { + margin: 1em 0 ! important; + line-height: 1.2em; +} + +.tocindent p { + margin: 0 0 0 0 ! important; +} + +pre { + border: 1pt dashed black; + white-space: pre; + font-size: 8pt; + overflow: auto; + padding: 1em 0; + background : white; + color : black; +} + +table.listing, +table.listing td { + border: 1pt solid black; + border-collapse: collapse; +} + +a { + color: Black !important; + background: none !important; + padding: 0 !important; +} + +a:link, a:visited { + color: #520; + background: transparent; + text-decoration: underline; +} + +#content a.external.text:after, #content a.external.autonumber:after { + /* Expand URLs for printing */ + content: " (" attr(href) ") "; +} + +#globalWrapper { + width: 100% !important; + min-width: 0 !important; +} + +#content { + background : white; + color : black; +} + +#column-content { + margin: 0 !important; +} + +#column-content #content { + padding: 1em; + margin: 0 !important; +} +/* MSIE/Win doesn't understand 'inherit' */ +a, a.external, a.new, a.stub { + color: black ! important; + text-decoration: none ! important; +} + +/* Continue ... */ +a, a.external, a.new, a.stub { + color: inherit ! important; + text-decoration: inherit ! important; +} + +img { border: none; } +img.tex { vertical-align: middle; } +span.texhtml { font-family: serif; } + +#siteNotice { display: none; } + +table.gallery { + border: 1px solid #cccccc; + margin: 2px; + padding: 2px; + background-color:#ffffff; +} + +table.gallery tr { + vertical-align:top; +} + +div.gallerybox { + border: 1px solid #cccccc; + margin: 2px; + background-color:#f9f9f9; + width: 150px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #cccccc; + margin: 2px; +} + +div.gallerytext { + font-size: 94%; + padding: 2px 4px; +} + +/* +** Diff rendering +*/ +table.diff { background:white; } +td.diff-otitle { background:#ffffff; } +td.diff-ntitle { background:#ffffff; } +td.diff-addedline { + background:#ccffcc; + font-size: smaller; + border: solid 2px black; +} +td.diff-deletedline { + background:#ffffaa; + font-size: smaller; + border: dotted 2px black; +} +td.diff-context { + background:#eeeeee; + font-size: smaller; +} +.diffchange { + color: silver; + font-weight: bold; + text-decoration: underline; +} diff --git a/skins/common/common_rtl.css b/skins/common/common_rtl.css new file mode 100644 index 00000000..11fc995b --- /dev/null +++ b/skins/common/common_rtl.css @@ -0,0 +1,48 @@ +/* + * This file contains CSS settings common to RTL wikis use the old + * pre-Monobook skins Wikistandard, Nostalgia and CologneBlue + */ + +/* js pref toc */ +#preftoc { float: right; } +/* workaround for moz bug, displayed bullets on left side */ +#preftoc li { list-style: none; } +#prefcontrol { float: right; } +fieldset.prefsection, +fieldset.operaprefsection { + margin-left: 0; + margin-right: 18em; +} +/* page history */ +#pagehistory .history-user { + margin-right: 1.4em; + margin-left: 0.4em; +} +.editsection { + float: left; + margin-right: 5px; +} +div.tright, div.floatright { + clear: none; +} +div.tleft, div.floatleft { + clear: left; +} +/* Convenience links to edit block, delete and protect reasons */ +p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, +p.mw-filedelete-editreasons, p.mw-delete-editreasons { + float: left; +} +table.filehistory th { + text-align: right; +} + +/** + * Lists: + * The following lines don't have a visible effect on non-Gecko browsers + * They fix a problem ith Gecko browsers rendering lists to the right of + * left-floated objects in an RTL layout. + */ +html > body div#article ul { + display: table; +} diff --git a/skins/common/diff.css b/skins/common/diff.css new file mode 100644 index 00000000..6afa3734 --- /dev/null +++ b/skins/common/diff.css @@ -0,0 +1,143 @@ +/* +** Diff rendering +*/ +table.diff, td.diff-otitle, td.diff-ntitle { + background-color: white; +} +td.diff-otitle, +td.diff-ntitle { + text-align: center; +} +td.diff-marker { + text-align: right; +} +.rtl td.diff-marker { + text-align: left; +} +td.diff-lineno { + font-weight: bold; +} +td.diff-addedline { + background: #cfc; + font-size: smaller; +} +td.diff-deletedline { + background: #ffa; + font-size: smaller; +} +td.diff-context { + background: #eee; + font-size: smaller; +} +.diffchange { + color: red; + font-weight: bold; + text-decoration: none; + white-space: pre-wrap; + white-space: -moz-pre-wrap; +} + +table.diff { + border: none; + width: 98%; + border-spacing: 4px; + + /* Fixed layout is required to ensure that cells containing long URLs + don't widen in Safari, Internet Explorer, or iCab */ + table-layout: fixed; +} +table.diff td { + padding: 0; +} +table.diff col.diff-marker { + width: 2%; +} +table.diff col.diff-content { + width: 48%; +} +table.diff td div { + /* Force-wrap very long lines such as URLs or page-widening char strings. + CSS 3 draft..., but Gecko doesn't support it yet: + https://bugzilla.mozilla.org/show_bug.cgi?id=99457 */ + word-wrap: break-word; + + /* As fallback, scrollbars will be added for very wide cells + instead of text overflowing or widening */ + overflow: auto; + + /* The above rule breaks on very old versions of Mozilla due + to a bug which collapses the table cells to a single line. + + In Mozilla 1.1 and below with JavaScript enabled, the rule + will be overridden with this by diff.js; wide cell contents + then spill horizontally without widening the rest of the + table: */ + /* overflow: visible; */ +} + +/* + * Styles for the HTML Diff + */ +div.diff-switchtype{ + text-align: center; + font-weight: bold; + font-size: smaller; +} + +span.diff-html-added { + font-size: 100%; + background-color: #20ff20 +} + +span.diff-html-removed { + font-size: 100%; + text-decoration: line-through; + background-color: #ff2020 +} + +span.diff-html-changed { + background: url(images/diffunderline.gif) bottom repeat-x; + /* Hack for IE5.5, see http://lists.wikimedia.org/pipermail/wikitech-l/2008-November/040273.html */ + *background-color: #c6c6fd; /* light blue */ +} + +span.diff-html-added img{ + border: 5px solid #ccffcc; +} + +span.diff-html-removed img{ + border: 5px solid #fdc6c6; +} + +span.diff-html-changed img{ + border: 5px dotted #000099; + +} + +span.diff-html-changed { + position: relative; /* this is key */ + cursor: help; +} + +span.diff-html-changed span.tip { + display: none; /* so is this */ +} + +/* tooltip will display on :hover event */ + +span.diff-html-changed:hover span.tip { + display: block; + z-index: 95; + position: absolute; + top: 2.5em; + left: 0; + width: auto; + line-height: 1.2em; + padding: 3px 7px 4px 6px; + border: 1px solid #336; + background-color: #f7f7ee; + font-size: 10px; + text-align: left; +} + + diff --git a/skins/common/diff.js b/skins/common/diff.js new file mode 100644 index 00000000..5fd151fc --- /dev/null +++ b/skins/common/diff.js @@ -0,0 +1,20 @@ +/* +Workaround for overflow bug in Mozilla 1.1 and earlier, where scrolling +
s in cells collapse their height to a single line. + +Known to be fixed in 1.2.1 (Gecko 20021130), but the CSS hacks I've tried +with overflow-x disable the scrolling all the way until Mozilla 1.8 / FF 1.5 +and break Opera as well. + +So... we check for reaaaally old Gecko and hack in an alternate rule to let +the wide cells spill instead of scrolling them. Not ideal as it won't work +if JS is disabled, of course. +*/ + +if (navigator && navigator.product == "Gecko" && navigator.productSub < "20021130") { + var sheets = document.styleSheets; + var lastSheet = sheets[sheets.length-1]; + lastSheet.insertRule( + "table.diff td div { overflow: visible; }", + lastSheet.cssRules.length); +} diff --git a/skins/common/edit.js b/skins/common/edit.js new file mode 100644 index 00000000..945059e0 --- /dev/null +++ b/skins/common/edit.js @@ -0,0 +1,156 @@ +// this function generates the actual toolbar buttons with localized text +// we use it to avoid creating the toolbar where javascript is not enabled +function addButton(imageFile, speedTip, tagOpen, tagClose, sampleText, imageId) { + // Don't generate buttons for browsers which don't fully + // support it. + mwEditButtons[mwEditButtons.length] = + {"imageId": imageId, + "imageFile": imageFile, + "speedTip": speedTip, + "tagOpen": tagOpen, + "tagClose": tagClose, + "sampleText": sampleText}; +} + +// this function generates the actual toolbar buttons with localized text +// we use it to avoid creating the toolbar where javascript is not enabled +function mwInsertEditButton(parent, item) { + var image = document.createElement("img"); + image.width = 23; + image.height = 22; + image.className = "mw-toolbar-editbutton"; + if (item.imageId) image.id = item.imageId; + image.src = item.imageFile; + image.border = 0; + image.alt = item.speedTip; + image.title = item.speedTip; + image.style.cursor = "pointer"; + image.onclick = function() { + insertTags(item.tagOpen, item.tagClose, item.sampleText); + return false; + }; + + parent.appendChild(image); + return true; +} + +function mwSetupToolbar() { + var toolbar = document.getElementById('toolbar'); + if (!toolbar) { return false; } + + var textbox = document.getElementById('wpTextbox1'); + if (!textbox) { return false; } + + // Don't generate buttons for browsers which don't fully + // support it. + if (!(document.selection && document.selection.createRange) + && textbox.selectionStart === null) { + return false; + } + + for (var i = 0; i < mwEditButtons.length; i++) { + mwInsertEditButton(toolbar, mwEditButtons[i]); + } + for (var i = 0; i < mwCustomEditButtons.length; i++) { + mwInsertEditButton(toolbar, mwCustomEditButtons[i]); + } + return true; +} + +// apply tagOpen/tagClose to selection in textarea, +// use sampleText instead of selection if there is none +function insertTags(tagOpen, tagClose, sampleText) { + var txtarea; + if (document.editform) { + txtarea = document.editform.wpTextbox1; + } else { + // some alternate form? take the first one we can find + var areas = document.getElementsByTagName('textarea'); + txtarea = areas[0]; + } + var selText, isSample = false; + + if (document.selection && document.selection.createRange) { // IE/Opera + + //save window scroll position + if (document.documentElement && document.documentElement.scrollTop) + var winScroll = document.documentElement.scrollTop + else if (document.body) + var winScroll = document.body.scrollTop; + //get current selection + txtarea.focus(); + var range = document.selection.createRange(); + selText = range.text; + //insert tags + checkSelectedText(); + range.text = tagOpen + selText + tagClose; + //mark sample text as selected + if (isSample && range.moveStart) { + if (window.opera) + tagClose = tagClose.replace(/\n/g,''); + range.moveStart('character', - tagClose.length - selText.length); + range.moveEnd('character', - tagClose.length); + } + range.select(); + //restore window scroll position + if (document.documentElement && document.documentElement.scrollTop) + document.documentElement.scrollTop = winScroll + else if (document.body) + document.body.scrollTop = winScroll; + + } else if (txtarea.selectionStart || txtarea.selectionStart == '0') { // Mozilla + + //save textarea scroll position + var textScroll = txtarea.scrollTop; + //get current selection + txtarea.focus(); + var startPos = txtarea.selectionStart; + var endPos = txtarea.selectionEnd; + selText = txtarea.value.substring(startPos, endPos); + //insert tags + checkSelectedText(); + txtarea.value = txtarea.value.substring(0, startPos) + + tagOpen + selText + tagClose + + txtarea.value.substring(endPos, txtarea.value.length); + //set new selection + if (isSample) { + txtarea.selectionStart = startPos + tagOpen.length; + txtarea.selectionEnd = startPos + tagOpen.length + selText.length; + } else { + txtarea.selectionStart = startPos + tagOpen.length + selText.length + tagClose.length; + txtarea.selectionEnd = txtarea.selectionStart; + } + //restore textarea scroll position + txtarea.scrollTop = textScroll; + } + + function checkSelectedText(){ + if (!selText) { + selText = sampleText; + isSample = true; + } else if (selText.charAt(selText.length - 1) == ' ') { //exclude ending space char + selText = selText.substring(0, selText.length - 1); + tagClose += ' ' + } + } + +} + +/** + * Restore the edit box scroll state following a preview operation, + * and set up a form submission handler to remember this state + */ +function scrollEditBox() { + var editBox = document.getElementById( 'wpTextbox1' ); + var scrollTop = document.getElementById( 'wpScrolltop' ); + var editForm = document.getElementById( 'editform' ); + if( editBox && scrollTop ) { + if( scrollTop.value ) + editBox.scrollTop = scrollTop.value; + addHandler( editForm, 'submit', function() { + document.getElementById( 'wpScrolltop' ).value = document.getElementById( 'wpTextbox1' ).scrollTop; + } ); + } +} +hookEvent( 'load', scrollEditBox ); +hookEvent( 'load', mwSetupToolbar ); diff --git a/skins/common/enhancedchanges.js b/skins/common/enhancedchanges.js new file mode 100644 index 00000000..b1789c9e --- /dev/null +++ b/skins/common/enhancedchanges.js @@ -0,0 +1,40 @@ +/* + JavaScript file for enhanced recentchanges + */ + +/* + * Add the CSS to hide parts that should be collapsed + * + * We do this with JS so everything will be expanded by default + * if JS is disabled + */ +appendCSS('.mw-changeslist-hidden {'+ + ' display:none;'+ + '}'+ + 'div.mw-changeslist-expanded {'+ + ' display:block;'+ + '}'+ + 'span.mw-changeslist-expanded {'+ + ' display:inline !important;'+ + ' visibility:visible !important;'+ + '}' +); + +/* + * Switch an RC line between hidden/shown + * @param int idNumber : the id number of the RC group +*/ +function toggleVisibility(idNumber) { + var openarrow = document.getElementById("mw-rc-openarrow-"+idNumber); + var closearrow = document.getElementById("mw-rc-closearrow-"+idNumber); + var subentries = document.getElementById("mw-rc-subentries-"+idNumber); + if (openarrow.className == 'mw-changeslist-expanded') { + openarrow.className = 'mw-changeslist-hidden'; + closearrow.className = 'mw-changeslist-expanded'; + subentries.className = 'mw-changeslist-expanded'; + } else { + openarrow.className = 'mw-changeslist-expanded'; + closearrow.className = 'mw-changeslist-hidden'; + subentries.className = 'mw-changeslist-hidden'; + } +} diff --git a/skins/common/feed.css b/skins/common/feed.css new file mode 100644 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 text isn't shown +* Opera 7.5 uses the style sheet instead of its native RSS mode. +* IE/Mac 5.2: none of the :before content works; doesn't get the charset right and displays garbage for non-ASCII. +* IE/Win 6.0: No background color, borders, font size, font weight, or :before content. + +*/ + +/* RSS: */ rss, channel, title, link, description, language, generator, lastBuildDate, item, pubDate, author, comments, creator, +/* Atom: */ feed, id, modified, tagline, entry, issued, created, updated, summary, comment { + display: block; +} + +rss, feed { + background: white; + color: black; + margin: 1em; + font-family: "Verdana", "Tahoma", "Arial", "Helvetica", sans-serif; + line-height: 1.5em; + font-size: 76%; +} + +rss:before { + content: "This RSS feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser."; +} + +feed:before { + content: "This Atom feed is meant to be read in a syndicated news reader, and isn't ideal for a web browser."; +} +rss:before, feed:before { + color: red; + text-align: center; + line-height: 2em; +} + +channel>title, +item>title, +feed>title, +entry>title { + font-weight: bold; + border-bottom: solid 1px #aaa; + margin-left: -0.5em; +} +channel>title, feed>title { + font-size: larger; +} +item>title, entry>title { + font-size: large; +} +item, entry { + margin-top: 1em; + margin-left: 2em; +} + +item>description, entry>summary { + white-space: pre; + overflow: auto; + background: #f8f8ff; +} + +pubDate:before { content: "Date: " } +link:before { content: "Link: " } +author:before, creator:before { content: "Author: " } +description:before { content: "Description: " } +id:before { content: "Id: " } + +generator:before { content: "Generator: " } +language:before { content: "Language: " } +lastBuildDate:before { content: "Updated: " } +comments:before { content: "Comments page: " } + +tagline:before { content: "Tagline: " } +issued:before { content: "Issued: " } +created:before { content: "Created: " } +modified:before { content: "Modified: " } +updated:before { content: "Updated: " } +summary:before { content: "Summary: " } +comment:before { content: "Comment: " } + +pubDate:before, link:before, author:before, description:before, +language:before, generator:before, lastBuildDate:before, comments:before, +tagline:before, issued:before, created:before, modified:before, +summary:before, comment:before, creator:before, id:before, updated:before { + color: #224; + font-weight: bold; +} + +feed link:after { + content: attr(href); +} diff --git a/skins/common/history.js b/skins/common/history.js new file mode 100644 index 00000000..57e61849 --- /dev/null +++ b/skins/common/history.js @@ -0,0 +1,83 @@ +function historyRadios(parent) { + var inputs = parent.getElementsByTagName('input'); + var radios = []; + for (var i = 0; i < inputs.length; i++) { + if (inputs[i].name == "diff" || inputs[i].name == "oldid") { + radios[radios.length] = inputs[i]; + } + } + return radios; +} + +// check selection and tweak visibility/class onclick +function diffcheck() { + var dli = false; // the li where the diff radio is checked + var oli = false; // the li where the oldid radio is checked + var hf = document.getElementById('pagehistory'); + if (!hf) { + return true; + } + var lis = hf.getElementsByTagName('li'); + for (var i=0;i + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/skins/common/images/arrow_first_25.png b/skins/common/images/arrow_first_25.png new file mode 100644 index 00000000..b6351c50 Binary files /dev/null and b/skins/common/images/arrow_first_25.png differ diff --git a/skins/common/images/arrow_last_25.png b/skins/common/images/arrow_last_25.png new file mode 100644 index 00000000..d416ab39 Binary files /dev/null and b/skins/common/images/arrow_last_25.png differ diff --git a/skins/common/images/arrow_left.svg b/skins/common/images/arrow_left.svg new file mode 100644 index 00000000..bd4bbc74 --- /dev/null +++ b/skins/common/images/arrow_left.svg @@ -0,0 +1,78 @@ + + + + + + + + + image/svg+xml + + + + + + + + diff --git a/skins/common/images/arrow_left_25.png b/skins/common/images/arrow_left_25.png new file mode 100644 index 00000000..fd05fa6f Binary files /dev/null and b/skins/common/images/arrow_left_25.png differ diff --git a/skins/common/images/arrow_right_25.png b/skins/common/images/arrow_right_25.png new file mode 100644 index 00000000..cf1845c6 Binary files /dev/null and b/skins/common/images/arrow_right_25.png differ diff --git a/skins/common/images/be-tarask/button_bold.png b/skins/common/images/be-tarask/button_bold.png new file mode 100644 index 00000000..f662c76c Binary files /dev/null and b/skins/common/images/be-tarask/button_bold.png differ diff --git a/skins/common/images/be-tarask/button_italic.png b/skins/common/images/be-tarask/button_italic.png new file mode 100644 index 00000000..88e1b3bb Binary files /dev/null and b/skins/common/images/be-tarask/button_italic.png differ diff --git a/skins/common/images/be-tarask/button_link.png b/skins/common/images/be-tarask/button_link.png new file mode 100644 index 00000000..f68d5d56 Binary files /dev/null and b/skins/common/images/be-tarask/button_link.png differ diff --git a/skins/common/images/bullet.gif b/skins/common/images/bullet.gif new file mode 100644 index 00000000..b43de48a Binary files /dev/null and b/skins/common/images/bullet.gif differ diff --git a/skins/common/images/button_bold.png b/skins/common/images/button_bold.png new file mode 100644 index 00000000..5e52deed Binary files /dev/null and b/skins/common/images/button_bold.png differ diff --git a/skins/common/images/button_extlink.png b/skins/common/images/button_extlink.png new file mode 100644 index 00000000..12ec5f2e Binary files /dev/null and b/skins/common/images/button_extlink.png differ diff --git a/skins/common/images/button_headline.png b/skins/common/images/button_headline.png new file mode 100644 index 00000000..aa0ca540 Binary files /dev/null and b/skins/common/images/button_headline.png differ diff --git a/skins/common/images/button_hr.png b/skins/common/images/button_hr.png new file mode 100644 index 00000000..19cfc480 Binary files /dev/null and b/skins/common/images/button_hr.png differ diff --git a/skins/common/images/button_image.png b/skins/common/images/button_image.png new file mode 100644 index 00000000..6c3c3308 Binary files /dev/null and b/skins/common/images/button_image.png differ diff --git a/skins/common/images/button_italic.png b/skins/common/images/button_italic.png new file mode 100644 index 00000000..96b1fb9f Binary files /dev/null and b/skins/common/images/button_italic.png differ diff --git a/skins/common/images/button_link.png b/skins/common/images/button_link.png new file mode 100644 index 00000000..e9507b97 Binary files /dev/null and b/skins/common/images/button_link.png differ diff --git a/skins/common/images/button_math.png b/skins/common/images/button_math.png new file mode 100644 index 00000000..e91fb613 Binary files /dev/null and b/skins/common/images/button_math.png differ diff --git a/skins/common/images/button_media.png b/skins/common/images/button_media.png new file mode 100644 index 00000000..02070790 Binary files /dev/null and b/skins/common/images/button_media.png differ diff --git a/skins/common/images/button_nowiki.png b/skins/common/images/button_nowiki.png new file mode 100644 index 00000000..7b2d5392 Binary files /dev/null and b/skins/common/images/button_nowiki.png differ diff --git a/skins/common/images/button_sig.png b/skins/common/images/button_sig.png new file mode 100644 index 00000000..ef3a46d2 Binary files /dev/null and b/skins/common/images/button_sig.png differ diff --git a/skins/common/images/button_template.png b/skins/common/images/button_template.png new file mode 100644 index 00000000..8e9cc267 Binary files /dev/null and b/skins/common/images/button_template.png differ diff --git a/skins/common/images/cyrl/button_bold.png b/skins/common/images/cyrl/button_bold.png new file mode 100644 index 00000000..1c932f85 Binary files /dev/null and b/skins/common/images/cyrl/button_bold.png differ diff --git a/skins/common/images/cyrl/button_italic.png b/skins/common/images/cyrl/button_italic.png new file mode 100644 index 00000000..f5e588ec Binary files /dev/null and b/skins/common/images/cyrl/button_italic.png differ diff --git a/skins/common/images/cyrl/button_link.png b/skins/common/images/cyrl/button_link.png new file mode 100644 index 00000000..a690cb35 Binary files /dev/null and b/skins/common/images/cyrl/button_link.png differ diff --git a/skins/common/images/de/button_bold.png b/skins/common/images/de/button_bold.png new file mode 100644 index 00000000..8386828d Binary files /dev/null and b/skins/common/images/de/button_bold.png differ diff --git a/skins/common/images/de/button_italic.png b/skins/common/images/de/button_italic.png new file mode 100644 index 00000000..ec719998 Binary files /dev/null and b/skins/common/images/de/button_italic.png differ diff --git a/skins/common/images/diffunderline.gif b/skins/common/images/diffunderline.gif new file mode 100644 index 00000000..e062c560 Binary files /dev/null and b/skins/common/images/diffunderline.gif differ diff --git a/skins/common/images/fa/button_bold.png b/skins/common/images/fa/button_bold.png new file mode 100644 index 00000000..2f269a8d Binary files /dev/null and b/skins/common/images/fa/button_bold.png differ diff --git a/skins/common/images/fa/button_headline.png b/skins/common/images/fa/button_headline.png new file mode 100644 index 00000000..ef9d109f Binary files /dev/null and b/skins/common/images/fa/button_headline.png differ diff --git a/skins/common/images/fa/button_italic.png b/skins/common/images/fa/button_italic.png new file mode 100644 index 00000000..84985848 Binary files /dev/null and b/skins/common/images/fa/button_italic.png differ diff --git a/skins/common/images/fa/button_link.png b/skins/common/images/fa/button_link.png new file mode 100644 index 00000000..4ad5ef56 Binary files /dev/null and b/skins/common/images/fa/button_link.png differ diff --git a/skins/common/images/fa/button_nowiki.png b/skins/common/images/fa/button_nowiki.png new file mode 100644 index 00000000..97d0585a Binary files /dev/null and b/skins/common/images/fa/button_nowiki.png differ diff --git a/skins/common/images/fileicon.xcf b/skins/common/images/fileicon.xcf new file mode 100644 index 00000000..85a0a610 Binary files /dev/null and b/skins/common/images/fileicon.xcf differ diff --git a/skins/common/images/gnu-fdl.png b/skins/common/images/gnu-fdl.png new file mode 100644 index 00000000..1371aba8 Binary files /dev/null and b/skins/common/images/gnu-fdl.png differ diff --git a/skins/common/images/gnu-fdl.xcf b/skins/common/images/gnu-fdl.xcf new file mode 100644 index 00000000..364440dd Binary files /dev/null and b/skins/common/images/gnu-fdl.xcf differ diff --git a/skins/common/images/groups-logo.png b/skins/common/images/groups-logo.png new file mode 100644 index 00000000..f8ace60b Binary files /dev/null and b/skins/common/images/groups-logo.png differ diff --git a/skins/common/images/icons/fileicon-c.png b/skins/common/images/icons/fileicon-c.png new file mode 100644 index 00000000..6da6916e Binary files /dev/null and b/skins/common/images/icons/fileicon-c.png differ diff --git a/skins/common/images/icons/fileicon-cpp.png b/skins/common/images/icons/fileicon-cpp.png new file mode 100644 index 00000000..ba54e77f Binary files /dev/null and b/skins/common/images/icons/fileicon-cpp.png differ diff --git a/skins/common/images/icons/fileicon-deb.png b/skins/common/images/icons/fileicon-deb.png new file mode 100644 index 00000000..ac1e2cf9 Binary files /dev/null and b/skins/common/images/icons/fileicon-deb.png differ diff --git a/skins/common/images/icons/fileicon-djvu.png b/skins/common/images/icons/fileicon-djvu.png new file mode 100644 index 00000000..2e1e2c9b Binary files /dev/null and b/skins/common/images/icons/fileicon-djvu.png differ diff --git a/skins/common/images/icons/fileicon-djvu.xcf b/skins/common/images/icons/fileicon-djvu.xcf new file mode 100644 index 00000000..8043dcdb Binary files /dev/null and b/skins/common/images/icons/fileicon-djvu.xcf differ diff --git a/skins/common/images/icons/fileicon-dvi.png b/skins/common/images/icons/fileicon-dvi.png new file mode 100644 index 00000000..6c7aa1a1 Binary files /dev/null and b/skins/common/images/icons/fileicon-dvi.png differ diff --git a/skins/common/images/icons/fileicon-exe.png b/skins/common/images/icons/fileicon-exe.png new file mode 100644 index 00000000..6ccf1821 Binary files /dev/null and b/skins/common/images/icons/fileicon-exe.png differ diff --git a/skins/common/images/icons/fileicon-h.png b/skins/common/images/icons/fileicon-h.png new file mode 100644 index 00000000..d091afff Binary files /dev/null and b/skins/common/images/icons/fileicon-h.png differ diff --git a/skins/common/images/icons/fileicon-html.png b/skins/common/images/icons/fileicon-html.png new file mode 100644 index 00000000..7c479525 Binary files /dev/null and b/skins/common/images/icons/fileicon-html.png differ diff --git a/skins/common/images/icons/fileicon-iso.png b/skins/common/images/icons/fileicon-iso.png new file mode 100644 index 00000000..b4192e9e Binary files /dev/null and b/skins/common/images/icons/fileicon-iso.png differ diff --git a/skins/common/images/icons/fileicon-java.png b/skins/common/images/icons/fileicon-java.png new file mode 100644 index 00000000..757c6aec Binary files /dev/null and b/skins/common/images/icons/fileicon-java.png differ diff --git a/skins/common/images/icons/fileicon-mid.png b/skins/common/images/icons/fileicon-mid.png new file mode 100644 index 00000000..aa826070 Binary files /dev/null and b/skins/common/images/icons/fileicon-mid.png differ diff --git a/skins/common/images/icons/fileicon-mov.png b/skins/common/images/icons/fileicon-mov.png new file mode 100644 index 00000000..2c0da0d8 Binary files /dev/null and b/skins/common/images/icons/fileicon-mov.png differ diff --git a/skins/common/images/icons/fileicon-o.png b/skins/common/images/icons/fileicon-o.png new file mode 100644 index 00000000..bf051cb8 Binary files /dev/null and b/skins/common/images/icons/fileicon-o.png differ diff --git a/skins/common/images/icons/fileicon-ogg.png b/skins/common/images/icons/fileicon-ogg.png new file mode 100644 index 00000000..b8ba7714 Binary files /dev/null and b/skins/common/images/icons/fileicon-ogg.png differ diff --git a/skins/common/images/icons/fileicon-ogg.xcf b/skins/common/images/icons/fileicon-ogg.xcf new file mode 100644 index 00000000..a91024bf Binary files /dev/null and b/skins/common/images/icons/fileicon-ogg.xcf differ diff --git a/skins/common/images/icons/fileicon-pdf.png b/skins/common/images/icons/fileicon-pdf.png new file mode 100644 index 00000000..ee39b6c3 Binary files /dev/null and b/skins/common/images/icons/fileicon-pdf.png differ diff --git a/skins/common/images/icons/fileicon-ps.png b/skins/common/images/icons/fileicon-ps.png new file mode 100644 index 00000000..f1f504d7 Binary files /dev/null and b/skins/common/images/icons/fileicon-ps.png differ diff --git a/skins/common/images/icons/fileicon-rm.png b/skins/common/images/icons/fileicon-rm.png new file mode 100644 index 00000000..5ba04e5a Binary files /dev/null and b/skins/common/images/icons/fileicon-rm.png differ diff --git a/skins/common/images/icons/fileicon-rpm.png b/skins/common/images/icons/fileicon-rpm.png new file mode 100644 index 00000000..0f1c3b87 Binary files /dev/null and b/skins/common/images/icons/fileicon-rpm.png differ diff --git a/skins/common/images/icons/fileicon-svg.png b/skins/common/images/icons/fileicon-svg.png new file mode 100644 index 00000000..8dc6d30f Binary files /dev/null and b/skins/common/images/icons/fileicon-svg.png differ diff --git a/skins/common/images/icons/fileicon-tar.png b/skins/common/images/icons/fileicon-tar.png new file mode 100644 index 00000000..a4b15d7f Binary files /dev/null and b/skins/common/images/icons/fileicon-tar.png differ diff --git a/skins/common/images/icons/fileicon-tex.png b/skins/common/images/icons/fileicon-tex.png new file mode 100644 index 00000000..ee8c0226 Binary files /dev/null and b/skins/common/images/icons/fileicon-tex.png differ diff --git a/skins/common/images/icons/fileicon-ttf.png b/skins/common/images/icons/fileicon-ttf.png new file mode 100644 index 00000000..1b53066e Binary files /dev/null and b/skins/common/images/icons/fileicon-ttf.png differ diff --git a/skins/common/images/icons/fileicon-txt.png b/skins/common/images/icons/fileicon-txt.png new file mode 100644 index 00000000..76e98909 Binary files /dev/null and b/skins/common/images/icons/fileicon-txt.png differ diff --git a/skins/common/images/icons/fileicon.png b/skins/common/images/icons/fileicon.png new file mode 100644 index 00000000..5675170b Binary files /dev/null and b/skins/common/images/icons/fileicon.png differ diff --git a/skins/common/images/ksh/button_S_italic.png b/skins/common/images/ksh/button_S_italic.png new file mode 100644 index 00000000..0761a1e1 Binary files /dev/null and b/skins/common/images/ksh/button_S_italic.png differ diff --git a/skins/common/images/link_icon.gif b/skins/common/images/link_icon.gif new file mode 100644 index 00000000..815ccb1b Binary files /dev/null and b/skins/common/images/link_icon.gif differ diff --git a/skins/common/images/magnify-clip.png b/skins/common/images/magnify-clip.png new file mode 100644 index 00000000..50abcb68 Binary files /dev/null and b/skins/common/images/magnify-clip.png differ diff --git a/skins/common/images/mediawiki-small.xcf b/skins/common/images/mediawiki-small.xcf new file mode 100644 index 00000000..75355171 Binary files /dev/null and b/skins/common/images/mediawiki-small.xcf differ diff --git a/skins/common/images/mediawiki.png b/skins/common/images/mediawiki.png new file mode 100644 index 00000000..69fce988 Binary files /dev/null and b/skins/common/images/mediawiki.png differ diff --git a/skins/common/images/poweredby_mediawiki_88x31.png b/skins/common/images/poweredby_mediawiki_88x31.png new file mode 100644 index 00000000..ce1765d1 Binary files /dev/null and b/skins/common/images/poweredby_mediawiki_88x31.png differ diff --git a/skins/common/images/public-domain.png b/skins/common/images/public-domain.png new file mode 100644 index 00000000..e5fb33ce Binary files /dev/null and b/skins/common/images/public-domain.png differ diff --git a/skins/common/images/redirectltr.png b/skins/common/images/redirectltr.png new file mode 100644 index 00000000..9110ca13 Binary files /dev/null and b/skins/common/images/redirectltr.png differ diff --git a/skins/common/images/redirectrtl.png b/skins/common/images/redirectrtl.png new file mode 100644 index 00000000..60fd59d3 Binary files /dev/null and b/skins/common/images/redirectrtl.png differ diff --git a/skins/common/images/sort_down.gif b/skins/common/images/sort_down.gif new file mode 100644 index 00000000..5ff08160 Binary files /dev/null and b/skins/common/images/sort_down.gif differ diff --git a/skins/common/images/sort_none.gif b/skins/common/images/sort_none.gif new file mode 100644 index 00000000..6bb02824 Binary files /dev/null and b/skins/common/images/sort_none.gif differ diff --git a/skins/common/images/sort_up.gif b/skins/common/images/sort_up.gif new file mode 100644 index 00000000..53002968 Binary files /dev/null and b/skins/common/images/sort_up.gif differ diff --git a/skins/common/images/spinner.gif b/skins/common/images/spinner.gif new file mode 100644 index 00000000..bdd59d52 Binary files /dev/null and b/skins/common/images/spinner.gif differ diff --git a/skins/common/images/tooltip_icon.png b/skins/common/images/tooltip_icon.png new file mode 100644 index 00000000..6b3160ec Binary files /dev/null and b/skins/common/images/tooltip_icon.png differ diff --git a/skins/common/images/wiki.png b/skins/common/images/wiki.png new file mode 100644 index 00000000..49913f6a Binary files /dev/null and b/skins/common/images/wiki.png differ diff --git a/skins/common/metadata.js b/skins/common/metadata.js new file mode 100644 index 00000000..a73b6937 --- /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/mwsuggest.js b/skins/common/mwsuggest.js new file mode 100644 index 00000000..061a6451 --- /dev/null +++ b/skins/common/mwsuggest.js @@ -0,0 +1,851 @@ +/* + * OpenSearch ajax suggestion engine for MediaWiki + * + * uses core MediaWiki open search support to fetch suggestions + * and show them below search boxes and other inputs + * + * by Robert Stojnic (April 2008) + */ + +// search_box_id -> Results object +var os_map = {}; +// cached data, url -> json_text +var os_cache = {}; +// global variables for suggest_keypress +var os_cur_keypressed = 0; +var os_last_keypress = 0; +var os_keypressed_count = 0; +// type: Timer +var os_timer = null; +// tie mousedown/up events +var os_mouse_pressed = false; +var os_mouse_num = -1; +// if true, the last change was made by mouse (and not keyboard) +var os_mouse_moved = false; +// delay between keypress and suggestion (in ms) +var os_search_timeout = 250; +// these pairs of inputs/forms will be autoloaded at startup +var os_autoload_inputs = new Array('searchInput', 'searchInput2', 'powerSearchText', 'searchText'); +var os_autoload_forms = new Array('searchform', 'searchform2', 'powersearch', 'search' ); +// if we stopped the service +var os_is_stopped = false; +// max lines to show in suggest table +var os_max_lines_per_suggest = 7; +// number of steps to animate expansion/contraction of container width +var os_animation_steps = 6; +// num of pixels of smallest step +var os_animation_min_step = 2; +// delay between steps (in ms) +var os_animation_delay = 30; +// max width of container in percent of normal size (1 == 100%) +var os_container_max_width = 2; +// currently active animation timer +var os_animation_timer = null; + +/** Timeout timer class that will fetch the results */ +function os_Timer(id,r,query){ + this.id = id; + this.r = r; + this.query = query; +} + +/** Timer user to animate expansion/contraction of container width */ +function os_AnimationTimer(r, target){ + this.r = r; + var current = document.getElementById(r.container).offsetWidth; + this.inc = Math.round((target-current) / os_animation_steps); + if(this.inc < os_animation_min_step && this.inc >=0) + this.inc = os_animation_min_step; // minimal animation step + if(this.inc > -os_animation_min_step && this.inc <0) + this.inc = -os_animation_min_step; + this.target = target; +} + +/** Property class for single search box */ +function os_Results(name, formname){ + this.searchform = formname; // id of the searchform + this.searchbox = name; // id of the searchbox + this.container = name+"Suggest"; // div that holds results + this.resultTable = name+"Result"; // id base for the result table (+num = table row) + this.resultText = name+"ResultText"; // id base for the spans within result tables (+num) + this.toggle = name+"Toggle"; // div that has the toggle (enable/disable) link + this.query = null; // last processed query + this.results = null; // parsed titles + this.resultCount = 0; // number of results + this.original = null; // query that user entered + this.selected = -1; // which result is selected + this.containerCount = 0; // number of results visible in container + this.containerRow = 0; // height of result field in the container + this.containerTotal = 0; // total height of the container will all results + this.visible = false; // if container is visible +} + +/** Hide results div */ +function os_hideResults(r){ + var c = document.getElementById(r.container); + if(c != null) + c.style.visibility = "hidden"; + r.visible = false; + r.selected = -1; +} + +/** Show results div */ +function os_showResults(r){ + if(os_is_stopped) + return; + os_fitContainer(r); + var c = document.getElementById(r.container); + r.selected = -1; + if(c != null){ + c.scrollTop = 0; + c.style.visibility = "visible"; + r.visible = true; + } +} + +function os_operaWidthFix(x){ + // TODO: better css2 incompatibility detection here + if(is_opera || is_khtml || navigator.userAgent.toLowerCase().indexOf('firefox/1')!=-1){ + return 30; // opera&konqueror & old firefox don't understand overflow-x, estimate scrollbar width + } + return 0; +} + +function os_encodeQuery(value){ + if (encodeURIComponent) { + return encodeURIComponent(value); + } + if(escape) { + return escape(value); + } + return null; +} +function os_decodeValue(value){ + if (decodeURIComponent) { + return decodeURIComponent(value); + } + if(unescape){ + return unescape(value); + } + return null; +} + +/** Brower-dependent functions to find window inner size, and scroll status */ +function f_clientWidth() { + return f_filterResults ( + window.innerWidth ? window.innerWidth : 0, + document.documentElement ? document.documentElement.clientWidth : 0, + document.body ? document.body.clientWidth : 0 + ); +} +function f_clientHeight() { + return f_filterResults ( + window.innerHeight ? window.innerHeight : 0, + document.documentElement ? document.documentElement.clientHeight : 0, + document.body ? document.body.clientHeight : 0 + ); +} +function f_scrollLeft() { + return f_filterResults ( + window.pageXOffset ? window.pageXOffset : 0, + document.documentElement ? document.documentElement.scrollLeft : 0, + document.body ? document.body.scrollLeft : 0 + ); +} +function f_scrollTop() { + return f_filterResults ( + window.pageYOffset ? window.pageYOffset : 0, + document.documentElement ? document.documentElement.scrollTop : 0, + document.body ? document.body.scrollTop : 0 + ); +} +function f_filterResults(n_win, n_docel, n_body) { + var n_result = n_win ? n_win : 0; + if (n_docel && (!n_result || (n_result > n_docel))) + n_result = n_docel; + return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result; +} + +/** Get the height available for the results container */ +function os_availableHeight(r){ + var absTop = document.getElementById(r.container).style.top; + var px = absTop.lastIndexOf("px"); + if(px > 0) + absTop = absTop.substring(0,px); + return f_clientHeight() - (absTop - f_scrollTop()); +} + + +/** Get element absolute position {left,top} */ +function os_getElementPosition(elemID){ + var offsetTrail = document.getElementById(elemID); + var offsetLeft = 0; + var offsetTop = 0; + while (offsetTrail){ + offsetLeft += offsetTrail.offsetLeft; + offsetTop += offsetTrail.offsetTop; + offsetTrail = offsetTrail.offsetParent; + } + if (navigator.userAgent.indexOf('Mac') != -1 && typeof document.body.leftMargin != 'undefined'){ + offsetLeft += document.body.leftMargin; + offsetTop += document.body.topMargin; + } + return {left:offsetLeft,top:offsetTop}; +} + +/** Create the container div that will hold the suggested titles */ +function os_createContainer(r){ + var c = document.createElement("div"); + var s = document.getElementById(r.searchbox); + var pos = os_getElementPosition(r.searchbox); + var left = pos.left; + var top = pos.top + s.offsetHeight; + c.className = "os-suggest"; + c.setAttribute("id", r.container); + document.body.appendChild(c); + + // dynamically generated style params + // IE workaround, cannot explicitely set "style" attribute + c = document.getElementById(r.container); + c.style.top = top+"px"; + c.style.left = left+"px"; + c.style.width = s.offsetWidth+"px"; + + // mouse event handlers + c.onmouseover = function(event) { os_eventMouseover(r.searchbox, event); }; + c.onmousemove = function(event) { os_eventMousemove(r.searchbox, event); }; + c.onmousedown = function(event) { return os_eventMousedown(r.searchbox, event); }; + c.onmouseup = function(event) { os_eventMouseup(r.searchbox, event); }; + return c; +} + +/** change container height to fit to screen */ +function os_fitContainer(r){ + var c = document.getElementById(r.container); + var h = os_availableHeight(r) - 20; + var inc = r.containerRow; + h = parseInt(h/inc) * inc; + if(h < (2 * inc) && r.resultCount > 1) // min: two results + h = 2 * inc; + if((h/inc) > os_max_lines_per_suggest ) + h = inc * os_max_lines_per_suggest; + if(h < r.containerTotal){ + c.style.height = h +"px"; + r.containerCount = parseInt(Math.round(h/inc)); + } else{ + c.style.height = r.containerTotal+"px"; + r.containerCount = r.resultCount; + } +} +/** If some entries are longer than the box, replace text with "..." */ +function os_trimResultText(r){ + // find max width, first see if we could expand the container to fit it + var maxW = 0; + for(var i=0;i maxW) + maxW = e.offsetWidth; + } + var w = document.getElementById(r.container).offsetWidth; + var fix = 0; + if(r.containerCount < r.resultCount){ + fix = 20; // give 20px for scrollbar + } else + fix = os_operaWidthFix(w); + if(fix < 4) + fix = 4; // basic padding + maxW += fix; + + // resize container to fit more data if permitted + var normW = document.getElementById(r.searchbox).offsetWidth; + var prop = maxW / normW; + if(prop > os_container_max_width) + prop = os_container_max_width; + else if(prop < 1) + prop = 1; + var newW = Math.round( normW * prop ); + if( w != newW ){ + w = newW; + if( os_animation_timer != null ) + clearInterval(os_animation_timer.id) + os_animation_timer = new os_AnimationTimer(r,w); + os_animation_timer.id = setInterval("os_animateChangeWidth()",os_animation_delay); + w -= fix; // this much is reserved + } + + // trim results + if(w < 10) + return; + for(var i=0;i w && (e.offsetWidth < lastW || iteration<2)){ + changedText = true; + lastW = e.offsetWidth; + var l = e.innerHTML; + e.innerHTML = l.substring(0,l.length-replace)+"..."; + iteration++; + replace = 4; // how many chars to replace + } + if(changedText){ + // show hint for trimmed titles + document.getElementById(r.resultTable+i).setAttribute("title",r.results[i]); + } + } +} + +/** Invoked on timer to animate change in container width */ +function os_animateChangeWidth(){ + var r = os_animation_timer.r; + var c = document.getElementById(r.container); + var w = c.offsetWidth; + var normW = document.getElementById(r.searchbox).offsetWidth; + var normL = os_getElementPosition(r.searchbox).left; + var inc = os_animation_timer.inc; + var target = os_animation_timer.target; + var nw = w + inc; + if( (inc > 0 && nw >= target) || (inc <= 0 && nw <= target) ){ + // finished ! + c.style.width = target+"px"; + clearInterval(os_animation_timer.id) + os_animation_timer = null; + } else{ + // in-progress + c.style.width = nw+"px"; + if(document.documentElement.dir == "rtl") + c.style.left = (normL + normW + (target - nw) - os_animation_timer.target - 1)+"px"; + } +} + +/** Handles data from XMLHttpRequest, and updates the suggest results */ +function os_updateResults(r, query, text, cacheKey){ + os_cache[cacheKey] = text; + r.query = query; + r.original = query; + if(text == ""){ + r.results = null; + r.resultCount = 0; + os_hideResults(r); + } else{ + try { + var p = eval('('+text+')'); // simple json parse, could do a safer one + if(p.length<2 || p[1].length == 0){ + r.results = null; + r.resultCount = 0; + os_hideResults(r); + return; + } + var c = document.getElementById(r.container); + if(c == null) + c = os_createContainer(r); + c.innerHTML = os_createResultTable(r,p[1]); + // init container table sizes + var t = document.getElementById(r.resultTable); + r.containerTotal = t.offsetHeight; + r.containerRow = t.offsetHeight / r.resultCount; + os_fitContainer(r); + os_trimResultText(r); + os_showResults(r); + } catch(e){ + // bad response from server or such + os_hideResults(r); + os_cache[cacheKey] = null; + } + } +} + +/** Create the result table to be placed in the container div */ +function os_createResultTable(r, results){ + var c = document.getElementById(r.container); + var width = c.offsetWidth - os_operaWidthFix(c.offsetWidth); + var html = ""; + r.results = new Array(); + r.resultCount = results.length; + for(i=0;i"+title+""; + } + html+="
" + return html; +} + +/** Fetch namespaces from checkboxes or hidden fields in the search form, + if none defined use wgSearchNamespaces global */ +function os_getNamespaces(r){ + var namespaces = ""; + var elements = document.forms[r.searchform].elements; + for(i=0; i < elements.length; i++){ + var name = elements[i].name; + if(typeof name != 'undefined' && name.length > 2 + && name[0]=='n' && name[1]=='s' + && ((elements[i].type=='checkbox' && elements[i].checked) + || (elements[i].type=='hidden' && elements[i].value=="1")) ){ + if(namespaces!="") + namespaces+="|"; + namespaces+=name.substring(2); + } + } + if(namespaces == "") + namespaces = wgSearchNamespaces.join("|"); + return namespaces; +} + +/** Update results if user hasn't already typed something else */ +function os_updateIfRelevant(r, query, text, cacheKey){ + var t = document.getElementById(r.searchbox); + if(t != null && t.value == query){ // check if response is still relevant + os_updateResults(r, query, text, cacheKey); + } + r.query = query; +} + +/** Fetch results after some timeout */ +function os_delayedFetch(){ + if(os_timer == null) + return; + var r = os_timer.r; + var query = os_timer.query; + os_timer = null; + var path = wgMWSuggestTemplate.replace("{namespaces}",os_getNamespaces(r)) + .replace("{dbname}",wgDBname) + .replace("{searchTerms}",os_encodeQuery(query)); + + // try to get from cache, if not fetch using ajax + var cached = os_cache[path]; + if(cached != null){ + os_updateIfRelevant(r, query, cached, path); + } else{ + var xmlhttp = sajax_init_object(); + if(xmlhttp){ + try { + xmlhttp.open("GET", path, true); + xmlhttp.onreadystatechange=function(){ + if (xmlhttp.readyState==4 && typeof os_updateIfRelevant == 'function') { + os_updateIfRelevant(r, query, xmlhttp.responseText, path); + } + }; + xmlhttp.send(null); + } catch (e) { + if (window.location.hostname == "localhost") { + alert("Your browser blocks XMLHttpRequest to 'localhost', try using a real hostname for development/testing."); + } + throw e; + } + } + } +} + +/** Init timed update via os_delayedUpdate() */ +function os_fetchResults(r, query, timeout){ + if(query == ""){ + os_hideResults(r); + return; + } else if(query == r.query) + return; // no change + + os_is_stopped = false; // make sure we're running + + /* var cacheKey = wgDBname+":"+query; + var cached = os_cache[cacheKey]; + if(cached != null){ + os_updateResults(r,wgDBname,query,cached); + return; + } */ + + // cancel any pending fetches + if(os_timer != null && os_timer.id != null) + clearTimeout(os_timer.id); + // schedule delayed fetching of results + if(timeout != 0){ + os_timer = new os_Timer(setTimeout("os_delayedFetch()",timeout),r,query); + } else{ + os_timer = new os_Timer(null,r,query); + os_delayedFetch(); // do it now! + } + +} +/** Change the highlighted row (i.e. suggestion), from position cur to next */ +function os_changeHighlight(r, cur, next, updateSearchBox){ + if (next >= r.resultCount) + next = r.resultCount-1; + if (next < -1) + next = -1; + r.selected = next; + if (cur == next) + return; // nothing to do. + + if(cur >= 0){ + var curRow = document.getElementById(r.resultTable + cur); + if(curRow != null) + curRow.className = "os-suggest-result"; + } + var newText; + if(next >= 0){ + var nextRow = document.getElementById(r.resultTable + next); + if(nextRow != null) + nextRow.className = os_HighlightClass(); + newText = r.results[next]; + } else + newText = r.original; + + // adjust the scrollbar if any + if(r.containerCount < r.resultCount){ + var c = document.getElementById(r.container); + var vStart = c.scrollTop / r.containerRow; + var vEnd = vStart + r.containerCount; + if(next < vStart) + c.scrollTop = next * r.containerRow; + else if(next >= vEnd) + c.scrollTop = (next - r.containerCount + 1) * r.containerRow; + } + + // update the contents of the search box + if(updateSearchBox){ + os_updateSearchQuery(r,newText); + } +} + +function os_HighlightClass() { + var match = navigator.userAgent.match(/AppleWebKit\/(\d+)/); + if (match) { + var webKitVersion = parseInt(match[1]); + if (webKitVersion < 523) { + // CSS system highlight colors broken on old Safari + // https://bugs.webkit.org/show_bug.cgi?id=6129 + // Safari 3.0.4, 3.1 known ok + return "os-suggest-result-hl-webkit"; + } + } + return "os-suggest-result-hl"; +} + +function os_updateSearchQuery(r,newText){ + document.getElementById(r.searchbox).value = newText; + r.query = newText; +} + +/** Find event target */ +function os_getTarget(e){ + if (!e) e = window.event; + if (e.target) return e.target; + else if (e.srcElement) return e.srcElement; + else return null; +} + + + +/******************** + * Keyboard events + ********************/ + +/** Event handler that will fetch results on keyup */ +function os_eventKeyup(e){ + var targ = os_getTarget(e); + var r = os_map[targ.id]; + if(r == null) + return; // not our event + + // some browsers won't generate keypressed for arrow keys, catch it + if(os_keypressed_count == 0){ + os_processKey(r,os_cur_keypressed,targ); + } + var query = targ.value; + os_fetchResults(r,query,os_search_timeout); +} + +/** catch arrows up/down and escape to hide the suggestions */ +function os_processKey(r,keypressed,targ){ + if (keypressed == 40){ // Arrow Down + if (r.visible) { + os_changeHighlight(r, r.selected, r.selected+1, true); + } else if(os_timer == null){ + // user wants to get suggestions now + r.query = ""; + os_fetchResults(r,targ.value,0); + } + } else if (keypressed == 38){ // Arrow Up + if (r.visible){ + os_changeHighlight(r, r.selected, r.selected-1, true); + } + } else if(keypressed == 27){ // Escape + document.getElementById(r.searchbox).value = r.original; + r.query = r.original; + os_hideResults(r); + } else if(r.query != document.getElementById(r.searchbox).value){ + // os_hideResults(r); // don't show old suggestions + } +} + +/** When keys is held down use a timer to output regular events */ +function os_eventKeypress(e){ + var targ = os_getTarget(e); + var r = os_map[targ.id]; + if(r == null) + return; // not our event + + var keypressed = os_cur_keypressed; + if(keypressed == 38 || keypressed == 40){ + var d = new Date() + var now = d.getTime(); + if(now - os_last_keypress < 120){ + os_last_keypress = now; + return; + } + } + + os_keypressed_count++; + os_processKey(r,keypressed,targ); +} + +/** Catch the key code (Firefox bug) */ +function os_eventKeydown(e){ + if (!e) e = window.event; + var targ = os_getTarget(e); + var r = os_map[targ.id]; + if(r == null) + return; // not our event + + os_mouse_moved = false; + + os_cur_keypressed = (e.keyCode == undefined) ? e.which : e.keyCode; + os_last_keypress = 0; + os_keypressed_count = 0; +} + +/** Event: loss of focus of input box */ +function os_eventBlur(e){ + var targ = os_getTarget(e); + var r = os_map[targ.id]; + if(r == null) + return; // not our event + if(!os_mouse_pressed) + os_hideResults(r); +} + +/** Event: focus (catch only when stopped) */ +function os_eventFocus(e){ + // nothing happens here? +} + + + +/******************** + * Mouse events + ********************/ + +/** Mouse over the container */ +function os_eventMouseover(srcId, e){ + var targ = os_getTarget(e); + var r = os_map[srcId]; + if(r == null || !os_mouse_moved) + return; // not our event + var num = os_getNumberSuffix(targ.id); + if(num >= 0) + os_changeHighlight(r,r.selected,num,false); + +} + +/* Get row where the event occured (from its id) */ +function os_getNumberSuffix(id){ + var num = id.substring(id.length-2); + if( ! (num.charAt(0) >= '0' && num.charAt(0) <= '9') ) + num = num.substring(1); + if(os_isNumber(num)) + return parseInt(num); + else + return -1; +} + +/** Save mouse move as last action */ +function os_eventMousemove(srcId, e){ + os_mouse_moved = true; +} + +/** Mouse button held down, register possible click */ +function os_eventMousedown(srcId, e){ + var targ = os_getTarget(e); + var r = os_map[srcId]; + if(r == null) + return; // not our event + var num = os_getNumberSuffix(targ.id); + + os_mouse_pressed = true; + if(num >= 0){ + os_mouse_num = num; + // os_updateSearchQuery(r,r.results[num]); + } + // keep the focus on the search field + document.getElementById(r.searchbox).focus(); + + return false; // prevents selection +} + +/** Mouse button released, check for click on some row */ +function os_eventMouseup(srcId, e){ + var targ = os_getTarget(e); + var r = os_map[srcId]; + if(r == null) + return; // not our event + var num = os_getNumberSuffix(targ.id); + + if(num >= 0 && os_mouse_num == num){ + os_updateSearchQuery(r,r.results[num]); + os_hideResults(r); + document.getElementById(r.searchform).submit(); + } + os_mouse_pressed = false; + // keep the focus on the search field + document.getElementById(r.searchbox).focus(); +} + +/** Check if x is a valid integer */ +function os_isNumber(x){ + if(x == "" || isNaN(x)) + return false; + for(var i=0;i= '0' && c <= '9') ) + return false; + } + return true; +} + + +/** When the form is submitted hide everything, cancel updates... */ +function os_eventOnsubmit(e){ + var targ = os_getTarget(e); + + os_is_stopped = true; + // kill timed requests + if(os_timer != null && os_timer.id != null){ + clearTimeout(os_timer.id); + os_timer = null; + } + // Hide all suggestions + for(i=0;i to make sure the editsection links scale right */ + +h1 { font-size: 2em; } +h2 { font-size: 1.5em; } +h3 { font-size: 1.17em; } +h5 { font-size: .83em; } +h6 { font-size: .75em; } +h1, h2, h3, h4, h5, h6 { font-weight: bolder } + +/* Now the custom parts */ + +/* Make edit sections (which are inside h# tags) normal-sized */ +.editsection { + font-weight: normal; +} +h1 .editsection { font-size: 50% } +h2 .editsection { font-size: 66.7% } +h3 .editsection { font-size: 85.5% } +h5 .editsection { font-size: 120% } +h6 .editsection { font-size: 133% } + +#footer { clear: both } +/* images */ +div.floatright { float: right; clear: right; margin: 0 0 1em 1em; } +div.floatright p { font-style: italic; } +div.floatleft { float: left; clear: left; margin: 0.3em 0.5em 0.5em 0; } +div.floatleft p { font-style: italic; } + + +/* Print-specific things to hide */ +.printfooter { + display: none; +} + +/* table standards */ +table.rimage { + float:right; + margin-left:1em; + margin-bottom:1em; + text-align:center; + font-size:smaller; +} + +/* thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { color: #4b4b4b; } + +img { border: none; } + +#toc, +.toc { + border: 1px solid #bba; + background-color: #f7f8ff; + padding: 5px; + font-size: 95%; + text-align: center; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-left: 0; + padding-left: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + + +.error { + color: red; + font-size: larger; +} + +/* preference page with js-genrated toc */ +#preftoc { + float: left; + margin: 1em 1em 1em 1em; + width: 13em; +} +#preftoc li { border: 1px solid White; } +#preftoc li.selected { + background-color:#f9f9f9; + border:1px dashed #aaaaaa; +} +#preftoc a, +#preftoc a:active { + display: block; + color: #005189; +} +#prefcontrol { + clear: left; + float: left; + margin-top: 1em; +} +div.prefsectiontip { + font-size: 94%; + margin-top: 0.4em; + color: #666; +} +fieldset.prefsection { margin-top: 1em } +fieldset.operaprefsection { margin-left: 15em } + +/* emulate center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} +/* small for tables and similar */ +.small, .small * { font-size: 94%; } +table.small { font-size: 100% } + +/* use this instead of #toc for page content */ +.toccolours { + border:1px solid #aaaaaa; + background-color:#f9f9f9; + padding:5px; + font-size: 95%; +} +#siteNotice { + border:1px solid #aaaaaa; + padding-left: 0.5em; + padding-right: 0.5em; +} +.redirectText { + font-size:150%; + margin:5px; +} +.sharedUploadNotice { + font-style: italic; +} +span.unpatrolled { + font-weight:bold; + color:red; +} + +span.updatedmarker { + color:black; + background-color:#00FF00; +} + +table.gallery { + border: 1px solid #cccccc; + margin: 2px; + padding: 2px; + background-color:#ffffff; +} + +table.gallery tr { + vertical-align:top; +} + +table.gallery td { + vertical-align:top; + background-color:#f9f9f9; + border: solid 2px white; +} + +div.gallerybox { + margin: 2px; + width: 150px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #cccccc; + margin: 2px; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; +} + +span.comment { + font-style: italic; +} + +span.changedby { + font-size: 95%; +} + +.previewnote { + text-align: center; + color: #cc0000; +} +.editExternally { + border-style:solid; + border-width:1px; + border-color:gray; + background: #ffffff; + padding:3px; + margin-top:0.5em; + float:left; + font-size:small; + text-align:center; +} +.editExternallyHelp { + font-style:italic; + color:gray; +} + +li span.deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +/* Classes for EXIF data display */ +table.mw_metadata { + margin-left: 0.5em; +} + +table.mw_metadata caption { font-weight: bold; } +table.mw_metadata th { font-weight: normal; } +table.mw_metadata td { padding: 0.1em; } + +table.mw_metadata { + border: none; + border-collapse: collapse; +} +table.mw_metadata td, table.mw_metadata th { + border: 1px solid #aaaaaa; + padding-left: 4px; + padding-right: 4px; +} +table.mw_metadata th { + background-color: #f9f9f9; +} +table.mw_metadata td { + background-color: #fcfcfc; +} +table.mw_metadata td.spacer { + background: inherit; + border-top: none; + border-bottom: none; +} +table.collapsed tr.collapsable { + display: none; +} + +.visualClear { + clear: both; +} + +#mw_trackbacks { + border: solid 1px #bbbbff; + background-color: #eeeeff; + padding: 0.2em; +} + +/* Allmessages table */ + +#allmessagestable th { + background-color: #b2b2ff; +} + +#allmessagestable tr.orig { + background-color: #ffe2e2; +} + +#allmessagestable tr.new { + background-color: #e2ffe2; +} + +#allmessagestable tr.def { + background-color: #f0f0ff; +} + +#jump-to-nav { + display: none; +} + +/* Keep this temporarily so that cached pages will display right */ +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +} +table.gallery caption { + font-weight: bold; +} + +div.multipageimagenavbox { + border: solid 1px silver; + padding: 4px; + margin: 1em; + background: #f0f0f0; +} + +div.multipageimagenavbox div.thumb { + border: none; + margin-left: 2em; + margin-right: 2em; +} + +div.multipageimagenavbox hr { + margin: 6px; +} + +table.multipageimage td { + text-align: center; +} + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager_nav a { text-decoration: none; } +.TablePager { border-collapse: collapse; } +.TablePager, .TablePager td, .TablePager th { + border: 0.15em solid #777777; + padding: 0 0.15em 0 0.15em; +} +.TablePager th { background-color: #eeeeff } +.TablePager td { background-color: #ffffff } +.TablePager tr:hover td { background-color: #eeeeff } + +.imagelist td, .imagelist th { white-space: nowrap } +.imagelist .TablePager_col_links { background-color: #eeeeff } +.imagelist .TablePager_col_img_description { white-space: normal } +.imagelist th.TablePager_sort { background-color: #ccccff } + +.templatesUsed { margin-top: 1em; } + +.MediaTransformError { + border: thin solid #777; + background-color: #ccc; + padding: 0.1em; +} +.MediaTransformError td { + text-align: center; + vertical-align: middle; + font-size: 90%; +} + +form#specialpages { + display: inline; +} diff --git a/skins/common/prefs.js b/skins/common/prefs.js new file mode 100644 index 00000000..c2554c00 --- /dev/null +++ b/skins/common/prefs.js @@ -0,0 +1,164 @@ + +// generate toc from prefs form, fold sections +// XXX: needs testing on IE/Mac and safari +// more comments to follow +function tabbedprefs() { + var prefform = document.getElementById('preferences'); + if (!prefform || !document.createElement) { + return; + } + if (prefform.nodeName.toLowerCase() == 'a') { + return; // Occasional IE problem + } + prefform.className = prefform.className + 'jsprefs'; + var sections = []; + var children = prefform.childNodes; + var seci = 0; + for (var i = 0; i < children.length; i++) { + if (children[i].nodeName.toLowerCase() == 'fieldset') { + children[i].id = 'prefsection-' + seci; + children[i].className = 'prefsection'; + if (is_opera || is_khtml) { + children[i].className = 'prefsection operaprefsection'; + } + var legends = children[i].getElementsByTagName('legend'); + sections[seci] = {}; + if (legends[0]) legends[0].className = 'mainLegend'; + if (legends[0] && legends[0].firstChild.nodeValue) { + sections[seci].text = legends[0].firstChild.nodeValue; + } else { + sections[seci].text = '# ' + seci; + } + sections[seci].secid = children[i].id; + seci++; + if (sections.length != 1) { + children[i].style.display = 'none'; + } else { + var selectedid = children[i].id; + } + } + } + var toc = document.createElement('ul'); + toc.id = 'preftoc'; + toc.selectedid = selectedid; + for (i = 0; i < sections.length; i++) { + var li = document.createElement('li'); + if (i === 0) { + li.className = 'selected'; + } + var a = document.createElement('a'); + a.href = '#' + sections[i].secid; + a.onmousedown = a.onclick = uncoversection; + a.appendChild(document.createTextNode(sections[i].text)); + a.secid = sections[i].secid; + li.appendChild(a); + toc.appendChild(li); + } + prefform.parentNode.insertBefore(toc, prefform.parentNode.childNodes[0]); + document.getElementById('prefsubmit').id = 'prefcontrol'; +} + +function uncoversection() { + var oldsecid = this.parentNode.parentNode.selectedid; + var newsec = document.getElementById(this.secid); + if (oldsecid != this.secid) { + var ul = document.getElementById('preftoc'); + document.getElementById(oldsecid).style.display = 'none'; + newsec.style.display = 'block'; + ul.selectedid = this.secid; + var lis = ul.getElementsByTagName('li'); + for (var i = 0; i< lis.length; i++) { + lis[i].className = ''; + } + this.parentNode.className = 'selected'; + } + return false; +} + +// Timezone stuff +// tz in format [+-]HHMM +function checkTimezone(tz, msg) { + var localclock = new Date(); + // returns negative offset from GMT in minutes + var tzRaw = localclock.getTimezoneOffset(); + var tzHour = Math.floor( Math.abs(tzRaw) / 60); + var tzMin = Math.abs(tzRaw) % 60; + var tzString = ((tzRaw >= 0) ? "-" : "+") + ((tzHour < 10) ? "0" : "") + tzHour + ((tzMin < 10) ? "0" : "") + tzMin; + if (tz != tzString) { + var junk = msg.split('$1'); + document.write(junk[0] + "UTC" + tzString + junk[1]); + } +} + +function unhidetzbutton() { + var tzb = document.getElementById('guesstimezonebutton'); + if (tzb) { + tzb.style.display = 'inline'; + } + updateTimezoneSelection(false); +} + +// in [-]HH:MM format... +// won't yet work with non-even tzs +function fetchTimezone() { + // FIXME: work around Safari bug + var localclock = new Date(); + // returns negative offset from GMT in minutes + var tzRaw = localclock.getTimezoneOffset(); + var tzHour = Math.floor( Math.abs(tzRaw) / 60); + var tzMin = Math.abs(tzRaw) % 60; + var tzString = ((tzRaw >= 0) ? "-" : "") + ((tzHour < 10) ? "0" : "") + tzHour + + ":" + ((tzMin < 10) ? "0" : "") + tzMin; + return tzString; +} + +function guessTimezone(box) { + document.getElementsByName("wpHourDiff")[0].value = fetchTimezone(); + updateTimezoneSelection(true); +} + +function updateTimezoneSelection(force_offset) { + var wpTimeZone = document.getElementsByName("wpTimeZone")[0]; + var wpHourDiff = document.getElementsByName("wpHourDiff")[0]; + var wpLocalTime = document.getElementById("wpLocalTime"); + var wpServerTime = document.getElementsByName("wpServerTime")[0]; + var minDiff = 0; + + if (force_offset) wpTimeZone.selectedIndex = 1; + if (wpTimeZone.selectedIndex == 1) { + wpHourDiff.disabled = false; + var diffArr = wpHourDiff.value.split(':'); + if (diffArr.length == 1) { + minDiff = parseInt(diffArr[0], 10) * 60; + } else { + minDiff = Math.abs(parseInt(diffArr[0], 10))*60 + parseInt(diffArr[1], 10); + if (parseInt(diffArr[0], 10) < 0) minDiff = -minDiff; + } + } else { + wpHourDiff.disabled = true; + var diffArr = wpTimeZone.options[wpTimeZone.selectedIndex].value.split('|'); + minDiff = parseInt(diffArr[1], 10); + } + if (isNaN(minDiff)) minDiff = 0; + var localTime = parseInt(wpServerTime.value, 10) + minDiff; + while (localTime < 0) localTime += 1440; + while (localTime >= 1440) localTime -= 1440; + + var hour = String(Math.floor(localTime/60)); + if (hour.length<2) hour = '0'+hour; + var min = String(localTime%60); + if (min.length<2) min = '0'+min; + changeText(wpLocalTime, hour+':'+min); + + if (wpTimeZone.selectedIndex != 1) { + hour = String(Math.abs(Math.floor(minDiff/60))); + if (hour.length<2) hour = '0'+hour; + if (minDiff < 0) hour = '-'+hour; + min = String(minDiff%60); + if (min.length<2) min = '0'+min; + wpHourDiff.value = hour+':'+min; + } +} + +hookEvent("load", unhidetzbutton); +hookEvent("load", tabbedprefs); diff --git a/skins/common/preview.js b/skins/common/preview.js new file mode 100644 index 00000000..faf611f0 --- /dev/null +++ b/skins/common/preview.js @@ -0,0 +1,175 @@ +/** + * Live preview script for MediaWiki + * + * 2007-04-25 – Nikerabbit: + * Worked around text cutoff in mozilla-based browsers + * Support for categories + */ + + +lpIdPreview = 'wikiPreview'; +lpIdCategories = 'catlinks'; +lpIdDiff = 'wikiDiff'; + +/* + * Returns XMLHttpRequest based on browser support or null + */ +function openXMLHttpRequest() { + if( window.XMLHttpRequest ) { + return new XMLHttpRequest(); + } else if( window.ActiveXObject && navigator.platform != 'MacPPC' ) { + // IE/Mac has an ActiveXObject but it doesn't work. + return new ActiveXObject("Microsoft.XMLHTTP"); + } else { + return null; + } +} + +/** + * Returns true if could open the request, + * false otherwise (eg no browser support). + */ +function lpDoPreview(text, postUrl) { + lpRequest = openXMLHttpRequest(); + if( !lpRequest ) return false; + + lpRequest.onreadystatechange = lpStatusUpdate; + lpRequest.open("POST", postUrl, true); + + var postData = 'wpTextbox1=' + encodeURIComponent(text); + lpRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); + lpRequest.send(postData); + return true; +} + +function lpStatusUpdate() { + + /* We are at some stage of loading */ + if (lpRequest.readyState > 0 && lpRequest.readyState < 4) { + notify(i18n(wgLivepreviewMessageLoading)); + } + + /* Not loaded yet */ + if(lpRequest.readyState != 4) { + return; + } + + /* We got response, bug it not what we wanted */ + if( lpRequest.status != 200 ) { + var keys = new Array(); + keys[0] = lpRequest.status; + keys[1] = lpRequest.statusText; + window.alert(i18n(wgLivepreviewMessageError, keys)); + lpShowNormalPreview(); + return; + } + + /* All good */ + dismissNotify(i18n(wgLivepreviewMessageReady), 750); + + + var XMLObject = lpRequest.responseXML.documentElement; + + + /* Work around Firefox (Gecko?) limitation where it shows only the first 4096 + * bytes of data. Ref: http://www.thescripts.com/forum/thread482760.html + */ + XMLObject.normalize(); + + var previewElement = XMLObject.getElementsByTagName('preview')[0]; + var categoryElement = XMLObject.getElementsByTagName('category')[0]; + + /* Hide the active diff if it exists */ + var diff = document.getElementById(lpIdDiff); + if ( diff ) { diff.style.display = 'none'; } + + /* Inject preview */ + var previewContainer = document.getElementById( lpIdPreview ); + if ( previewContainer && previewElement ) { + previewContainer.innerHTML = previewElement.firstChild.data; + previewContainer.style.display = 'block'; + } else { + /* Should never happen */ + window.alert(i18n(wgLivepreviewMessageFailed)); + lpShowNormalPreview(); + return; + } + + + /* Inject categories */ + var categoryContainer = document.getElementById( lpIdCategories ); + if ( categoryElement && categoryElement.firstChild ) { + if ( categoryContainer ) { + categoryContainer.innerHTML = categoryElement.firstChild.data; + /* May be hidden */ + categoryContainer.style.display = 'block'; + } else { + /* Just dump them somewhere */ + /* previewContainer.innerHTML += categoryElement.firstChild.data;*/ + } + } else { + /* Nothing to show, hide old data */ + if ( categoryContainer ) { + categoryContainer.style.display = 'none'; + } + } + +} + +function lpShowNormalPreview() { + var fallback = document.getElementById('wpPreview'); + if ( fallback ) { fallback.style.display = 'inline'; } +} + + +// TODO: move elsewhere +/* Small non-intrusive popup which can be used for example to notify the user + * about completed AJAX action. Supports only one notify at a time. + */ +function notify(message) { + var notifyElement = document.getElementById('mw-js-notify'); + if ( !notifyElement ) { + createNotify(); + var notifyElement = document.getElementById('mw-js-notify'); + } + notifyElement.style.display = 'block'; + notifyElement.innerHTML = message; +} + +function dismissNotify(message, timeout) { + var notifyElement = document.getElementById('mw-js-notify'); + if ( notifyElement ) { + if ( timeout == 0 ) { + notifyElement.style.display = 'none'; + } else { + notify(message); + setTimeout("dismissNotify('', 0)", timeout); + } + } +} + +function createNotify() { + var div = document.createElement("div"); + var txt = '###PLACEHOLDER###' + var txtNode = document.createTextNode(txt); + div.appendChild(txtNode); + div.id = 'mw-js-notify'; + // TODO: move styles to css + div.setAttribute('style', + 'display: none; position: fixed; bottom: 0px; right: 0px; color: white; background-color: DarkRed; z-index: 5; padding: 0.1em 1em 0.1em 1em; font-size: 120%;'); + var body = document.getElementsByTagName('body')[0]; + body.appendChild(div); +} + + + +/* Helper function similar to wfMsgReplaceArgs() */ +function i18n(message, keys) { + var localMessage = message; + if ( !keys ) { return localMessage; } + for( var i = 0; i < keys.length; i++) { + var myregexp = new RegExp("\\$"+(i+1), 'g'); + localMessage = localMessage.replace(myregexp, keys[i]); + } + return localMessage; +} \ No newline at end of file diff --git a/skins/common/protect.js b/skins/common/protect.js new file mode 100644 index 00000000..d9650c82 --- /dev/null +++ b/skins/common/protect.js @@ -0,0 +1,351 @@ + +var ProtectionForm = { + 'existingMatch': false, + + /** + * Set up the protection chaining interface (i.e. "unlock move permissions" checkbox) + * on the protection form + * + * @param Object opts : parameters with members: + * tableId Identifier of the table containing UI bits + * labelText Text to use for the checkbox label + * numTypes The number of protection types + * existingMatch True if all the existing expiry times match + */ + 'init': function( opts ) { + if( !( document.createTextNode && document.getElementById && document.getElementsByTagName ) ) + return false; + + var box = document.getElementById( opts.tableId ); + if( !box ) + return false; + + var boxbody = box.getElementsByTagName('tbody')[0] + var row = document.createElement( 'tr' ); + boxbody.insertBefore( row, boxbody.firstChild ); + + this.existingMatch = opts.existingMatch; + + var cell = document.createElement( 'td' ); + row.appendChild( cell ); + // If there is only one protection type, there is nothing to chain + if( opts.numTypes > 1 ) { + var check = document.createElement( 'input' ); + check.id = 'mwProtectUnchained'; + check.type = 'checkbox'; + cell.appendChild( check ); + addClickHandler( check, function() { ProtectionForm.onChainClick(); } ); + + cell.appendChild( document.createTextNode( ' ' ) ); + var label = document.createElement( 'label' ); + label.htmlFor = 'mwProtectUnchained'; + label.appendChild( document.createTextNode( opts.labelText ) ); + cell.appendChild( label ); + + check.checked = !this.areAllTypesMatching(); + this.enableUnchainedInputs( check.checked ); + } + + this.updateCascadeCheckbox(); + + return true; + }, + + /** + * Sets the disabled attribute on the cascade checkbox depending on the current selected levels + */ + 'updateCascadeCheckbox': function() { + // For non-existent titles, there is no cascade option + if( !document.getElementById( 'mwProtect-cascade' ) ) { + return; + } + var lists = this.getLevelSelectors(); + for( var i = 0; i < lists.length; i++ ) { + if( lists[i].selectedIndex > -1 ) { + var items = lists[i].getElementsByTagName( 'option' ); + var selected = items[ lists[i].selectedIndex ].value; + if( !this.isCascadeableLevel(selected) ) { + document.getElementById( 'mwProtect-cascade' ).checked = false; + document.getElementById( 'mwProtect-cascade' ).disabled = true; + return; + } + } + } + document.getElementById( 'mwProtect-cascade' ).disabled = false; + }, + + /** + * Is this protection level cascadeable? + * @param String level + * + * @return boolean + * + */ + 'isCascadeableLevel': function( level ) { + for (var k = 0; k < wgCascadeableLevels.length; k++) { + if ( wgCascadeableLevels[k] == level ) { + return true; + } + } + return false; + }, + + /** + * When protection levels are locked together, update the rest + * when one action's level changes + * + * @param Element source Level selector that changed + */ + 'updateLevels': function(source) { + if( !this.isUnchained() ) + this.setAllSelectors( source.selectedIndex ); + this.updateCascadeCheckbox(); + }, + + /** + * When protection levels are locked together, update the + * expiries when one changes + * + * @param Element source expiry input that changed + */ + + 'updateExpiry': function(source) { + if( !this.isUnchained() ) { + var expiry = source.value; + this.forEachExpiryInput(function(element) { + element.value = expiry; + }); + } + var listId = source.id.replace( /^mwProtect-(\w+)-expires$/, 'mwProtectExpirySelection-$1' ); + var list = document.getElementById( listId ); + if (list && list.value != 'othertime' ) { + if ( this.isUnchained() ) { + list.value = 'othertime'; + } else { + this.forEachExpirySelector(function(element) { + element.value = 'othertime'; + }); + } + } + }, + + /** + * When protection levels are locked together, update the + * expiry lists when one changes and clear the custom inputs + * + * @param Element source expiry selector that changed + */ + 'updateExpiryList': function(source) { + if( !this.isUnchained() ) { + var expiry = source.value; + this.forEachExpirySelector(function(element) { + element.value = expiry; + }); + this.forEachExpiryInput(function(element) { + element.value = ''; + }); + } + }, + + /** + * Update chain status and enable/disable various bits of the UI + * when the user changes the "unlock move permissions" checkbox + */ + 'onChainClick': function() { + if( this.isUnchained() ) { + this.enableUnchainedInputs( true ); + } else { + this.setAllSelectors( this.getMaxLevel() ); + this.enableUnchainedInputs( false ); + } + this.updateCascadeCheckbox(); + }, + + /** + * Returns true if the named attribute in all objects in the given array are matching + */ + 'matchAttribute' : function( objects, attrName ) { + var value = null; + + // Check levels + for ( var i = 0; i < objects.length; i++ ) { + var element = objects[i]; + if ( value == null ) { + value = element[attrName]; + } else { + if ( value != element[attrName] ) { + return false; + } + } + } + return true; + }, + + /** + * Are all actions protected at the same level, with the same expiry time? + * + * @return boolean + */ + 'areAllTypesMatching': function() { + return this.existingMatch + && this.matchAttribute( this.getLevelSelectors(), 'selectedIndex' ) + && this.matchAttribute( this.getExpirySelectors(), 'selectedIndex' ) + && this.matchAttribute( this.getExpiryInputs(), 'value' ); + }, + + /** + * Is protection chaining off? + * + * @return bool + */ + 'isUnchained': function() { + var element = document.getElementById( 'mwProtectUnchained' ); + return element + ? element.checked + : true; // No control, so we need to let the user set both levels + }, + + /** + * Find the highest protection level in any selector + */ + 'getMaxLevel': function() { + var maxIndex = -1; + this.forEachLevelSelector(function(element) { + if (element.selectedIndex > maxIndex) { + maxIndex = element.selectedIndex; + } + }); + return maxIndex; + }, + + /** + * Protect all actions at the specified level + * + * @param int index Protection level + */ + 'setAllSelectors': function(index) { + this.forEachLevelSelector(function(element) { + if (element.selectedIndex != index) { + element.selectedIndex = index; + } + }); + }, + + /** + * Apply a callback to each protection selector + * + * @param callable func Callback function + */ + 'forEachLevelSelector': function(func) { + var selectors = this.getLevelSelectors(); + for (var i = 0; i < selectors.length; i++) { + func(selectors[i]); + } + }, + + /** + * Get a list of all protection selectors on the page + * + * @return Array + */ + 'getLevelSelectors': function() { + var all = document.getElementsByTagName("select"); + var ours = new Array(); + for (var i = 0; i < all.length; i++) { + var element = all[i]; + if (element.id.match(/^mwProtect-level-/)) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Apply a callback to each expiry input + * + * @param callable func Callback function + */ + 'forEachExpiryInput': function(func) { + var inputs = this.getExpiryInputs(); + for (var i = 0; i < inputs.length; i++) { + func(inputs[i]); + } + }, + + /** + * Get a list of all expiry inputs on the page + * + * @return Array + */ + 'getExpiryInputs': function() { + var all = document.getElementsByTagName("input"); + var ours = new Array(); + for (var i = 0; i < all.length; i++) { + var element = all[i]; + if (element.name.match(/^mwProtect-expiry-/)) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Apply a callback to each expiry selector list + * @param callable func Callback function + */ + 'forEachExpirySelector': function(func) { + var inputs = this.getExpirySelectors(); + for (var i = 0; i < inputs.length; i++) { + func(inputs[i]); + } + }, + + /** + * Get a list of all expiry selector lists on the page + * + * @return Array + */ + 'getExpirySelectors': function() { + var all = document.getElementsByTagName("select"); + var ours = new Array(); + for (var i = 0; i < all.length; i++) { + var element = all[i]; + if (element.id.match(/^mwProtectExpirySelection-/)) { + ours[ours.length] = element; + } + } + return ours; + }, + + /** + * Enable/disable protection selectors and expiry inputs + * + * @param boolean val Enable? + */ + 'enableUnchainedInputs': function(val) { + var first = true; + this.forEachLevelSelector(function(element) { + if (first) { + first = false; + } else { + element.disabled = !val; + } + }); + first = true; + this.forEachExpiryInput(function(element) { + if (first) { + first = false; + } else { + element.disabled = !val; + } + }); + first = true; + this.forEachExpirySelector(function(element) { + if (first) { + first = false; + } else { + element.disabled = !val; + } + }); + } +} diff --git a/skins/common/quickbar-right.css b/skins/common/quickbar-right.css new file mode 100644 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/rightclickedit.js b/skins/common/rightclickedit.js new file mode 100644 index 00000000..83d552a2 --- /dev/null +++ b/skins/common/rightclickedit.js @@ -0,0 +1,48 @@ +function setupRightClickEdit() { + if (document.getElementsByTagName) { + var spans = document.getElementsByTagName('span'); + for (var i = 0; i < spans.length; i++) { + var el = spans[i]; + if(el.className == 'editsection') { + addRightClickEditHandler(el); + } + } + } +} + +function addRightClickEditHandler(el) { + for (var i = 0; i < el.childNodes.length; i++) { + var link = el.childNodes[i]; + if (link.nodeType == 1 && link.nodeName.toLowerCase() == 'a') { + var editHref = link.getAttribute('href'); + // find the enclosing (parent) header + var prev = el.parentNode; + if (prev && prev.nodeType == 1 && + prev.nodeName.match(/^[Hh][1-6]$/)) { + prev.oncontextmenu = function(e) { + if (!e) { e = window.event; } + // e is now the event in all browsers + var targ; + if (e.target) { targ = e.target; } + else if (e.srcElement) { targ = e.srcElement; } + if (targ.nodeType == 3) { // defeat Safari bug + targ = targ.parentNode; + } + // targ is now the target element + + // We don't want to deprive the noble reader of a context menu + // for the section edit link, do we? (Might want to extend this + // to all 's?) + if (targ.nodeName.toLowerCase() != 'a' + || targ.parentNode.className != 'editsection') { + document.location = editHref; + return false; + } + return true; + }; + } + } + } +} + +hookEvent("load", setupRightClickEdit); diff --git a/skins/common/shared.css b/skins/common/shared.css new file mode 100644 index 00000000..bd306167 --- /dev/null +++ b/skins/common/shared.css @@ -0,0 +1,313 @@ +/** + * CSS in this file is used by *all* skins (that have any CSS at all). Be + * careful what you put in here, since what looks good in one skin may not in + * another, but don't ignore the poor non-Monobook users either. + */ +.mw-plusminus-null { color: #aaa; } + +.texvc { direction: ltr; unicode-bidi: embed; } +img.tex { vertical-align: middle; } +span.texhtml { font-family: serif; } + +/* add a bit of margin space between the preview and the toolbar */ +/* this replaces the ugly


we used to insert into the page source */ +#wikiPreview.ontop { margin-bottom: 1em; } + +/* Stop floats from intruding into edit area in previews */ +#toolbar, #wpTextbox1 { clear: both; } + +div#mw-js-message { + margin: 1em 5%; + padding: 0.5em 2.5%; + border: solid 1px #ddd; + background-color: #fcfcfc; +} + +/* Edit section links */ +.editsection { + float: right; + margin-left: 5px; +} + +/** + * File histories + */ +table.filehistory { + border:1px solid #ccc; + border-collapse:collapse; +} + +table.filehistory th, +table.filehistory td { + padding: 0 0.2em 0 0.2em; + vertical-align:top; + border:1px solid #ccc; +} +table.filehistory th { + text-align: left; +} +table.filehistory td.mw-imagepage-filesize, +table.filehistory th.mw-imagepage-filesize { + white-space:nowrap; +} + +table.filehistory td.filehistory-selected { + font-weight: bold; +} + +/* + * rev_deleted stuff + */ +li span.deleted, span.history-deleted { + text-decoration: line-through; + color: #888; + font-style: italic; +} + +/** + * Forms + */ +body.ltr td.mw-label { text-align: right; } +body.ltr td.mw-input { text-align: left; } +body.ltr td.mw-submit { text-align: left; } +body.rtl td.mw-label { text-align: left; } +body.rtl td.mw-input { text-align: right; } +body.rtl td.mw-submit { text-align: right; } + +td.mw-label { vertical-align: top; } +td.mw-submit { white-space: nowrap; } + +/** + * Image captions + */ +body.rtl .thumbcaption { text-align:right; } +body.rtl .magnify { float:left; } + +body.ltr .thumbcaption { text-align:left; } +body.ltr .magnify { float:right; } + +/** + * Hidden categories + */ +.mw-hidden-cats-hidden { display: none; } +.catlinks-allhidden { display: none; } + +/* Convenience links to edit block, delete and protect reasons */ +p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, +p.mw-filedelete-editreasons, p.mw-delete-editreasons { + font-size: 90%; + float: right; +} + +/* Search results */ +div.searchresult { + font-size: 95%; + width:38em; +} +.mw-search-results li { + padding-bottom: 1em; + list-style:none; +} +.mw-search-result-data { + color: green; + font-size: 97%; +} + +td#mw-search-menu { + padding-left:6em; + font-size:85%; +} + +div#mw-search-interwiki { + float: right; + width: 18em; + border-style: solid; + border-color: #AAAAAA; + border-width: 1px; + margin-top: 2ex; +} + +div#mw-search-interwiki li { + font-size: 95%; +} + +.mw-search-interwiki-more { + float: right; + font-size: 90%; +} + +span.searchalttitle { + font-size: 95%; +} + +div.searchdidyoumean { + font-size: 127%; + margin-bottom: 1ex; + margin-top: 1ex; + /* Note that this color won't affect the link, as desired. */ + color: #c00; +} + +div.searchdidyoumean em { + font-weight: bold; +} + +.searchmatch { + font-weight: bold; +} + +div.searchresults { + border:1px solid darkblue; + padding-top: 10px; + padding-bottom: 10px; + padding-left: 20px; + padding-right: 20px; +} + +/* + * UserRights stuff + */ +.mw-userrights-disabled { + color: #888; +} + +table.mw-userrights-groups * td,table.mw-userrights-groups * th { + padding-right: 1.5em; +} + +/* + * OpenSearch ajax suggestions + */ +.os-suggest { + overflow: auto; + overflow-x: hidden; + position: absolute; + top: 0px; + left: 0px; + width: 0px; + background-color: white; + background-color: Window; + border-style: solid; + border-color: #AAAAAA; + border-width: 1px; + z-index:99; + visibility:hidden; + font-size:95%; +} + +table.os-suggest-results { + font-size: 95%; + cursor: pointer; + border: 0; + border-collapse: collapse; + width: 100%; +} + +td.os-suggest-result, td.os-suggest-result-hl { + white-space: nowrap; + background-color: white; + background-color: Window; + color: black; + color: WindowText; + padding: 2px; +} +td.os-suggest-result-hl, +td.os-suggest-result-hl-webkit { + background-color: #4C59A6; + color: white; +} +td.os-suggest-result-hl { + /* System colors are misimplemented in Safari 3.0 and earlier, + making highlighted text illegible... */ + background-color: Highlight; + color: HighlightText; +} + +.os-suggest-toggle { + position: relative; + left: 1ex; + font-size: 65%; +} +.os-suggest-toggle-def { + position: absolute; + top: 0px; + left: 0px; + font-size: 65%; + visibility: hidden; +} + +/* Page history styling */ +/* the auto-generated edit comments */ +.autocomment { color: gray; } +#pagehistory .history-user { + margin-left: 0.4em; + margin-right: 0.2em; +} +#pagehistory span.minor { font-weight: bold; } +#pagehistory li { border: 1px solid white; } +#pagehistory li.selected { + background-color: #f9f9f9; + border: 1px dashed #aaa; +} + +/* + * Special:ListGroupRights styling + * Special:Statistics styling +*/ + +table.mw-listgrouprights-table, +table.mw-statistics-table { + border: 1px solid #ccc; + border-collapse: collapse; +} + +table.mw-listgrouprights-table tr { + vertical-align: top; +} + +table.mw-listgrouprights-table td, table.mw-listgrouprights-table th, +table.mw-statistics-table td, table.mw-statistics-table th { + padding: 0.5em 0.2em 0.5em 0.2em; + border: 1px solid #ccc; +} + +td.mw-statistics-numbers { + text-align: right; +} + +/* Special:SpecialPages styling */ +h4.mw-specialpagesgroup { + background-color: #dcdcdc; + padding: 2px; + margin: .3em 0em 0em 0em; +} +.mw-specialpagerestricted { + font-weight: bold; +} + +#shared-image-dup, #shared-image-conflict { + font-style: italic; +} + +/* Special:EmailUser styling */ +table.mw-emailuser-table { + width: 98%; +} +td#mw-emailuser-sender, td#mw-emailuser-recipient { + font-weight: bold; +} + +/* + * Recreating deleted page warning + * Reupload file warning + * Page protection warning + * incl. log entries for these warnings + */ +div.mw-warning-with-logexcerpt { + padding: 3px; + margin-bottom: 3px; + border: 2px solid #2F6FAB; +} +div.mw-warning-with-logexcerpt ul li { + font-size: 90%; +} diff --git a/skins/common/sticky.js b/skins/common/sticky.js new file mode 100644 index 00000000..a4904c03 --- /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"; + } diff --git a/skins/common/upload.js b/skins/common/upload.js new file mode 100644 index 00000000..d1cf4b3e --- /dev/null +++ b/skins/common/upload.js @@ -0,0 +1,190 @@ +function licenseSelectorCheck() { + var selector = document.getElementById( "wpLicense" ); + var selection = selector.options[selector.selectedIndex].value; + if( selector.selectedIndex > 0 ) { + if( selection == "" ) { + // Option disabled, but browser is broken and doesn't respect this + selector.selectedIndex = 0; + } + } + // We might show a preview + wgUploadLicenseObj.fetchPreview( selection ); +} + +function licenseSelectorFixup() { + // for MSIE/Mac; non-breaking spaces cause the
' + + '' + + '↓'; + } + } + if (ts_alternate_row_colors) { + ts_alternate(table); + } +} + +function ts_getInnerText(el) { + return getInnerText( el ); +} + +function ts_resortTable(lnk) { + // get the span + var span = lnk.getElementsByTagName('span')[0]; + + var td = lnk.parentNode; + var tr = td.parentNode; + var column = td.cellIndex; + + var table = tr.parentNode; + while (table && !(table.tagName && table.tagName.toLowerCase() == 'table')) + table = table.parentNode; + if (!table) return; + + if (table.rows.length <= 1) return; + + // Generate the number transform table if it's not done already + if (ts_number_transform_table == null) { + ts_initTransformTable(); + } + + // Work out a type for the column + // Skip the first row if that's where the headings are + var rowStart = (table.tHead && table.tHead.rows.length > 0 ? 0 : 1); + + var itm = ""; + for (var i = rowStart; i < table.rows.length; i++) { + if (table.rows[i].cells.length > column) { + itm = ts_getInnerText(table.rows[i].cells[column]); + itm = itm.replace(/^[\s\xa0]+/, "").replace(/[\s\xa0]+$/, ""); + if (itm != "") break; + } + } + + // TODO: bug 8226, localised date formats + var sortfn = ts_sort_generic; + var preprocessor = ts_toLowerCase; + if (/^\d\d[\/. -][a-zA-Z]{3}[\/. -]\d\d\d\d$/.test(itm)) { + preprocessor = ts_dateToSortKey; + } else if (/^\d\d[\/.-]\d\d[\/.-]\d\d\d\d$/.test(itm)) { + preprocessor = ts_dateToSortKey; + } else if (/^\d\d[\/.-]\d\d[\/.-]\d\d$/.test(itm)) { + preprocessor = ts_dateToSortKey; + // pound dollar euro yen currency cents + } else if (/(^[\u00a3$\u20ac\u00a4\u00a5]|\u00a2$)/.test(itm)) { + preprocessor = ts_currencyToSortKey; + } else if (ts_number_regex.test(itm)) { + preprocessor = ts_parseFloat; + } + + var reverse = (span.getAttribute("sortdir") == 'down'); + + var newRows = new Array(); + var staticRows = new Array(); + for (var j = rowStart; j < table.rows.length; j++) { + var row = table.rows[j]; + if((" "+row.className+" ").indexOf(" unsortable ") < 0) { + var keyText = ts_getInnerText(row.cells[column]); + var oldIndex = (reverse ? -j : j); + var preprocessed = preprocessor( keyText ); + + newRows[newRows.length] = new Array(row, preprocessed, oldIndex); + } else staticRows[staticRows.length] = new Array(row, false, j-rowStart); + } + + newRows.sort(sortfn); + + var arrowHTML; + if (reverse) { + arrowHTML = '↓'; + newRows.reverse(); + span.setAttribute('sortdir','up'); + } else { + arrowHTML = '↑'; + span.setAttribute('sortdir','down'); + } + + for (var i = 0; i < staticRows.length; i++) { + var row = staticRows[i]; + newRows.splice(row[2], 0, row); + } + + // We appendChild rows that already exist to the tbody, so it moves them rather than creating new ones + // don't do sortbottom rows + for (var i = 0; i < newRows.length; i++) { + if ((" "+newRows[i][0].className+" ").indexOf(" sortbottom ") == -1) + table.tBodies[0].appendChild(newRows[i][0]); + } + // do sortbottom rows only + for (var i = 0; i < newRows.length; i++) { + if ((" "+newRows[i][0].className+" ").indexOf(" sortbottom ") != -1) + table.tBodies[0].appendChild(newRows[i][0]); + } + + // Delete any other arrows there may be showing + var spans = getElementsByClassName(tr, "span", "sortarrow"); + for (var i = 0; i < spans.length; i++) { + spans[i].innerHTML = '↓'; + } + span.innerHTML = arrowHTML; + + if (ts_alternate_row_colors) { + ts_alternate(table); + } +} + +function ts_initTransformTable() { + if ( typeof wgSeparatorTransformTable == "undefined" + || ( wgSeparatorTransformTable[0] == '' && wgDigitTransformTable[2] == '' ) ) + { + digitClass = "[0-9,.]"; + ts_number_transform_table = false; + } else { + ts_number_transform_table = {}; + // Unpack the transform table + // Separators + ascii = wgSeparatorTransformTable[0].split("\t"); + localised = wgSeparatorTransformTable[1].split("\t"); + for ( var i = 0; i < ascii.length; i++ ) { + ts_number_transform_table[localised[i]] = ascii[i]; + } + // Digits + ascii = wgDigitTransformTable[0].split("\t"); + localised = wgDigitTransformTable[1].split("\t"); + for ( var i = 0; i < ascii.length; i++ ) { + ts_number_transform_table[localised[i]] = ascii[i]; + } + + // Construct regex for number identification + digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ',', '\\.']; + maxDigitLength = 1; + for ( var digit in ts_number_transform_table ) { + // Escape regex metacharacters + digits.push( + digit.replace( /[\\\\$\*\+\?\.\(\)\|\{\}\[\]\-]/, + function( s ) { return '\\' + s; } ) + ); + if (digit.length > maxDigitLength) { + maxDigitLength = digit.length; + } + } + if ( maxDigitLength > 1 ) { + digitClass = '[' + digits.join( '', digits ) + ']'; + } else { + digitClass = '(' + digits.join( '|', digits ) + ')'; + } + } + + // We allow a trailing percent sign, which we just strip. This works fine + // if percents and regular numbers aren't being mixed. + ts_number_regex = new RegExp( + "^(" + + "[+-]?[0-9][0-9,]*(\\.[0-9,]*)?(E[+-]?[0-9][0-9,]*)?" + // Fortran-style scientific + "|" + + "[+-]?" + digitClass + "+%?" + // Generic localised + ")$", "i" + ); +} + +function ts_toLowerCase( s ) { + return s.toLowerCase(); +} + +function ts_dateToSortKey(date) { + // y2k notes: two digit years less than 50 are treated as 20XX, greater than 50 are treated as 19XX + if (date.length == 11) { + switch (date.substr(3,3).toLowerCase()) { + case "jan": var month = "01"; break; + case "feb": var month = "02"; break; + case "mar": var month = "03"; break; + case "apr": var month = "04"; break; + case "may": var month = "05"; break; + case "jun": var month = "06"; break; + case "jul": var month = "07"; break; + case "aug": var month = "08"; break; + case "sep": var month = "09"; break; + case "oct": var month = "10"; break; + case "nov": var month = "11"; break; + case "dec": var month = "12"; break; + // default: var month = "00"; + } + return date.substr(7,4)+month+date.substr(0,2); + } else if (date.length == 10) { + if (ts_europeandate == false) { + return date.substr(6,4)+date.substr(0,2)+date.substr(3,2); + } else { + return date.substr(6,4)+date.substr(3,2)+date.substr(0,2); + } + } else if (date.length == 8) { + yr = date.substr(6,2); + if (parseInt(yr) < 50) { + yr = '20'+yr; + } else { + yr = '19'+yr; + } + if (ts_europeandate == true) { + return yr+date.substr(3,2)+date.substr(0,2); + } else { + return yr+date.substr(0,2)+date.substr(3,2); + } + } + return "00000000"; +} + +function ts_parseFloat( s ) { + if ( !s ) { + return 0; + } + if (ts_number_transform_table != false) { + var newNum = '', c; + + for ( var p = 0; p < s.length; p++ ) { + c = s.charAt( p ); + if (c in ts_number_transform_table) { + newNum += ts_number_transform_table[c]; + } else { + newNum += c; + } + } + s = newNum; + } + + num = parseFloat(s.replace(/,/g, "")); + return (isNaN(num) ? s : num); +} + +function ts_currencyToSortKey( s ) { + return ts_parseFloat(s.replace(/[^0-9.,]/g,'')); +} + +function ts_sort_generic(a, b) { + return a[1] < b[1] ? -1 : a[1] > b[1] ? 1 : a[2] - b[2]; +} + +function ts_alternate(table) { + // Take object table and get all it's tbodies. + var tableBodies = table.getElementsByTagName("tbody"); + // Loop through these tbodies + for (var i = 0; i < tableBodies.length; i++) { + // Take the tbody, and get all it's rows + var tableRows = tableBodies[i].getElementsByTagName("tr"); + // Loop through these rows + // Start at 1 because we want to leave the heading row untouched + for (var j = 0; j < tableRows.length; j++) { + // Check if j is even, and apply classes for both possible results + var oldClasses = tableRows[j].className.split(" "); + var newClassName = ""; + for (var k = 0; k < oldClasses.length; k++) { + if (oldClasses[k] != "" && oldClasses[k] != "even" && oldClasses[k] != "odd") + newClassName += oldClasses[k] + " "; + } + tableRows[j].className = newClassName + (j % 2 == 0 ? "even" : "odd"); + } + } +} + +/* + * End of table sorting code + */ + + +/** + * Add a cute little box at the top of the screen to inform the user of + * something, replacing any preexisting message. + * + * @param String -or- Dom Object message HTML to be put inside the right div + * @param String className Used in adding a class; should be different for each + * call to allow CSS/JS to hide different boxes. null = no class used. + * @return Boolean True on success, false on failure + */ +function jsMsg( message, className ) { + if ( !document.getElementById ) { + return false; + } + // We special-case skin structures provided by the software. Skins that + // choose to abandon or significantly modify our formatting can just define + // an mw-js-message div to start with. + var messageDiv = document.getElementById( 'mw-js-message' ); + if ( !messageDiv ) { + messageDiv = document.createElement( 'div' ); + if ( document.getElementById( 'column-content' ) + && document.getElementById( 'content' ) ) { + // MonoBook, presumably + document.getElementById( 'content' ).insertBefore( + messageDiv, + document.getElementById( 'content' ).firstChild + ); + } else if ( document.getElementById('content') + && document.getElementById( 'article' ) ) { + // Non-Monobook but still recognizable (old-style) + document.getElementById( 'article').insertBefore( + messageDiv, + document.getElementById( 'article' ).firstChild + ); + } else { + return false; + } + } + + messageDiv.setAttribute( 'id', 'mw-js-message' ); + messageDiv.style.display = 'block'; + if( className ) { + messageDiv.setAttribute( 'class', 'mw-js-message-'+className ); + } + + if (typeof message === 'object') { + while (messageDiv.hasChildNodes()) // Remove old content + messageDiv.removeChild(messageDiv.firstChild); + messageDiv.appendChild (message); // Append new content + } + else { + messageDiv.innerHTML = message; + } + return true; +} + +/** + * Inject a cute little progress spinner after the specified element + * + * @param element Element to inject after + * @param id Identifier string (for use with removeSpinner(), below) + */ +function injectSpinner( element, id ) { + var spinner = document.createElement( "img" ); + spinner.id = "mw-spinner-" + id; + spinner.src = stylepath + "/common/images/spinner.gif"; + spinner.alt = spinner.title = "..."; + if( element.nextSibling ) { + element.parentNode.insertBefore( spinner, element.nextSibling ); + } else { + element.parentNode.appendChild( spinner ); + } +} + +/** + * Remove a progress spinner added with injectSpinner() + * + * @param id Identifier string + */ +function removeSpinner( id ) { + var spinner = document.getElementById( "mw-spinner-" + id ); + if( spinner ) { + spinner.parentNode.removeChild( spinner ); + } +} + +function runOnloadHook() { + // don't run anything below this for non-dom browsers + if (doneOnloadHook || !(document.getElementById && document.getElementsByTagName)) { + return; + } + + // set this before running any hooks, since any errors below + // might cause the function to terminate prematurely + doneOnloadHook = true; + + updateTooltipAccessKeys( null ); + akeytt( null ); + setupCheckboxShiftClick(); + sortables_init(); + + // Run any added-on functions + for (var i = 0; i < onloadFuncts.length; i++) { + onloadFuncts[i](); + } +} + +/** + * Add an event handler to an element + * + * @param Element element Element to add handler to + * @param String attach Event to attach to + * @param callable handler Event handler callback + */ +function addHandler( element, attach, handler ) { + if( window.addEventListener ) { + element.addEventListener( attach, handler, false ); + } else if( window.attachEvent ) { + element.attachEvent( 'on' + attach, handler ); + } +} + +/** + * Add a click event handler to an element + * + * @param Element element Element to add handler to + * @param callable handler Event handler callback + */ +function addClickHandler( element, handler ) { + addHandler( element, 'click', handler ); +} + +/** + * Removes an event handler from an element + * + * @param Element element Element to remove handler from + * @param String remove Event to remove + * @param callable handler Event handler callback to remove + */ +function removeHandler( element, remove, handler ) { + if( window.removeEventListener ) { + element.removeEventListener( remove, handler, false ); + } else if( window.detachEvent ) { + element.detachEvent( 'on' + remove, handler ); + } +} +//note: all skins should call runOnloadHook() at the end of html output, +// so the below should be redundant. It's there just in case. +hookEvent("load", runOnloadHook); diff --git a/skins/common/wikiprintable.css b/skins/common/wikiprintable.css new file mode 100644 index 00000000..8b099bb2 --- /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, #logo, #footer, #siteNotice, +.editsection, .toctoggle { + display: none; +} + +/* */ +#article { + position: relative; + margin: inherit ! important; +} + +.printfooter { + border-top: solid 1px black; + display: block ! important; +} + +/* Old stuff, fixme: +a.CBlink { color: #0000AA; text-decoration: none; font-size: 12pt; } +a.interwiki, a.external { color: #3333BB; text-decoration: none; } +h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } +i.link, u.link { color: #000066; } +p.subtitle { padding-top: 0; margin-top: 0; } +*/ diff --git a/skins/common/wikistandard.css b/skins/common/wikistandard.css new file mode 100644 index 00000000..5bf59246 --- /dev/null +++ b/skins/common/wikistandard.css @@ -0,0 +1,48 @@ +#article { padding: 4px; } +#content { margin: 0; padding: 0; } +#footer { padding: 4px;font-size:95%;clear: both; } +#pagestats { font-size: 9pt; } +#powersearch { + background: #DDEEFF; border-style: solid; border-width: 1px; padding: 2px; +} +#quickbar { width: 140px; height:100%; padding: 4px; visibility: visible; z-index:99;font-size:95%;} +#topbar { padding: 4px;font-size:95%; } + + +/* Table of contents */ +.toctoggle, .editsection { font-size: smaller; } + +/* ... */ +#toolbar { padding:0px; } +#infobox { background:#eeeeff;color:black;} +#editform { margin-top:1px; } +a.interwiki, a.external { color: #3366BB; } +a.printable { text-decoration: underline; } +a.stub { color:#772233; text-decoration:none; } +a:visited { color: #5A3696; } +body { margin: 0px; padding: 4px; color: black; } +form.inline { display: inline; } +textarea { overflow: auto; } + + +h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; +font-size:150%; } +h1.pagetitle .editsection { font-size: 66.7%; } +h2 { font-size: 120%; } +h2 .editsection { font-size: 83.3%; } +h2, h3, h4, h5, h6 { margin-bottom: 0;} +h3 { font-size: 106.25%; } +h3 .editsection { font-size: 94.1%; } +h4 { font-size: 103.125%; } +h4 .editsection { font-size: 97.0%; } +h5 { font-size: 100%; } +h5 .editsection { font-size: 100%; } +h6 { font-size: 95%; } +h6 .editsection { font-size: 105.3%; } +hr.sep { color:gray;height:1px;background-color:gray;} +p.subpages { font-size:small;} +p.subtitle { padding-top: 0; margin-top: 0;} +.catlinks { font-size:small; margin-top:0; text-align:right;} +td { empty-cells:show; } +td.bottom { border-top: 1px solid gray; } +td.top { border-bottom: 1px solid gray; } diff --git a/skins/disabled/MonoBook.tpl b/skins/disabled/MonoBook.tpl new file mode 100644 index 00000000..58bc4f5c --- /dev/null +++ b/skins/disabled/MonoBook.tpl @@ -0,0 +1,200 @@ + + + + + {headlinks} + {headscripts} + {pagetitle} + + + + + + + + + + {if jsvarurl {}} + {if pagecss {}} + {usercss} + {sitecss} + {gencss} + {if userjs {}} + {if userjsprev {}} + {trackbackhtml} + + +
+
+
+ + {if sitenotice {
{sitenotice}
}} +

{title}

+
+

{msg {tagline}}

+
{subtitle}
+ {if undelete {
{undelete}
}} + {if newtalk {
{newtalk}
}} + {if showjumplinks { + + }} + + {bodytext} + {if catlinks { }} + +
+
+
+
+
+
+
{msg {views}}
+ +
+
+
{msg {personaltools}}
+
+
    + {personal_urls {
  • $text
  • }} +
+
+
+ + + {sidebar { +
+
$barname
+
+
    + } { +
+
+
+ } {
  • $text
  • + } + } + + +
    +
    {msg {toolbox}}
    +
    + +
    +
    + {language_urls { +
    +
    {msg {otherlanguages}}
    +
    +
      + $body +
    +
    +
    + } { +
  • $text
  • + }} +
    +
    + + +
    +{reporttime} +{if {} { vim: set syn=html ts=2 : }} + diff --git a/skins/disabled/MonoBookCBT.php b/skins/disabled/MonoBookCBT.php new file mode 100644 index 00000000..0d693a86 --- /dev/null +++ b/skins/disabled/MonoBookCBT.php @@ -0,0 +1,1389 @@ +execute( $out ); + } + + function execute( &$out ) { + global $wgTitle, $wgStyleDirectory, $wgParserCacheType; + $fname = 'SkinMonoBookCBT::execute'; + wfProfileIn( $fname ); + wfProfileIn( "$fname-setup" ); + Skin::initPage( $out ); + + $this->mOut =& $out; + $this->mTitle =& $wgTitle; + + $sourceFile = "$wgStyleDirectory/MonoBook.tpl"; + + wfProfileOut( "$fname-setup" ); + + if ( $wgParserCacheType == CACHE_NONE ) { + $template = file_get_contents( $sourceFile ); + $text = $this->executeTemplate( $template ); + } else { + $compiled = $this->getCompiledTemplate( $sourceFile ); + + wfProfileIn( "$fname-eval" ); + $text = eval( $compiled ); + wfProfileOut( "$fname-eval" ); + } + wfProfileOut( $fname ); + return $text; + } + + function getCompiledTemplate( $sourceFile ) { + global $wgDBname, $wgMemc, $wgRequest, $wgUser, $parserMemc; + $fname = 'SkinMonoBookCBT::getCompiledTemplate'; + + $expiry = 3600; + + // Sandbox template execution + if ( $this->mCompiling ) { + return; + } + + wfProfileIn( $fname ); + + // Is the request an ordinary page view? + if ( $wgRequest->wasPosted() || + count( array_diff( array_keys( $_GET ), array( 'title', 'useskin', 'recompile' ) ) ) != 0 ) + { + $type = 'nonview'; + } else { + $type = 'view'; + } + + // Per-user compiled template + // Put all logged-out users on the same cache key + $cacheKey = "$wgDBname:monobookcbt:$type:" . $wgUser->getId(); + + $recompile = $wgRequest->getVal( 'recompile' ); + if ( $recompile == 'user' ) { + $recompileUser = true; + $recompileGeneric = false; + } elseif ( $recompile ) { + $recompileUser = true; + $recompileGeneric = true; + } else { + $recompileUser = false; + $recompileGeneric = false; + } + + if ( !$recompileUser ) { + $php = $parserMemc->get( $cacheKey ); + } + if ( $recompileUser || !$php ) { + if ( $wgUser->isLoggedIn() ) { + // Perform staged compilation + // First compile a generic template for all logged-in users + $genericKey = "$wgDBname:monobookcbt:$type:loggedin"; + if ( !$recompileGeneric ) { + $template = $parserMemc->get( $genericKey ); + } + if ( $recompileGeneric || !$template ) { + $template = file_get_contents( $sourceFile ); + $ignore = array( 'loggedin', '!loggedin dynamic' ); + if ( $type == 'view' ) { + $ignore[] = 'nonview dynamic'; + } + $template = $this->compileTemplate( $template, $ignore ); + $parserMemc->set( $genericKey, $template, $expiry ); + } + } else { + $template = file_get_contents( $sourceFile ); + } + + $ignore = array( 'lang', 'loggedin', 'user' ); + if ( $wgUser->isLoggedIn() ) { + $ignore[] = '!loggedin dynamic'; + } else { + $ignore[] = 'loggedin dynamic'; + } + if ( $type == 'view' ) { + $ignore[] = 'nonview dynamic'; + } + $compiled = $this->compileTemplate( $template, $ignore ); + + // Reduce whitespace + // This is done here instead of in CBTProcessor because we can be + // more sure it is safe here. + $compiled = preg_replace( '/^[ \t]+/m', '', $compiled ); + $compiled = preg_replace( '/[\r\n]+/', "\n", $compiled ); + + // Compile to PHP + $compiler = new CBTCompiler( $compiled ); + $ret = $compiler->compile(); + if ( $ret !== true ) { + echo $ret; + wfErrorExit(); + } + $php = $compiler->generatePHP( '$this' ); + + $parserMemc->set( $cacheKey, $php, $expiry ); + } + wfProfileOut( $fname ); + return $php; + } + + function compileTemplate( $template, $ignore ) { + $tp = new CBTProcessor( $template, $this, $ignore ); + $tp->mFunctionCache = $this->mFunctionCache; + + $this->mCompiling = true; + $compiled = $tp->compile(); + $this->mCompiling = false; + + if ( $tp->getLastError() ) { + // If there was a compile error, don't save the template + // Instead just print the error and exit + echo $compiled; + wfErrorExit(); + } + $this->mFunctionCache = $tp->mFunctionCache; + return $compiled; + } + + function executeTemplate( $template ) { + $fname = 'SkinMonoBookCBT::executeTemplate'; + wfProfileIn( $fname ); + $tp = new CBTProcessor( $template, $this ); + $tp->mFunctionCache = $this->mFunctionCache; + + $this->mCompiling = true; + $text = $tp->execute(); + $this->mCompiling = false; + + $this->mFunctionCache = $tp->mFunctionCache; + wfProfileOut( $fname ); + return $text; + } + + /****************************************************** + * Callbacks * + ******************************************************/ + + function lang() { return $GLOBALS['wgContLanguageCode']; } + + function dir() { + global $wgContLang; + return $wgContLang->isRTL() ? 'rtl' : 'ltr'; + } + + function mimetype() { return $GLOBALS['wgMimeType']; } + function charset() { return $GLOBALS['wgOutputEncoding']; } + function headlinks() { + return cbt_value( $this->mOut->getHeadLinks(), 'dynamic' ); + } + function headscripts() { + return cbt_value( $this->mOut->getScript(), 'dynamic' ); + } + + function pagetitle() { + return cbt_value( $this->mOut->getHTMLTitle(), array( 'title', 'lang' ) ); + } + + function stylepath() { return $GLOBALS['wgStylePath']; } + function stylename() { return $this->mStyleName; } + + function notprintable() { + global $wgRequest; + return cbt_value( !$wgRequest->getBool( 'printable' ), 'nonview dynamic' ); + } + + function jsmimetype() { return $GLOBALS['wgJsMimeType']; } + + function jsvarurl() { + global $wgUseSiteJs, $wgUser; + if ( !$wgUseSiteJs ) return ''; + + if ( $wgUser->isLoggedIn() ) { + $url = self::makeUrl( '-','action=raw&smaxage=0&gen=js' ); + } else { + $url = self::makeUrl( '-','action=raw&gen=js' ); + } + return cbt_value( $url, 'loggedin' ); + } + + function pagecss() { + global $wgHooks; + + $out = false; + wfRunHooks( 'SkinTemplateSetupPageCss', array( &$out ) ); + + // Unknown dependencies + return cbt_value( $out, 'dynamic' ); + } + + function usercss() { + if ( $this->isCssPreview() ) { + global $wgRequest; + $usercss = $this->makeStylesheetCdata( $wgRequest->getText('wpTextbox1') ); + } else { + $usercss = $this->makeStylesheetLink( self::makeUrl($this->getUserPageText() . + '/'.$this->mStyleName.'.css', 'action=raw&ctype=text/css' ) ); + } + + // Dynamic when not an ordinary page view, also depends on the username + return cbt_value( $usercss, array( 'nonview dynamic', 'user' ) ); + } + + function sitecss() { + global $wgUseSiteCss; + if ( !$wgUseSiteCss ) { + return ''; + } + + global $wgSquidMaxage, $wgContLang, $wgStylePath; + + $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage"; + + $sitecss = ''; + if ( $wgContLang->isRTL() ) { + $sitecss .= $this->makeStylesheetLink( $wgStylePath . '/' . $this->mStyleName . '/rtl.css' ) . "\n"; + } + + $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) ) . "\n"; + $sitecss .= $this->makeStylesheetLink( self::makeNSUrl( ucfirst( $this->mStyleName ) . '.css', $query, NS_MEDIAWIKI ) ) . "\n"; + + // No deps + return $sitecss; + } + + function gencss() { + global $wgUseSiteCss; + if ( !$wgUseSiteCss ) return ''; + + global $wgSquidMaxage, $wgUser, $wgAllowUserCss; + if ( $this->isCssPreview() ) { + $siteargs = '&smaxage=0&maxage=0'; + } else { + $siteargs = '&maxage=' . $wgSquidMaxage; + } + if ( $wgAllowUserCss && $wgUser->isLoggedIn() ) { + $siteargs .= '&ts={user_touched}'; + $isTemplate = true; + } else { + $isTemplate = false; + } + + $link = $this->makeStylesheetLink( self::makeUrl('-','action=raw&gen=css' . $siteargs) ) . "\n"; + + if ( $wgAllowUserCss ) { + $deps = 'loggedin'; + } else { + $deps = array(); + } + return cbt_value( $link, $deps, $isTemplate ); + } + + function user_touched() { + global $wgUser; + return cbt_value( $wgUser->mTouched, 'dynamic' ); + } + + function userjs() { + global $wgAllowUserJs, $wgJsMimeType; + if ( !$wgAllowUserJs ) return ''; + + if ( $this->isJsPreview() ) { + $url = ''; + } else { + $url = self::makeUrl($this->getUserPageText().'/'.$this->mStyleName.'.js', 'action=raw&ctype='.$wgJsMimeType.'&dontcountme=s'); + } + return cbt_value( $url, array( 'nonview dynamic', 'user' ) ); + } + + function userjsprev() { + global $wgAllowUserJs, $wgRequest; + if ( !$wgAllowUserJs ) return ''; + if ( $this->isJsPreview() ) { + $js = '/*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 = ''.$subpagestr.''.$this->mOut->getSubtitle(); + } else { + $s = $this->mOut->getSubtitle(); + } + return cbt_value( $s, array( 'title', 'nonview dynamic' ) ); + } + + function undelete() { + return cbt_value( $this->getUndeleteLink(), array( 'title', 'lang' ) ); + } + + function newtalk() { + global $wgUser, $wgDBname; + $newtalks = $wgUser->getNewMessageLinks(); + + if (count($newtalks) == 1 && $newtalks[0]["wiki"] === $wgDBname) { + $usertitle = $this->getUserPageTitle(); + $usertalktitle = $usertitle->getTalkPage(); + if( !$usertalktitle->equals( $this->mTitle ) ) { + $ntl = wfMsg( 'youhavenewmessages', + $this->makeKnownLinkObj( + $usertalktitle, + wfMsgHtml( 'newmessageslink' ), + 'redirect=no' + ), + $this->makeKnownLinkObj( + $usertalktitle, + wfMsgHtml( 'newmessagesdifflink' ), + 'diff=cur' + ) + ); + # Disable Cache + $this->mOut->setSquidMaxage(0); + } + } else if (count($newtalks)) { + $sep = str_replace("_", " ", wfMsgHtml("newtalkseparator")); + $msgs = array(); + foreach ($newtalks as $newtalk) { + $msgs[] = wfElement("a", + array('href' => $newtalk["link"]), $newtalk["wiki"]); + } + $parts = implode($sep, $msgs); + $ntl = wfMsgHtml('youhavenewmessagesmulti', $parts); + $this->mOut->setSquidMaxage(0); + } else { + $ntl = ''; + } + return cbt_value( $ntl, 'dynamic' ); + } + + function showjumplinks() { + global $wgUser; + return cbt_value( $wgUser->getOption( 'showjumplinks' ) ? 'true' : '', 'user' ); + } + + function bodytext() { + return cbt_value( $this->mOut->getHTML(), 'dynamic' ); + } + + function catlinks() { + if ( !isset( $this->mCatlinks ) ) { + $this->mCatlinks = $this->getCategories(); + } + return cbt_value( $this->mCatlinks, 'dynamic' ); + } + + function extratabs( $itemTemplate ) { + global $wgContLang, $wgDisableLangConversion; + + $etpl = cbt_escape( $itemTemplate ); + + /* show links to different language variants */ + $variants = $wgContLang->getVariants(); + $s = ''; + if ( !$wgDisableLangConversion && count( $wgContLang->getVariants() ) > 1 ) { + $vcount=0; + foreach ( $variants as $code ) { + $name = $wgContLang->getVariantname( $code ); + if ( $name == 'disable' ) { + continue; + } + $code = cbt_escape( $code ); + $name = cbt_escape( $name ); + $s .= "{ca_variant {{$code}} {{$name}} {{$vcount}} {{$etpl}}}\n"; + $vcount ++; + } + } + return cbt_value( $s, array(), true ); + } + + function is_special() { return cbt_value( $this->mTitle->getNamespace() == NS_SPECIAL, 'title' ); } + function can_edit() { return cbt_value( (string)($this->mTitle->userCan( 'edit' )), 'dynamic' ); } + function can_move() { return cbt_value( (string)($this->mTitle->userCan( 'move' )), 'dynamic' ); } + function is_talk() { return cbt_value( (string)($this->mTitle->isTalkPage()), 'title' ); } + function is_protected() { return cbt_value( (string)$this->mTitle->isProtected(), 'dynamic' ); } + function nskey() { return cbt_value( $this->mTitle->getNamespaceKey(), 'title' ); } + + function request_url() { + global $wgRequest; + return cbt_value( $wgRequest->getRequestURL(), 'dynamic' ); + } + + function subject_url() { + $title = $this->getSubjectPage(); + if ( $title->exists() ) { + $url = $title->getLocalUrl(); + } else { + $url = $title->getLocalUrl( 'action=edit' ); + } + return cbt_value( $url, 'title' ); + } + + function talk_url() { + $title = $this->getTalkPage(); + if ( $title->exists() ) { + $url = $title->getLocalUrl(); + } else { + $url = $title->getLocalUrl( 'action=edit' ); + } + return cbt_value( $url, 'title' ); + } + + function edit_url() { + return cbt_value( $this->getEditUrl(), array( 'title', 'nonview dynamic' ) ); + } + + function move_url() { + return cbt_value( $this->makeSpecialParamUrl( 'Movepage' ), array(), true ); + } + + function localurl( $query ) { + return cbt_value( $this->mTitle->getLocalURL( $query ), 'title' ); + } + + function selecttab( $tab, $extraclass = '' ) { + if ( !isset( $this->mSelectedTab ) ) { + $prevent_active_tabs = false ; + wfRunHooks( 'SkinTemplatePreventOtherActiveTabs', array( &$this , &$preventActiveTabs ) ); + + $actionTabs = array( + 'edit' => 'edit', + 'submit' => 'edit', + 'history' => 'history', + 'protect' => 'protect', + 'unprotect' => 'protect', + 'delete' => 'delete', + 'watch' => 'watch', + 'unwatch' => 'watch', + ); + if ( $preventActiveTabs ) { + $this->mSelectedTab = false; + } else { + $action = $this->getAction(); + $section = $this->getSection(); + + if ( isset( $actionTabs[$action] ) ) { + $this->mSelectedTab = $actionTabs[$action]; + + if ( $this->mSelectedTab == 'edit' && $section == 'new' ) { + $this->mSelectedTab = 'addsection'; + } + } elseif ( $this->mTitle->isTalkPage() ) { + $this->mSelectedTab = 'talk'; + } else { + $this->mSelectedTab = 'subject'; + } + } + } + if ( $extraclass ) { + if ( $this->mSelectedTab == $tab ) { + $s = 'class="selected ' . htmlspecialchars( $extraclass ) . '"'; + } else { + $s = 'class="' . htmlspecialchars( $extraclass ) . '"'; + } + } else { + if ( $this->mSelectedTab == $tab ) { + $s = 'class="selected"'; + } else { + $s = ''; + } + } + return cbt_value( $s, array( 'nonview dynamic', 'title' ) ); + } + + function subject_newclass() { + $title = $this->getSubjectPage(); + $class = $title->exists() ? '' : 'new'; + return cbt_value( $class, 'dynamic' ); + } + + function talk_newclass() { + $title = $this->getTalkPage(); + $class = $title->exists() ? '' : 'new'; + return cbt_value( $class, 'dynamic' ); + } + + function ca_variant( $code, $name, $index, $template ) { + global $wgContLang; + $selected = ($code == $wgContLang->getPreferredVariant()); + $action = $this->getAction(); + $actstr = ''; + if( $action ) + $actstr = 'action=' . $action . '&'; + $s = strtr( $template, array( + '$id' => htmlspecialchars( 'varlang-' . $index ), + '$class' => $selected ? 'class="selected"' : '', + '$text' => $name, + '$href' => htmlspecialchars( $this->mTitle->getLocalUrl( $actstr . 'variant=' . $code ) ) + )); + return cbt_value( $s, 'dynamic' ); + } + + function is_watching() { + return cbt_value( (string)$this->mTitle->userIsWatching(), array( 'dynamic' ) ); + } + + + function personal_urls( $itemTemplate ) { + global $wgShowIPinHeader, $wgContLang; + + # Split this function up into many small functions, to obtain the + # best specificity in the dependencies of each one. The template below + # has no dependencies, so its generation, and any static subfunctions, + # can be optimised away. + $etpl = cbt_escape( $itemTemplate ); + $s = " + {userpage {{$etpl}}} + {mytalk {{$etpl}}} + {preferences {{$etpl}}} + {watchlist {{$etpl}}} + {mycontris {{$etpl}}} + {logout {{$etpl}}} + "; + + if ( $wgShowIPinHeader ) { + $s .= " + {anonuserpage {{$etpl}}} + {anontalk {{$etpl}}} + {anonlogin {{$etpl}}} + "; + } else { + $s .= "{login {{$etpl}}}\n"; + } + // No dependencies + return cbt_value( $s, array(), true /*this is a template*/ ); + } + + function userpage( $itemTemplate ) { + global $wgUser; + if ( $this->isLoggedIn() ) { + $userPage = $this->getUserPageTitle(); + $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() ); + } else { + $s = ''; + } + return cbt_value( $s, 'user' ); + } + + function mytalk( $itemTemplate ) { + global $wgUser; + if ( $this->isLoggedIn() ) { + $userPage = $this->getUserPageTitle(); + $talkPage = $userPage->getTalkPage(); + $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('mytalk') ); + } else { + $s = ''; + } + return cbt_value( $s, 'user' ); + } + + function preferences( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'preferences', + 'Preferences', wfMsg( 'preferences' ) ); + } else { + $s = ''; + } + return cbt_value( $s, array( 'loggedin', 'lang' ) ); + } + + function watchlist( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'watchlist', + 'Watchlist', wfMsg( 'watchlist' ) ); + } else { + $s = ''; + } + return cbt_value( $s, array( 'loggedin', 'lang' ) ); + } + + function mycontris( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + global $wgUser; + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'mycontris', + "Contributions/" . $wgUser->getTitleKey(), wfMsg('mycontris') ); + } else { + $s = ''; + } + return cbt_value( $s, 'user' ); + } + + function logout( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'logout', + 'Userlogout', wfMsg( 'userlogout' ), + $this->mTitle->getNamespace() === NS_SPECIAL && $this->mTitle->getText() === 'Preferences' + ? '' : "returnto=" . $this->mTitle->getPrefixedURL() ); + } else { + $s = ''; + } + return cbt_value( $s, 'loggedin dynamic' ); + } + + function anonuserpage( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = ''; + } else { + global $wgUser; + $userPage = $this->getUserPageTitle(); + $s = $this->makeTemplateLink( $itemTemplate, 'userpage', $userPage, $wgUser->getName() ); + } + return cbt_value( $s, '!loggedin dynamic' ); + } + + function anontalk( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = ''; + } else { + $userPage = $this->getUserPageTitle(); + $talkPage = $userPage->getTalkPage(); + $s = $this->makeTemplateLink( $itemTemplate, 'mytalk', $talkPage, wfMsg('anontalk') ); + } + return cbt_value( $s, '!loggedin dynamic' ); + } + + function anonlogin( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = ''; + } else { + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'anonlogin', 'Userlogin', + wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) ); + } + return cbt_value( $s, '!loggedin dynamic' ); + } + + function login( $itemTemplate ) { + if ( $this->isLoggedIn() ) { + $s = ''; + } else { + $s = $this->makeSpecialTemplateLink( $itemTemplate, 'login', 'Userlogin', + wfMsg( 'userlogin' ), 'returnto=' . urlencode( $this->getThisPDBK() ) ); + } + return cbt_value( $s, '!loggedin dynamic' ); + } + + function logopath() { return $GLOBALS['wgLogo']; } + function mainpage() { return self::makeMainPageUrl(); } + + function sidebar( $startSection, $endSection, $innerTpl ) { + $s = ''; + $lines = explode( "\n", wfMsgForContent( 'sidebar' ) ); + $firstSection = true; + foreach ($lines as $line) { + if (strpos($line, '*') !== 0) + continue; + if (strpos($line, '**') !== 0) { + $bar = trim($line, '* '); + $name = wfMsg( $bar ); + if (wfEmptyMsg($bar, $name)) { + $name = $bar; + } + if ( $firstSection ) { + $firstSection = false; + } else { + $s .= $endSection; + } + $s .= strtr( $startSection, + array( + '$bar' => htmlspecialchars( $bar ), + '$barname' => $name + ) ); + } else { + if (strpos($line, '|') !== false) { // sanity check + $line = explode( '|' , trim($line, '* '), 2 ); + $link = wfMsgForContent( $line[0] ); + if ($link == '-') + continue; + if (wfEmptyMsg($line[1], $text = wfMsg($line[1]))) + $text = $line[1]; + if (wfEmptyMsg($line[0], $link)) + $link = $line[0]; + $href = self::makeInternalOrExternalUrl( $link ); + + $s .= strtr( $innerTpl, + array( + '$text' => htmlspecialchars( $text ), + '$href' => htmlspecialchars( $href ), + '$id' => htmlspecialchars( 'n-' . strtr($line[1], ' ', '-') ), + '$classactive' => '' + ) ); + } else { continue; } + } + } + if ( !$firstSection ) { + $s .= $endSection; + } + + // Depends on user language only + return cbt_value( $s, 'lang' ); + } + + function searchaction() { + // Static link + return $this->getSearchLink(); + } + + function search() { + global $wgRequest; + return cbt_value( trim( $this->getSearch() ), 'special dynamic' ); + } + + function notspecialpage() { + return cbt_value( $this->mTitle->getNamespace() != NS_SPECIAL, 'special' ); + } + + function nav_whatlinkshere() { + return cbt_value( $this->makeSpecialParamUrl('Whatlinkshere' ), array(), true ); + } + + function article_exists() { + return cbt_value( (string)($this->mTitle->getArticleId() !== 0), 'title' ); + } + + function nav_recentchangeslinked() { + return cbt_value( $this->makeSpecialParamUrl('Recentchangeslinked' ), array(), true ); + } + + function feeds( $itemTemplate = '' ) { + if ( !$this->mOut->isSyndicated() ) { + $feeds = ''; + } elseif ( $itemTemplate == '' ) { + // boolean only required + $feeds = 'true'; + } else { + $feeds = ''; + global $wgFeedClasses, $wgRequest; + foreach( $wgFeedClasses as $format => $class ) { + $feeds .= strtr( $itemTemplate, + array( + '$key' => htmlspecialchars( $format ), + '$text' => $format, + '$href' => $wgRequest->appendQuery( "feed=$format" ) + ) ); + } + } + return cbt_value( $feeds, 'special dynamic' ); + } + + function is_userpage() { + list( $id, $ip ) = $this->getUserPageIdIp(); + return cbt_value( (string)($id || $ip), 'title' ); + } + + function is_ns_mediawiki() { + return cbt_value( (string)$this->mTitle->getNamespace() == NS_MEDIAWIKI, 'title' ); + } + + function is_loggedin() { + global $wgUser; + return cbt_value( (string)($wgUser->isLoggedIn()), 'loggedin' ); + } + + function nav_contributions() { + $url = $this->makeSpecialParamUrl( 'Contributions', '', '{title_userurl}' ); + return cbt_value( $url, array(), true ); + } + + function is_allowed( $right ) { + global $wgUser; + return cbt_value( (string)$wgUser->isAllowed( $right ), 'user' ); + } + + function nav_blockip() { + $url = $this->makeSpecialParamUrl( 'Blockip', '', '{title_userurl}' ); + return cbt_value( $url, array(), true ); + } + + function nav_emailuser() { + global $wgEnableEmail, $wgEnableUserEmail, $wgUser; + if ( !$wgEnableEmail || !$wgEnableUserEmail ) return ''; + + $url = $this->makeSpecialParamUrl( 'Emailuser', '', '{title_userurl}' ); + return cbt_value( $url, array(), true ); + } + + function nav_upload() { + global $wgEnableUploads, $wgUploadNavigationUrl; + if ( !$wgEnableUploads ) { + return ''; + } elseif ( $wgUploadNavigationUrl ) { + return $wgUploadNavigationUrl; + } else { + return self::makeSpecialUrl('Upload'); + } + } + + function nav_specialpages() { + return self::makeSpecialUrl('Specialpages'); + } + + function nav_print() { + global $wgRequest, $wgArticle; + $action = $this->getAction(); + $url = ''; + if( $this->mTitle->getNamespace() !== NS_SPECIAL + && ($action == '' || $action == 'view' || $action == 'purge' ) ) + { + $revid = $wgArticle->getLatest(); + if ( $revid != 0 ) { + $url = $wgRequest->appendQuery( 'printable=yes' ); + } + } + return cbt_value( $url, array( 'nonview dynamic', 'title' ) ); + } + + function nav_permalink() { + $url = (string)$this->getPermalink(); + return cbt_value( $url, 'dynamic' ); + } + + function nav_trackbacklink() { + global $wgUseTrackbacks; + if ( !$wgUseTrackbacks ) return ''; + + return cbt_value( $this->mTitle->trackbackURL(), 'title' ); + } + + function is_permalink() { + return cbt_value( (string)($this->getPermalink() === false), 'nonview dynamic' ); + } + + function toolboxend() { + // This is where the MonoBookTemplateToolboxEnd hook went in the old skin + return ''; + } + + function language_urls( $outer, $inner ) { + global $wgHideInterlanguageLinks, $wgOut, $wgContLang; + if ( $wgHideInterlanguageLinks ) return ''; + + $links = $wgOut->getLanguageLinks(); + $s = ''; + if ( count( $links ) ) { + foreach( $links as $l ) { + $tmp = explode( ':', $l, 2 ); + $nt = Title::newFromText( $l ); + $s .= strtr( $inner, + array( + '$class' => htmlspecialchars( 'interwiki-' . $tmp[0] ), + '$href' => htmlspecialchars( $nt->getFullURL() ), + '$text' => ($wgContLang->getLanguageName( $nt->getInterwiki() ) != ''? + $wgContLang->getLanguageName( $nt->getInterwiki() ) : $l ), + ) + ); + } + $s = str_replace( '$body', $s, $outer ); + } + return cbt_value( $s, 'dynamic' ); + } + + function poweredbyico() { return $this->getPoweredBy(); } + function copyrightico() { return $this->getCopyrightIcon(); } + + function lastmod() { + global $wgMaxCredits; + if ( $wgMaxCredits ) return ''; + + if ( !isset( $this->mLastmod ) ) { + if ( $this->isCurrentArticleView() ) { + $this->mLastmod = $this->lastModified(); + } else { + $this->mLastmod = ''; + } + } + return cbt_value( $this->mLastmod, 'dynamic' ); + } + + function viewcount() { + global $wgDisableCounters; + if ( $wgDisableCounters ) return ''; + + global $wgLang, $wgArticle; + if ( is_object( $wgArticle ) ) { + $viewcount = $wgLang->formatNum( $wgArticle->getCount() ); + if ( $viewcount ) { + $viewcount = wfMsg( "viewcount", $viewcount ); + } else { + $viewcount = ''; + } + } else { + $viewcount = ''; + } + return cbt_value( $viewcount, 'dynamic' ); + } + + function numberofwatchingusers() { + global $wgPageShowWatchingUsers; + if ( !$wgPageShowWatchingUsers ) return ''; + + $dbr = wfGetDB( DB_SLAVE ); + extract( $dbr->tableNames( 'watchlist' ) ); + $sql = "SELECT COUNT(*) AS n FROM $watchlist + WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBkey()) . + "' AND wl_namespace=" . $this->mTitle->getNamespace() ; + $res = $dbr->query( $sql, 'SkinTemplate::outputPage'); + $row = $dbr->fetchObject( $res ); + $num = $row->n; + if ($num > 0) { + $s = wfMsg('number_of_watching_users_pageview', $num); + } else { + $s = ''; + } + return cbt_value( $s, 'dynamic' ); + } + + function credits() { + global $wgMaxCredits; + if ( !$wgMaxCredits ) return ''; + + if ( $this->isCurrentArticleView() ) { + require_once("Credits.php"); + global $wgArticle, $wgShowCreditsIfMax; + $credits = getCredits($wgArticle, $wgMaxCredits, $wgShowCreditsIfMax); + } else { + $credits = ''; + } + return cbt_value( $credits, 'view dynamic' ); + } + + function normalcopyright() { + return $this->getCopyright( 'normal' ); + } + + function historycopyright() { + return $this->getCopyright( 'history' ); + } + + function is_currentview() { + global $wgRequest; + return cbt_value( (string)$this->isCurrentArticleView(), 'view' ); + } + + function usehistorycopyright() { + global $wgRequest; + if ( wfMsgForContent( 'history_copyright' ) == '-' ) return ''; + + $oldid = $this->getOldId(); + $diff = $this->getDiff(); + $use = (string)(!is_null( $oldid ) && is_null( $diff )); + return cbt_value( $use, 'nonview dynamic' ); + } + + function privacy() { + return cbt_value( $this->privacyLink(), 'lang' ); + } + function about() { + return cbt_value( $this->aboutLink(), 'lang' ); + } + function disclaimer() { + return cbt_value( $this->disclaimerLink(), 'lang' ); + } + function tagline() { + # A reference to this tag existed in the old MonoBook.php, but the + # template data wasn't set anywhere + return ''; + } + function reporttime() { + return cbt_value( $this->mOut->reportTime(), 'dynamic' ); + } + + function msg( $name ) { + return cbt_value( wfMsg( $name ), 'lang' ); + } + + function fallbackmsg( $name, $fallback ) { + $text = wfMsg( $name ); + if ( wfEmptyMsg( $name, $text ) ) { + $text = $fallback; + } + return cbt_value( $text, 'lang' ); + } + + /****************************************************** + * Utility functions * + ******************************************************/ + + /** Return true if this request is a valid, secure CSS preview */ + function isCssPreview() { + if ( !isset( $this->mCssPreview ) ) { + global $wgRequest, $wgAllowUserCss, $wgUser; + $this->mCssPreview = + $wgAllowUserCss && + $wgUser->isLoggedIn() && + $this->mTitle->isCssSubpage() && + $this->userCanPreview( $this->getAction() ); + } + return $this->mCssPreview; + } + + /** Return true if this request is a valid, secure JS preview */ + function isJsPreview() { + if ( !isset( $this->mJsPreview ) ) { + global $wgRequest, $wgAllowUserJs, $wgUser; + $this->mJsPreview = + $wgAllowUserJs && + $wgUser->isLoggedIn() && + $this->mTitle->isJsSubpage() && + $this->userCanPreview( $this->getAction() ); + } + return $this->mJsPreview; + } + + /** Get the title of the $wgUser's user page */ + function getUserPageTitle() { + if ( !isset( $this->mUserPageTitle ) ) { + global $wgUser; + $this->mUserPageTitle = $wgUser->getUserPage(); + } + return $this->mUserPageTitle; + } + + /** Get the text of the user page title */ + function getUserPageText() { + if ( !isset( $this->mUserPageText ) ) { + $userPage = $this->getUserPageTitle(); + $this->mUserPageText = $userPage->getPrefixedText(); + } + return $this->mUserPageText; + } + + /** Make an HTML element for a stylesheet link */ + function makeStylesheetLink( $url ) { + return '"; + } + + /** Make an XHTML element for inline CSS */ + function makeStylesheetCdata( $style ) { + return ""; + } + + /** Get the edit URL for this page */ + function getEditUrl() { + if ( !isset( $this->mEditUrl ) ) { + $this->mEditUrl = $this->mTitle->getLocalUrl( $this->editUrlOptions() ); + } + return $this->mEditUrl; + } + + /** Get the prefixed DB key for this page */ + function getThisPDBK() { + if ( !isset( $this->mThisPDBK ) ) { + $this->mThisPDBK = $this->mTitle->getPrefixedDbKey(); + } + return $this->mThisPDBK; + } + + function getThisTitleUrlForm() { + if ( !isset( $this->mThisTitleUrlForm ) ) { + $this->mThisTitleUrlForm = $this->mTitle->getPrefixedURL(); + } + return $this->mThisTitleUrlForm; + } + + /** + * If the current page is a user page, get the user's ID and IP. Otherwise return array(0,false) + */ + function getUserPageIdIp() { + if ( !isset( $this->mUserPageId ) ) { + if( $this->mTitle->getNamespace() == NS_USER || $this->mTitle->getNamespace() == NS_USER_TALK ) { + $this->mUserPageId = User::idFromName($this->mTitle->getText()); + $this->mUserPageIp = User::isIP($this->mTitle->getText()); + } else { + $this->mUserPageId = 0; + $this->mUserPageIp = false; + } + } + return array( $this->mUserPageId, $this->mUserPageIp ); + } + + /** + * Returns a permalink URL, or false if the current page is already a + * permalink, or blank if a permalink shouldn't be displayed + */ + function getPermalink() { + if ( !isset( $this->mPermalink ) ) { + global $wgRequest, $wgArticle; + $action = $this->getAction(); + $oldid = $this->getOldId(); + $url = ''; + if( $this->mTitle->getNamespace() !== NS_SPECIAL + && $this->mTitle->getArticleId() != 0 + && ($action == '' || $action == 'view' || $action == 'purge' ) ) + { + if ( !$oldid ) { + $revid = $wgArticle->getLatest(); + $url = $this->mTitle->getLocalURL( "oldid=$revid" ); + } else { + $url = false; + } + } else { + $url = ''; + } + } + return $url; + } + + /** + * Returns true if the current page is an article, not a special page, + * and we are viewing a revision, not a diff + */ + function isArticleView() { + global $wgOut, $wgArticle, $wgRequest; + if ( !isset( $this->mIsArticleView ) ) { + $oldid = $this->getOldId(); + $diff = $this->getDiff(); + $this->mIsArticleView = $wgOut->isArticle() and + (!is_null( $oldid ) or is_null( $diff )) and 0 != $wgArticle->getID(); + } + return $this->mIsArticleView; + } + + function isCurrentArticleView() { + if ( !isset( $this->mIsCurrentArticleView ) ) { + global $wgOut, $wgArticle, $wgRequest; + $oldid = $this->getOldId(); + $this->mIsCurrentArticleView = $wgOut->isArticle() && is_null( $oldid ) && 0 != $wgArticle->getID(); + } + return $this->mIsCurrentArticleView; + } + + + /** + * Return true if the current page is editable; if edit section on right + * click should be enabled. + */ + function isEditable() { + global $wgRequest; + $action = $this->getAction(); + return ($this->mTitle->getNamespace() != NS_SPECIAL and !($action == 'edit' or $action == 'submit')); + } + + /** Return true if the user is logged in */ + function isLoggedIn() { + global $wgUser; + return $wgUser->isLoggedIn(); + } + + /** Get the local URL of the current page */ + function getPageUrl() { + if ( !isset( $this->mPageUrl ) ) { + $this->mPageUrl = $this->mTitle->getLocalURL(); + } + return $this->mPageUrl; + } + + /** Make a link to a title using a template */ + function makeTemplateLink( $template, $key, $title, $text ) { + $url = $title->getLocalUrl(); + return strtr( $template, + array( + '$key' => $key, + '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '', + '$class' => $title->getArticleID() == 0 ? 'class="new"' : '', + '$href' => htmlspecialchars( $url ), + '$text' => $text + ) ); + } + + /** Make a link to a URL using a template */ + function makeTemplateLinkUrl( $template, $key, $url, $text ) { + return strtr( $template, + array( + '$key' => $key, + '$classactive' => ($url == $this->getPageUrl()) ? 'class="active"' : '', + '$class' => '', + '$href' => htmlspecialchars( $url ), + '$text' => $text + ) ); + } + + /** Make a link to a special page using a template */ + function makeSpecialTemplateLink( $template, $key, $specialName, $text, $query = '' ) { + $url = self::makeSpecialUrl( $specialName, $query ); + // Ignore the query when comparing + $active = ($this->mTitle->getNamespace() == NS_SPECIAL && $this->mTitle->getDBkey() == $specialName); + return strtr( $template, + array( + '$key' => $key, + '$classactive' => $active ? 'class="active"' : '', + '$class' => '', + '$href' => htmlspecialchars( $url ), + '$text' => $text + ) ); + } + + function loadRequestValues() { + global $wgRequest; + $this->mAction = $wgRequest->getText( 'action' ); + $this->mOldId = $wgRequest->getVal( 'oldid' ); + $this->mDiff = $wgRequest->getVal( 'diff' ); + $this->mSection = $wgRequest->getVal( 'section' ); + $this->mSearch = $wgRequest->getVal( 'search' ); + $this->mRequestValuesLoaded = true; + } + + + + /** Get the action parameter of the request */ + function getAction() { + if ( !isset( $this->mRequestValuesLoaded ) ) { + $this->loadRequestValues(); + } + return $this->mAction; + } + + /** Get the oldid parameter */ + function getOldId() { + if ( !isset( $this->mRequestValuesLoaded ) ) { + $this->loadRequestValues(); + } + return $this->mOldId; + } + + /** Get the diff parameter */ + function getDiff() { + if ( !isset( $this->mRequestValuesLoaded ) ) { + $this->loadRequestValues(); + } + return $this->mDiff; + } + + function getSection() { + if ( !isset( $this->mRequestValuesLoaded ) ) { + $this->loadRequestValues(); + } + return $this->mSection; + } + + function getSearch() { + if ( !isset( $this->mRequestValuesLoaded ) ) { + $this->loadRequestValues(); + } + return $this->mSearch; + } + + /** Make a special page URL of the form [[Special:Somepage/{title_urlform}]] */ + function makeSpecialParamUrl( $name, $query = '', $param = '{title_urlform}' ) { + // Abuse makeTitle's lax validity checking to slip a control character into the URL + $title = Title::makeTitle( NS_SPECIAL, "$name/\x1a" ); + $url = cbt_escape( $title->getLocalURL( $query ) ); + // Now replace it with the parameter + return str_replace( '%1A', $param, $url ); + } + + function getSubjectPage() { + if ( !isset( $this->mSubjectPage ) ) { + $this->mSubjectPage = $this->mTitle->getSubjectPage(); + } + return $this->mSubjectPage; + } + + function getTalkPage() { + if ( !isset( $this->mTalkPage ) ) { + $this->mTalkPage = $this->mTitle->getTalkPage(); + } + return $this->mTalkPage; + } +} + diff --git a/skins/modern/audio.png b/skins/modern/audio.png new file mode 100644 index 00000000..1c56bdc8 Binary files /dev/null and b/skins/modern/audio.png differ diff --git a/skins/modern/bullet.gif b/skins/modern/bullet.gif new file mode 100644 index 00000000..b43de48a Binary files /dev/null and b/skins/modern/bullet.gif differ diff --git a/skins/modern/discussionitem_icon.gif b/skins/modern/discussionitem_icon.gif new file mode 100644 index 00000000..baec471a Binary files /dev/null and b/skins/modern/discussionitem_icon.gif differ diff --git a/skins/modern/document.png b/skins/modern/document.png new file mode 100644 index 00000000..b48138e9 Binary files /dev/null and b/skins/modern/document.png differ diff --git a/skins/modern/external.png b/skins/modern/external.png new file mode 100644 index 00000000..419c06fb Binary files /dev/null and b/skins/modern/external.png differ diff --git a/skins/modern/file_icon.gif b/skins/modern/file_icon.gif new file mode 100644 index 00000000..847f6485 Binary files /dev/null and b/skins/modern/file_icon.gif differ diff --git a/skins/modern/footer-grad.png b/skins/modern/footer-grad.png new file mode 100644 index 00000000..6f61d616 Binary files /dev/null and b/skins/modern/footer-grad.png differ diff --git a/skins/modern/link_icon.gif b/skins/modern/link_icon.gif new file mode 100644 index 00000000..815ccb1b Binary files /dev/null and b/skins/modern/link_icon.gif differ diff --git a/skins/modern/lock_icon.gif b/skins/modern/lock_icon.gif new file mode 100644 index 00000000..8a87e283 Binary files /dev/null and b/skins/modern/lock_icon.gif differ diff --git a/skins/modern/mail_icon.gif b/skins/modern/mail_icon.gif new file mode 100644 index 00000000..50a87a9a Binary files /dev/null and b/skins/modern/mail_icon.gif differ diff --git a/skins/modern/main.css b/skins/modern/main.css new file mode 100644 index 00000000..d9537c18 --- /dev/null +++ b/skins/modern/main.css @@ -0,0 +1,1098 @@ +body { + margin: 0 0 0 0; + padding: 0 0 0 0; + /*font-size: 10pt;*/ + font-size: x-small; + + + font-family: sans-serif; + color: black; + background-color: #f0f0f0; +} + +#mw_main, +#p-personal, +#mw_header, +.os-suggest { + font-size: 130%; +} + +#mw_header { + position: absolute; + top: 0; + left: 0; + margin: 0 0 0 0; + padding: 0 0em 0 0em; + border: none; + height: 2em; + width: 100%; + + background-color: #003366; + color: white; +} + +#mw_header h1 { + margin: 0 0 0 0.5em; + padding: 0 0 0 0; + text-decoration: none; + font-size: 150%; +} + +#p-personal { + position: absolute; + top: 2em; + left: 0; + height: 1.5em; + margin: 0 0 0 0; + padding: 0 0 0 0; + width: 100%; + +} + +#p-personal div.pBody { + margin: 0 0 0 0; + padding: 0 0 0 0; + height: 1.5em; + font-variant: small-caps; +} + +#p-personal h5 { + display: none; +} + +#p-personal ul { + margin: 0 0 0 0; + padding: 0 0 0 0; + display: block; + height: 1.5em; + background-color: #3c78b5; +} + +#p-personal li { + display: block; float: left; + height: 1.5em; + margin: 0 0 0 0; + vertical-align: middle; + + font-weight: bold; + text-transform: lowercase; +} + +#p-personal li a { + text-decoration: none; + color: white; + padding: 0 1em 0 1em; +} + +#p-personal li a:hover { + text-decoration: none; + color: white; +} + +#p-personal li:hover { + background-color: #003366; +} + +#jump-to-nav { + display: none; +} + +#mw_contentwrapper { + width: 100%; + margin: 0 0 0 -15em; + float: right; +} + +#mw_content { + margin: 0 0 0 14em; + + background-color: white; + border-top: solid 1px #bbbbbb; + border-left: solid 1px #bbbbbb; + border-bottom: solid 1px #bbbbbb; + + line-height: 1.5em; + padding: 0 1em 1em 1em; +} + +#mw_portlets { + width: 14em; + + border-right: solid 1px #bbbbbb; + background-color: #f0f0f0; +} + +#mw_main { + padding: 0 0 0 0; + margin: 0 0 0 0; + margin-top: 3.5em; +} + +div.mw_clear { + margin: 0 0 0 0; + padding: 0 0 0 0; + clear: both; +} + +.portlet { + padding: 0 0 0 0; + margin: 0 0 0 0; +} + +.portlet div.pBody { + padding: 0em 0 0.5em 0; +} + +textarea { + width: 100%; + padding: .1em; +} + +#searchBody { + text-align: center; +} + +#searchInput { + display: block; + margin-left: auto; + margin-right: auto; +} + +.portlet h5 { + padding: 0.1em 0 0.3em 1em; + margin: 0 0 0 0; + background-color: #dddddd; + font-weight: bold; + border-bottom: solid 1px #3c78b5; + height: 1.1em; +} + +.portlet ul { + margin: 0 0 0 1.5em; + padding: 0 0 0 0; +} + +#mw_portlets .portlet ul { + line-height: 1.4em; +} + +ul { + list-style-image: url(bullet.gif); +} + +#p-cactions { + height: 1.5em; + padding: 0 0 0 0; + margin: 0 0 0 14em; +} + +#p-cactions div.pBody { + margin: 0 0 0 0; + padding: 0 0 0 0; +} + +#p-cactions a, +#p-cactions a:hover { + color: black; + text-decoration: none; +} + +#p-cactions ul { + display: inline; + margin: 0 0 0 0; + padding: 0 0 0 0; +} + +#p-cactions li { + margin: 0 0.5em 0 0.5em; + padding: 0 0.2em 0 0.2em; + display: block; + float: left; + height: 1.5em; + text-transform: lowercase; +} + +#p-cactions li.selected { + background-color: #bbbbbb; +} + +#p-cactions li a, +#p-cactions li a:hover, +#p-cactions li a:visited { + text-decoration: underline; + color: #003366; +} + +#p-cactions li.selected a, +#p-cactions li.selected a:hover, +#p-cactions li.selected a:visited { + text-decoration: none; + color: white; +} + +#p-cactions h5 { + display: none; +} + +#siteSub { + display: none; +} + +#footer { + background-color: #f0f0f0; + background: url(footer-grad.png) repeat-x 0 0; + padding: 10px 1em 1em 1em; + clear:both; + color: #444444; +} + +#footer a, +#footer a:hover, +#footer a:visited { + color: #444444; + text-decoration: underline; +} + +img { + border: none; +} + +#footer li { + display: inline; + list-style-type: none; + padding: 0 0 0 0; + margin: 0 0 0 0; +} + +#footer ul { + padding: 0 0 0 0; + margin: 0 0 0 0; +} + +div.printfooter { + display: none; +} + +p { + margin: 1em 0 1em 0; +} + +hr { + height: 1px; + color: #aaa; + background-color: #aaa; + border: 0; + margin: .2em 0 .2em 0; +} + +#contentSub { + color: #888; + font-size: small; + padding-left: 2em; +} + +#mw_portlets form { + margin: 0 0 0 0; + padding: 0 0 0 0; +} + +a { + text-decoration: none; + color: #003366; + background: none; +} +a:visited { + color: #5a3696; +} +a:active { + color: #faa700; +} +a:hover { + text-decoration: underline; +} +a.stub { + color: #772233; +} +a.new { + color: #ba0000; +} +a.new:visited { + color: #a55858; +} + +span.editsection { + font-size: small; +} + +h1, h2 { + border-bottom: solid 1px #003366; +} + +#preftoc { + width: 100%; + margin: 0 0 0 0; + padding: 0 0 0 0; + height: 1.5em; + clear: right; +} + +#preftoc li { + margin: 0 0.5em 0 0.5em; + padding: 0 0.2em 0 0.2em; + display: block; + float: left; + height: 1.5em; + text-transform: lowercase; +} + +#preferences { + margin: 0 0 0 0; + padding: 0em 1em 1em 1em; + border: solid 1px #bbbbbb; + clear: left; /* Multi-line toc should not push data to horizontally */ +} + +#preferences fieldset { + margin-top: 0; + border: none; +} + +#preferences h2 { +} + +.mainLegend { + display: none; +} + +.prefsectiontip { + font-size: x-small; + padding: .2em 2em; + color: #666; +} + +.prefsection legend { + font-weight: bold; +} + +#preftoc li.selected { + background-color: #bbbbbb; +} + +#preftoc li a, +#preftoc li a:hover, +#preftoc li a:visited { + text-decoration: underline; + color: #003366; +} + +#preftoc li.selected a, +#preftoc li.selected a:hover, +#preftoc li.selected a:visited { + text-decoration: none; + color: white; +} + +#mw_content a.external, +#mw_content a[href ^="gopher://"] { + background: url(external.png) center right no-repeat; + padding-right: 13px; +} +#mw_content a[href ^="https://"], +.link-https { + background: url(lock_icon.gif) center right no-repeat; + padding-right: 16px; +} +#mw_content a[href ^="mailto:"], +.link-mailto { + background: url(mail_icon.gif) center right no-repeat; + padding-right: 18px; +} +#mw_content a[href ^="news://"] { + background: url(news_icon.png) center right no-repeat; + padding-right: 18px; +} +#mw_content a[href ^="ftp://"], +.link-ftp { + background: url(file_icon.gif) center right no-repeat; + padding-right: 18px; +} +#mw_content a[href ^="irc://"], +#mw_content a.extiw[href ^="irc://"], +.link-irc { + background: url(discussionitem_icon.gif) center right no-repeat; + padding-right: 18px; +} + +#mw_content a.external[href $=".ogg"], #mw_content a.external[href $=".OGG"], +#mw_content a.external[href $=".mid"], #mw_content a.external[href $=".MID"], +#mw_content a.external[href $=".midi"], #mw_content a.external[href $=".MIDI"], +#mw_content a.external[href $=".mp3"], #mw_content a.external[href $=".MP3"], +#mw_content a.external[href $=".wav"], #mw_content a.external[href $=".WAV"], +#mw_content a.external[href $=".wma"], #mw_content a.external[href $=".WMA"], +.link-audio { + background: url("audio.png") center right no-repeat; + padding-right: 13px; +} +#mw_content a.external[href $=".ogm"], #mw_content a.external[href $=".OGM"], +#mw_content a.external[href $=".avi"], #mw_content a.external[href $=".AVI"], +#mw_content a.external[href $=".mpeg"], #mw_content a.external[href $=".MPEG"], +#mw_content a.external[href $=".mpg"], #mw_content a.external[href $=".MPG"], +.link-video { + background: url("video.png") center right no-repeat; + padding-right: 13px; +} +#mw_content a.external[href $=".pdf"], #mw_content a.external[href $=".PDF"], +#mw_content a.external[href *=".pdf#"], #mw_content a.external[href *=".PDF#"], +#mw_content a.external[href *=".pdf?"], #mw_content a.external[href *=".PDF?"], +.link-document { + background: url("document.png") center right no-repeat; + padding-right: 12px; +} + +/* images */ +div.floatright, table.floatright { + clear: right; + float: right; + position: relative; + margin: 0 0 .5em .5em; + border: 0; +/* + border: .5em solid white; + border-width: .5em 0 .8em 1.4em; +*/ +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: left; + clear: left; + position: relative; + margin: 0 .5em .5em 0; + border: 0; +/* + margin: .3em .5em .5em 0; + border: .5em solid white; + border-width: .5em 1.4em .8em 0; +*/ +} +div.floatleft p { font-style: italic; } +/* thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} +.hiddenStructure { + display: none; +} + +#mw_content .plainlinks a { + background: none !important; + padding: 0 !important; +} + +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} + +#toc, +.toc { + margin: 0 0 0 0; + padding: 0 0 0 0; + border-spacing: 0; + background-color: #f0f0f0; + border: solid 1px #bbbbbb; +} + +#toc tr, #toc td { + margin: 0 0 0 0; + padding: 0 0 0 0; +} + +#toctitle { + border-bottom: solid 1px #3c78b5; + background-color: #dddddd; + margin: 0 0 0 0; +} + +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} + +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin: 0 1em 0 1em; + padding-left: 0; + text-align: left; +} + +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} + +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + +.mw-warning { + margin-left: 50px; + margin-right: 50px; + text-align: center; +} + +.catlinks { + border: solid 1px #bbbbbb; + background-color: #f0f0f0; + padding: 0.5em 0.5em 0.5em 0.5em; + margin: 0 0 0 0; +} + +.catlinks { + margin: 0 0 0 0; + padding: 0 0 0 0; +} + +#mw_header h1, +#p-personal, +#p-cactions { + overflow: hidden; +} + +/* disable interwiki styling */ +#mw_content a.extiw, +#mw_content a.extiw:active { + color: #36b; + background: none; + padding: 0; +} +#mw_content a.external { + color: #36b; +} + + + +.redirectText { + font-size: 150%; + margin: 5px; +} + +.printfooter { + display: none; +} + +.not-patrolled { + background-color: #ffa; +} +div.patrollink { + font-size: 75%; + text-align: right; +} +span.newpage, span.minor, span.bot { + font-weight: bold; +} +span.unpatrolled { + font-weight: bold; + color: red; +} + +.sharedUploadNotice { + font-style: italic; +} + +span.updatedmarker { + color: black; + background-color: #0f0; +} + +table.gallery { + border: 1px solid #ccc; + margin: 2px; + padding: 2px; + background-color: white; +} + +table.gallery tr { + vertical-align: top; +} + +table.gallery td { + vertical-align: top; + background-color: #f9f9f9; + border: solid 2px white; +} +/* Keep this temporarily so that cached pages will display right */ +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +} +table.gallery caption { + font-weight: bold; +} + +div.gallerybox { + margin: 2px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; +} + +span.comment { + font-style: italic; +} + +span.changedby { + font-size: 95%; +} + +.previewnote { + text-indent: 3em; + color: #c00; + border-bottom: 1px solid #aaa; + padding-bottom: 1em; + margin-bottom: 1em; +} + +.previewnote p { + margin: 0; + padding: 0; +} + +.editExternally { + border: 1px solid gray; + background-color: #ffffff; + padding: 3px; + margin-top: 0.5em; + float: left; + font-size: small; + text-align: center; +} +.editExternallyHelp { + font-style: italic; + color: gray; +} + +.toggle { + margin-left: 2em; + text-indent: -2em; +} + +/* Classes for EXIF data display */ +table.mw_metadata { + font-size: 0.8em; + margin-left: 0.5em; + margin-bottom: 0.5em; + width: 300px; +} + +table.mw_metadata caption { + font-weight: bold; +} + +table.mw_metadata th { + font-weight: normal; +} + +table.mw_metadata td { + padding: 0.1em; +} + +table.mw_metadata { + border: none; + border-collapse: collapse; +} + +table.mw_metadata td, table.mw_metadata th { + text-align: center; + border: 1px solid #aaaaaa; + padding-left: 0.1em; + padding-right: 0.1em; +} + +table.mw_metadata th { + background-color: #f9f9f9; +} + +table.mw_metadata td { + background-color: #fcfcfc; +} + +table.collapsed tr.collapsable { + display: none; +} + + +/* filetoc */ +ul#filetoc { + text-align: center; + border: 1px solid #aaaaaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; + margin-bottom: 0.5em; + margin-left: 0; + margin-right: 0; +} + +#filetoc li { + display: inline; + list-style-type: none; + padding-right: 2em; +} + +input#wpSummary { + width: 80%; +} + +/* @bug 1714 */ +input#wpSave, input#wpDiff { + margin-right: 0.33em; +} + +#wpSave { + font-weight: bold; +} + +/* Classes for article validation */ + +table.revisionform_default { + border: 1px solid #000000; +} + +table.revisionform_focus { + border: 1px solid #000000; + background-color:#00BBFF; +} + +tr.revision_tr_default { + background-color:#EEEEEE; +} + +tr.revision_tr_first { + background-color:#DDDDDD; +} + +p.revision_saved { + color: green; + font-weight:bold; +} + +#mw_trackbacks { + border: solid 1px #bbbbff; + background-color: #eeeeff; + padding: 0.2em; +} + + +/* Allmessages table */ + +#allmessagestable th { + background-color: #b2b2ff; +} + +#allmessagestable tr.orig { + background-color: #ffe2e2; +} + +#allmessagestable tr.new { + background-color: #e2ffe2; +} + +#allmessagestable tr.def { + background-color: #f0f0ff; +} + + +/* noarticletext */ +div.noarticletext { + border: 1px solid #ccc; + background: #fff; + padding: .2em 1em; + color: #000; +} + +div#searchTargetContainer { + left: 10px; + top: 10px; + width: 90%; + background: white; +} + +div#searchTarget { + padding: 3px; + margin: 5px; + background: #F0F0F0; + border: solid 1px blue; +} + +div#searchTarget ul li { + list-style: none; +} + +div#searchTarget ul li:before { + color: orange; + content: "\00BB \0020"; +} + +div#searchTargetHide { + float:right; + border:solid 1px black; + background:gainsboro; + padding:2px; +} + +div.multipageimagenavbox { + border: solid 1px silver; + padding: 4px; + margin: 1em; + background: #f0f0f0; +} + +div.multipageimagenavbox div.thumb { + border: none; + margin-left: 2em; + margin-right: 2em; +} + +div.multipageimagenavbox hr { + margin: 6px; +} + +table.multipageimage td { + text-align: center; +} + +/** Special:Version */ + +table#sv-ext, table#sv-hooks, table#sv-software { + margin: 1em; + padding:0em; +} + +#sv-ext td, #sv-hooks td, #sv-software td, +#sv-ext th, #sv-hooks th, #sv-software th { + border: 1px solid #A0A0A0; + padding: 0 0.15em 0 0.15em; +} +#sv-ext th, #sv-hooks th, #sv-software th { + background-color: #F0F0F0; + color: black; + padding: 0 0.15em 0 0.15em; +} +tr.sv-space{ + height: 0.8em; + border:none; +} +tr.sv-space td { display: none; } + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager_nav a { text-decoration: none; } +.TablePager { border-collapse: collapse; } +.TablePager, .TablePager td, .TablePager th { + border: 1px solid #aaaaaa; + padding: 0 0.15em 0 0.15em; +} +.TablePager th { background-color: #eeeeff } +.TablePager td { background-color: #ffffff } +.TablePager tr:hover td { background-color: #eeeeff } + +.imagelist td, .imagelist th { white-space: nowrap } +.imagelist .TablePager_col_links { background-color: #eeeeff } +.imagelist .TablePager_col_img_description { white-space: normal } +.imagelist th.TablePager_sort { background-color: #ccccff } + +.templatesUsed { margin-top: 1.5em; } + +.mw-summary-preview { + margin: 0.1em 0; +} + +/* Friendlier slave lag warnings */ +div.mw-lag-warn-normal, +div.mw-lag-warn-high { + padding: 3px; + text-align: center; + margin: 3px auto; +} +div.mw-lag-warn-normal { + border: 1px solid #FFCC66; + background-color: #FFFFCC; +} +div.mw-lag-warn-high { + font-weight: bold; + border: 2px solid #FF0033; + background-color: #FFCCCC; +} + +.MediaTransformError { + background-color: #ccc; + padding: 0.1em; +} +.MediaTransformError td { + text-align: center; + vertical-align: middle; + font-size: 90%; +} +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 0 0 1.5em; + padding: 0; + list-style-image: url(bullet.gif); +} +ol { + line-height: 1.5em; + margin: .3em 0 0 3.2em; + padding: 0; + list-style-image: none; +} +li { + margin-bottom: .1em; +} +dt { + font-weight: bold; + margin-bottom: .1em; +} +dl { + margin-top: .2em; + margin-bottom: .5em; +} + +#p-cactions li.new a { + color: #cc2200; +} + +span.subpages { + font-size: 80%; + display: block; +} + +pre { + border: solid 1px #3c78b5; + padding: 0.4em; + background-color: #f0f0f0; +} + +.usermessage { + background-color: #dadaff; +} + +.mw-topboxes { + border-collapse: collapse; + margin: 0 -1em 1em -1em; + padding: 0 0 8px 0; + background: url(footer-grad.png) repeat-x bottom left; +} + +.mw-topbox p { + padding: 0 0 0 0; + margin: 0 0 0 0; +} + +.mw-topbox { + color: black; + font-weight: bold; + margin: 0 0 0 0; + padding: 0 1em 0 1em; + vertical-align: middle; + border-collapse: collapse; + border-bottom: solid 1px #bbbbbb; +} + +#siteSub { + background-color: #dddddd; +} + +/* emulate center */ +.center { + width:100%; + text-align:center; +} +*.center * { + margin-left:auto; + margin-right:auto; +} + +/* table standards */ +.toccolours { + border:1px solid #bbbbbb; + background-color:#f0f0f0; + border-spacing:0pt; + margin:0pt; + padding:0pt; +} diff --git a/skins/modern/news_icon.png b/skins/modern/news_icon.png new file mode 100644 index 00000000..dd1541d1 Binary files /dev/null and b/skins/modern/news_icon.png differ diff --git a/skins/modern/print.css b/skins/modern/print.css new file mode 100644 index 00000000..33a36b20 --- /dev/null +++ b/skins/modern/print.css @@ -0,0 +1,10 @@ +#mw_portlets, +#p-cactions, +#p-personal, +#jump-to-nav, +#footer, +span.editsection, +.noprint +{ + display: none; +} diff --git a/skins/modern/rtl.css b/skins/modern/rtl.css new file mode 100644 index 00000000..d7aae769 --- /dev/null +++ b/skins/modern/rtl.css @@ -0,0 +1,153 @@ +body { + direction: rtl; + unicode-bidi: embed; +} + +.editsection { + float: left; + margin-right: 5px; + margin-left: 0; /* bug 9122: undo default LTR */ +} + +/* Fix alignment */ +.documentByLine, +.portletDetails, +.portletMore { + text-align: left; +} + +div div.thumbcaption { + text-align: right; +} + +div.magnify { + left: auto; + right: 0; +} + +/* Fix margins for non-css2 browsers */ +/* top right bottom left */ + +dd { + margin-left: 0; + margin-right: 1.6em; +} +.tocindent { + margin-left: 0; + margin-right: 2em; +} +div.tright, div.floatright, table.floatright { + clear: none; +} +div.tleft, div.floatleft, table.floatleft { + clear: left; +} + +/* Fix link icons */ +.external { + padding: 0 !important; + background: none !important; +} + +/* js pref toc */ + +#preftoc { + margin-right: 1em; +} + +.errorbox, .successbox, #preftoc li, .prefsection fieldset { + float: right; +} + +.prefsection { + padding-right: 2em; +} + +/* workaround for moz bug, displayed bullets on left side */ + +#toc ul { + text-align: right; +} + +#toc ul ul { + margin: 0 2em 0 0; +} + +input#wpSave, input#wpDiff { + margin-right: 0; + margin-left: .33em; +} + +#userlogin { + float: right; + margin: 0 0 1em 3em; +} +/* Convenience links to edit block, delete and protect reasons */ +p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, +p.mw-filedelete-editreasons, p.mw-delete-editreasons { + float: left; +} + +.toggle { + margin-left: 0em; + margin-right: 2em; +} +table.filehistory th { + text-align: right; +} + +#mw_contentwrapper { + margin: 0 -15em 0 0; + float: left; +} + +#mw_content { + margin: 0 14em 0 0; + border-left: none; + border-right: solid 1px #bbbbbb; +} + +.portlet ul { + margin: 0 1.5em 0 0; + padding: 0 0 0 0; +} + +.portlet h5 { + padding: 0.1em 1em 0.3em 0; +} + +#p-cactions li { + float: right; +} + +#p-personal li { + float: right; +} + +#p-cactions { + margin: 0 14em 0 0; +} + +#mw_portlets { + border-right: none; + border-left: solid 1px #bbbbbb; +} + +/** + * Lists: + * The following lines don't have a visible effect on non-Gecko browsers + * They fix a problem ith Gecko browsers rendering lists to the right of + * left-floated objects in an RTL layout. + */ +html > body div#mw_contentholder ul { + display: table; +} +html > body div#mw_contentholder ul li { + margin-right:10px; +} +html > body div.pBody ul li { + margin-right:4px; +} +html > body div#mw_contentholder ul#filetoc { + display: block; +} diff --git a/skins/modern/video.png b/skins/modern/video.png new file mode 100644 index 00000000..38103dac Binary files /dev/null and b/skins/modern/video.png differ diff --git a/skins/monobook/IE50Fixes.css b/skins/monobook/IE50Fixes.css new file mode 100644 index 00000000..26c3dc97 --- /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..bf78413d --- /dev/null +++ b/skins/monobook/IE60Fixes.css @@ -0,0 +1,87 @@ +/* 6.0 - only fixes */ +/* content area */ +/* workaround for various ie float bugs */ +#column-content { + float: none; + margin-left: 0; + height: 1%; +} +#column-content #content { + margin-left: 12.2em; + margin-top: 3em; + height: 1%; +} +#column-one { + position: absolute; + top: 0; + left: 0; + z-index: 4; +} +#footer { + margin-left: 13.6em; + border-left: 1px solid #fabd23; +} + +/* the tabs */ + +#p-cactions { + z-index: 3; +} + +#p-cactions li { + padding-bottom: 0 !important; + border: none; + background-color: transparent; + cursor: default; + float: none !important; +} +#p-cactions li a { + display: inline-block !important; + vertical-align: top; + padding-bottom: 0; + border: solid #aaa; + border-width: 1px 1px 0; +} +#p-cactions li.selected a { + border-color: #fabd23; + padding-bottom: 0.17em; +} +#p-cactions li a:hover { + padding-bottom: 0.17em; +} +#p-navigation a { + display: inline-block; + width: 100%; +} +#portal-personaltools { + padding-bottom: 0.1em; +} +#bodyContent a.external { + background: url(external.png) center right no-repeat; + padding-right: 13px; +} + +/* show the hand */ +#p-logo a, +#p-logo a:hover { + cursor: pointer; +} +div.visualClear { + width:100%; + line-height: 0; +} +textarea { + width: 96%; +} + +div.editsection, +#catlinks, +div.tright, +div.tleft { + position: relative; +} + +/* bug 12846 */ +body.rtl #preftoc a, body.rtl #preftoc a:active { + float: left; +} diff --git a/skins/monobook/IE70Fixes.css b/skins/monobook/IE70Fixes.css new file mode 100644 index 00000000..43ff7076 --- /dev/null +++ b/skins/monobook/IE70Fixes.css @@ -0,0 +1,74 @@ +/* 7.0 - only fixes */ +/* content area */ +/* workaround for various ie float bugs */ + +/* This bit is needed to make links clickable... WTF */ +#column-content #content { + margin-left: 12.2em; + margin-top: 3em; + height: 1%; +} + +.rtl #column-one { + /* For some reason it tries to inherit the padding-top into every div, + * and I can't figure out how to get it back off. + * Margin works correctly for this use, though. + */ + padding-top: 0; + margin-top: 160px; +} + +/* the tabs */ + +#p-cactions { + z-index: 3; +} + + +#p-cactions li { + padding-bottom: 0 !important; + border: none; + background-color: transparent; + cursor: default; + float: none !important; +} + +#p-cactions li a { + display: inline-block !important; + vertical-align: top; + padding-bottom: 0; + border: solid #aaa; + border-width: 1px 1px 0; +} +#p-cactions li.selected a { + border-color: #fabd23; + padding-bottom: 0.17em; +} +#p-cactions li a:hover { + padding-bottom: 0.17em; +} +#p-navigation a { + display: inline-block; + width: 100%; +} +#portal-personaltools { + padding-bottom: 0.1em; +} +textarea { + width: 96%; +} + +/* +div.editsection, +#catlinks, +div.tright, +div.tleft { + position: relative; +} +*/ + + +#footer li { + /* Work around bug with inline
  • 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..afa3568b --- /dev/null +++ b/skins/monobook/KHTMLFixes.css @@ -0,0 +1,4 @@ +/* KHTML fix stylesheet */ +/* work around the horizontal scrollbars */ +#column-content { margin-left: 0; } + diff --git a/skins/monobook/Opera6Fixes.css b/skins/monobook/Opera6Fixes.css new file mode 100644 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/audio.png b/skins/monobook/audio.png new file mode 100644 index 00000000..1c56bdc8 Binary files /dev/null and b/skins/monobook/audio.png differ diff --git a/skins/monobook/bullet.gif b/skins/monobook/bullet.gif new file mode 100644 index 00000000..b43de48a Binary files /dev/null and b/skins/monobook/bullet.gif differ diff --git a/skins/monobook/discussionitem_icon.gif b/skins/monobook/discussionitem_icon.gif new file mode 100644 index 00000000..baec471a Binary files /dev/null and b/skins/monobook/discussionitem_icon.gif differ diff --git a/skins/monobook/document.png b/skins/monobook/document.png new file mode 100644 index 00000000..b48138e9 Binary files /dev/null and b/skins/monobook/document.png differ diff --git a/skins/monobook/external.png b/skins/monobook/external.png new file mode 100644 index 00000000..419c06fb Binary files /dev/null and b/skins/monobook/external.png differ diff --git a/skins/monobook/file_icon.gif b/skins/monobook/file_icon.gif new file mode 100644 index 00000000..847f6485 Binary files /dev/null and b/skins/monobook/file_icon.gif differ diff --git a/skins/monobook/headbg.jpg b/skins/monobook/headbg.jpg new file mode 100644 index 00000000..5491c6e4 Binary files /dev/null and b/skins/monobook/headbg.jpg differ diff --git a/skins/monobook/link_icon.gif b/skins/monobook/link_icon.gif new file mode 100644 index 00000000..815ccb1b Binary files /dev/null and b/skins/monobook/link_icon.gif differ diff --git a/skins/monobook/lock_icon.gif b/skins/monobook/lock_icon.gif new file mode 100644 index 00000000..8a87e283 Binary files /dev/null and b/skins/monobook/lock_icon.gif differ diff --git a/skins/monobook/magnify-clip.png b/skins/monobook/magnify-clip.png new file mode 100644 index 00000000..992aa2e3 Binary files /dev/null and b/skins/monobook/magnify-clip.png differ diff --git a/skins/monobook/mail_icon.gif b/skins/monobook/mail_icon.gif new file mode 100644 index 00000000..50a87a9a Binary files /dev/null and b/skins/monobook/mail_icon.gif differ diff --git a/skins/monobook/main.css b/skins/monobook/main.css new file mode 100644 index 00000000..7e5809b5 --- /dev/null +++ b/skins/monobook/main.css @@ -0,0 +1,1537 @@ +/* +** MediaWiki 'monobook' style sheet for CSS2-capable browsers. +** Copyright Gabriel Wicke - http://wikidev.net/ +** License: GPL (http://www.gnu.org/copyleft/gpl.html) +** +** Loosely based on http://www.positioniseverything.net/ordered-floats.html by Big John +** and the Plone 2.0 styles, see http://plone.org/ (Alexander Limi,Joe Geldart & Tom Croucher, +** Michael Zeltner and Geir Bækholt) +** All you guys rock :) +*/ + +#column-content { + width: 100%; + float: right; + margin: 0 0 .6em -12.2em; + padding: 0; +} +#content { + margin: 2.8em 0 0 12.2em; + padding: 0 1em 1em 1em; + position: relative; + z-index: 2; +} +#column-one { + padding-top: 160px; +} +#content { + background: white; + color: black; + border: 1px solid #aaa; + border-right: none; + line-height: 1.5em; +} +/* the left column width is specified in class .portlet */ + +/* Font size: +** We take advantage of keyword scaling- browsers won't go below 9px +** More at http://www.w3.org/2003/07/30-font-size +** http://style.cleverchimp.com/font_size_intervals/altintervals.html +*/ + +body { + font: x-small sans-serif; + background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat; + color: black; + margin: 0; + padding: 0; +} + +/* scale back up to a sane default */ +#globalWrapper { + font-size: 127%; + width: 100%; + margin: 0; + padding: 0; +} +.visualClear { + clear: both; +} + +/* general styles */ + +table { + font-size: 100%; + color: black; + /* we don't want the bottom borders of

    s to be visible through + floated tables */ + background-color: white; +} +fieldset table { + /* but keep table layouts in forms clean... */ + background: none; +} +a { + text-decoration: none; + color: #002bb8; + background: none; +} +a:visited { + color: #5a3696; +} +a:active { + color: #faa700; +} +a:hover { + text-decoration: underline; +} +a.stub { + color: #772233; +} +a.new, #p-personal a.new { + color: #ba0000; +} +a.new:visited, #p-personal a.new:visited { + color: #a55858; +} + +img { + border: none; + vertical-align: middle; +} +p { + margin: .4em 0 .5em 0; + line-height: 1.5em; +} +p img { + margin: 0; +} + +hr { + height: 1px; + color: #aaa; + background-color: #aaa; + border: 0; + margin: .2em 0 .2em 0; +} + +h1, h2, h3, h4, h5, h6 { + color: black; + background: none; + font-weight: normal; + margin: 0; + padding-top: .5em; + padding-bottom: .17em; + border-bottom: 1px solid #aaa; +} +h1 { font-size: 188%; } +h1 .editsection { font-size: 53%; } +h2 { font-size: 150%; } +h2 .editsection { font-size: 67%; } +h3, h4, h5, h6 { + border-bottom: none; + font-weight: bold; +} +h3 { font-size: 132%; } +h3 .editsection { font-size: 76%; font-weight: normal; } +h4 { font-size: 116%; } +h4 .editsection { font-size: 86%; font-weight: normal; } +h5 { font-size: 100%; } +h5 .editsection { font-weight: normal; } +h6 { font-size: 80%; } +h6 .editsection { font-size: 125%; font-weight: normal; } + +ul { + line-height: 1.5em; + list-style-type: square; + margin: .3em 0 0 1.5em; + padding: 0; + list-style-image: url(bullet.gif); +} +ol { + line-height: 1.5em; + margin: .3em 0 0 3.2em; + padding: 0; + list-style-image: none; +} +li { + margin-bottom: .1em; +} +dt { + font-weight: bold; + margin-bottom: .1em; +} +dl { + margin-top: .2em; + margin-bottom: .5em; +} +dd { + line-height: 1.5em; + margin-left: 2em; + margin-bottom: .1em; +} + +fieldset { + border: 1px solid #2f6fab; + margin: 1em 0 1em 0; + padding: 0 1em 1em; + line-height: 1.5em; +} +fieldset.nested { + margin: 0 0 0.5em 0; + padding: 0 0.5em 0.5em; +} +legend { + padding: .5em; + font-size: 95%; +} +form { + border: none; + margin: 0; +} + +textarea { + width: 100%; + padding: .1em; +} + +input.historysubmit { + padding: 0 .3em .3em .3em !important; + font-size: 94%; + cursor: pointer; + height: 1.7em !important; + margin-left: 1.6em; +} +select { + vertical-align: top; +} +abbr, acronym, .explain { + border-bottom: 1px dotted black; + color: black; + background: none; + cursor: help; +} +q { + font-family: Times, "Times New Roman", serif; + font-style: italic; +} +/* disabled for now +blockquote { + font-family: Times, "Times New Roman", serif; + font-style: italic; +}*/ +code { + background-color: #f9f9f9; +} +pre { + padding: 1em; + border: 1px dashed #2f6fab; + color: black; + background-color: #f9f9f9; + line-height: 1.1em; +} + +/* +** the main content area +*/ + +#siteSub { + display: none; +} +#jump-to-nav { + display: none; +} + +#contentSub, #contentSub2 { + font-size: 84%; + line-height: 1.2em; + margin: 0 0 1.4em 1em; + color: #7d7d7d; + width: auto; +} +span.subpages { + display: block; +} + +/* Some space under the headers in the content area */ +#bodyContent h1, #bodyContent h2 { + margin-bottom: .6em; +} +#bodyContent h3, #bodyContent h4, #bodyContent h5 { + margin-bottom: .3em; +} +#firstHeading { + margin-bottom: .1em; + /* These two rules hack around bug 2013 (fix for more limited bug 11325). + When bug 2013 is fixed properly, they should be removed. */ + line-height: 1.2em; + padding-bottom: 0; +} + +/* user notification thing */ +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: black; + font-weight: bold; + margin: 2em 0 1em; + padding: .5em 1em; + vertical-align: middle; +} +#siteNotice { + text-align: center; + font-size: 95%; + padding: 0 .9em; +} +#siteNotice p { + margin: 0; + padding: 0; +} +.success { + color: green; + font-size: larger; +} +.error { + color: red; + font-size: larger; +} +.errorbox, .successbox { + font-size: larger; + border: 2px solid; + padding: .5em 1em; + float: left; + margin-bottom: 2em; + color: #000; +} +.errorbox { + border-color: red; + background-color: #fff2f2; +} +.successbox { + border-color: green; + background-color: #dfd; +} +.errorbox h2, .successbox h2 { + font-size: 1em; + font-weight: bold; + display: inline; + margin: 0 .5em 0 0; + border: none; +} + +.catlinks { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + margin-top: 1em; + clear: both; +} +/* currently unused, intended to be used by a metadata box +in the bottom-right corner of the content area */ +.documentDescription { + /* The summary text describing the document */ + font-weight: bold; + display: block; + margin: 1em 0; + line-height: 1.5em; +} +.documentByLine { + text-align: right; + font-size: 90%; + clear: both; + font-weight: normal; + color: #76797c; +} + +/* emulate center */ +.center { + width: 100%; + text-align: center; +} +*.center * { + margin-left: auto; + margin-right: auto; +} +/* small for tables and similar */ +.small, .small * { + font-size: 94%; +} +table.small { + font-size: 100%; +} + +/* +** content styles +*/ + +#toc, +.toc, +.mw-warning { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} +#toc h2, +.toc h2 { + display: inline; + border: none; + padding: 0; + font-size: 100%; + font-weight: bold; +} +#toc #toctitle, +.toc #toctitle, +#toc .toctitle, +.toc .toctitle { + text-align: center; +} +#toc ul, +.toc ul { + list-style-type: none; + list-style-image: none; + margin-left: 0; + padding-left: 0; + text-align: left; +} +#toc ul ul, +.toc ul ul { + margin: 0 0 0 2em; +} +#toc .toctoggle, +.toc .toctoggle { + font-size: 94%; +} + +.mw-warning { + margin-left: 50px; + margin-right: 50px; + text-align: center; +} + +/* images */ +div.floatright, table.floatright { + clear: right; + float: right; + position: relative; + margin: 0 0 .5em .5em; + border: 0; +/* + border: .5em solid white; + border-width: .5em 0 .8em 1.4em; +*/ +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: left; + clear: left; + position: relative; + margin: 0 .5em .5em 0; + border: 0; +/* + margin: .3em .5em .5em 0; + border: .5em solid white; + border-width: .5em 1.4em .8em 0; +*/ +} +div.floatleft p { font-style: italic; } +/* thumbnails */ +div.thumb { + margin-bottom: .5em; + border-style: solid; + border-color: white; + width: auto; +} +div.thumbinner { + border: 1px solid #ccc; + padding: 3px !important; + background-color: #f9f9f9; + font-size: 94%; + text-align: center; + overflow: hidden; +} +html .thumbimage { + border: 1px solid #ccc; +} +html .thumbcaption { + border: none; + text-align: left; + line-height: 1.4em; + padding: 3px !important; + font-size: 94%; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: .5em 0 .8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right: .5em; + border-width: .5em 1.4em .8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} +.hiddenStructure { + display: none; +} + +/* +** classes for special content elements like town boxes +** intended to be referenced directly from the wiki src +*/ + +/* +** User styles +*/ +/* table standards */ +table.rimage { + float: right; + position: relative; + margin-left: 1em; + margin-bottom: 1em; + text-align: center; +} +.toccolours { + border: 1px solid #aaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; +} + +/* +** edit views etc +*/ +.special li { + line-height: 1.4em; + margin: 0; + padding: 0; +} + +/* +** keep the whitespace in front of the ^=, hides rule from konqueror +** this is css3, the validator doesn't like it when validating as css2 +*/ +#bodyContent a.external, +#bodyContent a[href ^="gopher://"] { + background: url(external.png) center right no-repeat; + padding-right: 13px; +} +#bodyContent a[href ^="https://"], +.link-https { + background: url(lock_icon.gif) center right no-repeat; + padding-right: 16px; +} +#bodyContent a[href ^="mailto:"], +.link-mailto { + background: url(mail_icon.gif) center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="news://"] { + background: url(news_icon.png) center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="ftp://"], +.link-ftp { + background: url(file_icon.gif) center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="irc://"], +#bodyContent a.extiw[href ^="irc://"], +.link-irc { + background: url(discussionitem_icon.gif) center right no-repeat; + padding-right: 18px; +} +#bodyContent a.external[href $=".ogg"], #bodyContent a.external[href $=".OGG"], +#bodyContent a.external[href $=".mid"], #bodyContent a.external[href $=".MID"], +#bodyContent a.external[href $=".midi"], #bodyContent a.external[href $=".MIDI"], +#bodyContent a.external[href $=".mp3"], #bodyContent a.external[href $=".MP3"], +#bodyContent a.external[href $=".wav"], #bodyContent a.external[href $=".WAV"], +#bodyContent a.external[href $=".wma"], #bodyContent a.external[href $=".WMA"], +.link-audio { + background: url("audio.png") center right no-repeat; + padding-right: 13px; +} +#bodyContent a.external[href $=".ogm"], #bodyContent a.external[href $=".OGM"], +#bodyContent a.external[href $=".avi"], #bodyContent a.external[href $=".AVI"], +#bodyContent a.external[href $=".mpeg"], #bodyContent a.external[href $=".MPEG"], +#bodyContent a.external[href $=".mpg"], #bodyContent a.external[href $=".MPG"], +.link-video { + background: url("video.png") center right no-repeat; + padding-right: 13px; +} +#bodyContent a.external[href $=".pdf"], #bodyContent a.external[href $=".PDF"], +#bodyContent a.external[href *=".pdf#"], #bodyContent a.external[href *=".PDF#"], +#bodyContent a.external[href *=".pdf?"], #bodyContent a.external[href *=".PDF?"], +.link-document { + background: url("document.png") center right no-repeat; + padding-right: 12px; +} + +/* disable interwiki styling */ +#bodyContent a.extiw, +#bodyContent a.extiw:active { + color: #36b; + background: none; + padding: 0; +} +#bodyContent a.external { + color: #36b; +} +/* this can be used in the content area to switch off +special external link styling */ +#bodyContent .plainlinks a { + background: none !important; + padding: 0 !important; +} +/* +** Structural Elements +*/ + +/* +** general portlet styles (elements in the quickbar) +*/ +.portlet { + border: none; + margin: 0 0 .5em; + padding: 0; + float: none; + width: 11.6em; + overflow: hidden; +} +.portlet h4 { + font-size: 95%; + font-weight: normal; + white-space: nowrap; +} +.portlet h5 { + background: transparent; + padding: 0 1em 0 .5em; + display: inline; + height: 1em; + text-transform: lowercase; + font-size: 91%; + font-weight: normal; + white-space: nowrap; +} +.portlet h6 { + background: #ffae2e; + border: 1px solid #2f6fab; + border-style: solid solid none solid; + padding: 0 1em 0 1em; + text-transform: lowercase; + display: block; + font-size: 1em; + height: 1.2em; + font-weight: normal; + white-space: nowrap; +} +.pBody { + font-size: 95%; + background-color: white; + color: black; + border-collapse: collapse; + border: 1px solid #aaa; + padding: 0 .8em .3em .5em; +} +.portlet h1, +.portlet h2, +.portlet h3, +.portlet h4 { + margin: 0; + padding: 0; +} +.portlet ul { + line-height: 1.5em; + list-style-type: square; + list-style-image: url(bullet.gif); + font-size: 95%; +} +.portlet li { + padding: 0; + margin: 0; +} + +/* +** Logo properties +*/ + +#p-logo { + top: 0; + left: 0; + position: absolute; /*needed to use z-index */ + z-index: 3; + height: 155px; + width: 12em; + overflow: visible; +} +#p-logo h5 { + display: none; +} +#p-logo a, +#p-logo a:hover { + display: block; + height: 155px; + width: 12.2em; + background-repeat: no-repeat; + background-position: 35% 50% !important; + text-decoration: none; +} + +/* +** Search portlet +*/ +#p-search { + position: relative; + z-index: 3; +} +input.searchButton { + margin-top: 1px; + font-size: 95%; +} +#searchGoButton { + padding-left: .5em; + padding-right: .5em; + font-weight: bold; +} +#searchInput { + width: 10.9em; + margin: 0; + font-size: 95%; +} +#p-search .pBody { + padding: .5em .4em .4em .4em; + text-align: center; +} + +/* +** the personal toolbar +*/ +#p-personal { + position: absolute; + left: 0; + top: 0; + z-index: 0; +} +#p-personal { + width: 100%; + white-space: nowrap; + padding: 0; + margin: 0; + border: none; + background: none; + overflow: visible; + line-height: 1.2em; +} +#p-personal h5 { + display: none; +} +#p-personal .portlet, +#p-personal .pBody { + z-index: 0; + padding: 0; + margin: 0; + border: none; + overflow: visible; + background: none; +} +/* this is the ul contained in the portlet */ +#p-personal ul { + border: none; + line-height: 1.4em; + color: #2f6fab; + padding: 0 2em 0 3em; + margin: 0; + text-align: right; + list-style: none; + z-index: 0; + background: none; + cursor: default; +} +#p-personal li { + z-index: 0; + border: none; + padding: 0; + display: inline; + color: #2f6fab; + margin-left: 1em; + line-height: 1.2em; + background: none; +} +#p-personal li a { + text-decoration: none; + color: #005896; + padding-bottom: .2em; + background: none; +} +#p-personal li a:hover { + background-color: white; + padding-bottom: .2em; + text-decoration: none; +} +#p-personal li.active a:hover { + background-color: transparent; +} +/* the icon in front of the user name, single quotes +in bg url to hide it from iemac */ +li#pt-userpage, +li#pt-anonuserpage, +li#pt-login { + background: url(user.gif) top left no-repeat; + padding-left: 20px; + text-transform: none; +} +#p-personal ul { + text-transform: lowercase; +} +#p-personal li.active { + font-weight: bold; +} +/* +** the page-related actions- page/talk, edit etc +*/ +#p-cactions { + position: absolute; + top: 1.3em; + left: 11.5em; + margin: 0; + white-space: nowrap; + width: 76%; + line-height: 1.1em; + overflow: visible; + background: none; + border-collapse: collapse; + padding-left: 1em; + list-style: none; + font-size: 95%; +} +#p-cactions ul { + list-style: none; +} +#p-cactions li { + display: inline; + border: 1px solid #aaa; + border-bottom: none; + padding: 0 0 .1em 0; + margin: 0 .3em 0 0; + overflow: visible; + background: white; +} +#p-cactions li.selected { + border-color: #fabd23; + padding: 0 0 .2em 0; + font-weight: bold; +} +#p-cactions li a { + background-color: #fbfbfb; + color: #002bb8; + border: none; + padding: 0 .8em .3em; + position: relative; + z-index: 0; + margin: 0; + text-decoration: none; +} +#p-cactions li.selected a { + z-index: 3; + padding: 0 1em .2em!important; + background-color: white; +} +#p-cactions .new a { + color: #ba0000; +} +#p-cactions li a:hover { + z-index: 3; + text-decoration: none; + background-color: white; +} +#p-cactions h5 { + display: none; +} +#p-cactions li.istalk { + margin-right: 0; +} +#p-cactions li.istalk a { + padding-right: .5em; +} +#p-cactions #ca-addsection a { + padding-left: .4em; + padding-right: .4em; +} +/* offsets to distinguish the tab groups */ +li#ca-talk { + margin-right: 1.6em; +} +li#ca-watch, li#ca-unwatch, li#ca-varlang-0, li#ca-print { + margin-left: 1.6em; +} +#p-cactions .pBody { + font-size: 1em; + background-color: transparent; + color: inherit; + border-collapse: inherit; + border: 0; + padding: 0; +} +#p-cactions .hiddenStructure { + display: none; +} +#p-cactions li a { + text-transform: lowercase; +} + +#p-lang { + position: relative; + z-index: 3; +} + +/* TODO: #t-iscite is only used by the Cite extension, come up with some + * system which allows extensions to add to this file on the fly + */ +#t-ispermalink, #t-iscite { + color: #999; +} +/* +** footer +*/ +#footer { + background-color: white; + border-top: 1px solid #fabd23; + border-bottom: 1px solid #fabd23; + margin: .6em 0 1em 0; + padding: .4em 0 1.2em 0; + text-align: center; + font-size: 90%; +} +#footer li { + display: inline; + margin: 0 1.3em; +} +#f-poweredbyico, #f-copyrightico { + margin: 0 8px; + position: relative; + top: -2px; /* Bump it up just a tad */ +} +#f-poweredbyico { + float: right; + height: 1%; +} +#f-copyrightico { + float: left; + height: 1%; +} + +/* js pref toc */ +#preftoc { + margin: 0; + padding: 0; + width: 100%; + clear: both; +} +#preftoc li { + background-color: #f0f0f0; + color: #000; +} +#preftoc li { + margin: 1px -2px 1px 2px; + float: left; + padding: 2px 0 3px 0; + border: 1px solid #fff; + border-right-color: #716f64; + border-bottom: 0; + position: relative; + white-space: nowrap; + list-style-type: none; + list-style-image: none; + z-index: 3; +} +#preftoc li.selected { + font-weight: bold; + background-color: #f9f9f9; + border: 1px solid #aaa; + border-bottom: none; + cursor: default; + top: 1px; + padding-top: 2px; + margin-right: -3px; +} +#preftoc > li.selected { + top: 2px; +} +#preftoc a, +#preftoc a:active { + display: block; + color: #000; + padding: 0 .7em; + position: relative; + text-decoration: none; +} +#preftoc li.selected a { + cursor: default; + text-decoration: none; +} +#prefcontrol { + padding-top: 2em; + clear: both; +} +#preferences { + margin: 0; + border: 1px solid #aaa; + clear: both; + padding: 1.5em; + background-color: #F9F9F9; +} +.prefsection { + border: none; + padding: 0; + margin: 0; +} +.prefsection fieldset { + border: 1px solid #aaa; + float: left; + margin-right: 2em; +} +.prefsection legend { + font-weight: bold; +} +.prefsection table, .prefsection legend { + background-color: #F9F9F9; +} +.mainLegend { + display: none; +} +div.prefsectiontip { + font-size: x-small; + padding: .2em 2em; + color: #666; +} +.btnSavePrefs { + font-weight: bold; + padding-left: .3em; + padding-right: .3em; +} + +.preferences-login { + clear: both; + margin-bottom: 1.5em; +} + +.prefcache { + font-size: 90%; + margin-top: 2em; +} + +div#userloginForm form, +div#userlogin form#userlogin2 { + margin: 0 3em 1em 0; + border: 1px solid #aaa; + clear: both; + padding: 1.5em 2em; + background-color: #f9f9f9; + float: left; +} +.rtl div#userloginForm form, +.rtl div#userlogin form#userlogin2 { + float: right; +} + +div#userloginForm table, +div#userlogin form#userlogin2 table { + background-color: #f9f9f9; +} + +div#userloginForm h2, +div#userlogin form#userlogin2 h2 { + padding-top: 0; +} + +div#userlogin .captcha, +div#userloginForm .captcha { + border: 1px solid #bbb; + padding: 1.5em 2em; + background-color: white; +} + +#loginend, #signupend { + clear: both; +} + +#userloginprompt, #languagelinks { + font-size: 85%; +} + +#login-sectiontip { + font-size: 85%; + line-height: 1.2; + padding-top: 2em; +} + +#userlogin .loginText, #userlogin .loginPassword { + width: 12em; +} + +#userloginlink a, #wpLoginattempt, #wpCreateaccount { + font-weight: bold; +} + +/* +** IE/Mac fixes, hope to find a validating way to move this +** to a separate stylesheet. This would work but doesn't validate: +** @import("IEMacFixes.css"); +*/ +/* tabs: border on the a, not the div */ +* > html #p-cactions li { border: none; } +* > html #p-cactions li a { + border: 1px solid #aaa; + border-bottom: none; +} +* > html #p-cactions li.selected a { border-color: #fabd23; } +/* footer icons need a fixed width */ +* > html #f-poweredbyico, +* > html #f-copyrightico { width: 88px; } +* > html #bodyContent, +* > html #bodyContent pre { + overflow-x: auto; + width: 100%; + padding-bottom: 25px; +} + +/* more IE fixes */ +/* float/negative margin brokenness */ +* html #footer {margin-top: 0;} +* html #column-content { + display: inline; + margin-bottom: 0; +} +* html div.editsection { font-size: smaller; } +#pagehistory li.selected { position: relative; } + +/* Mac IE 5.0 fix; floated content turns invisible */ +* > html #column-content { + float: none; +} +* > html #column-one { + position: absolute; + left: 0; + top: 0; +} +* > html #footer { + margin-left: 13.2em; +} +.redirectText { + font-size: 150%; + margin: 5px; +} + +.printfooter { + display: none; +} + +.not-patrolled { + background-color: #ffa; +} +div.patrollink { + clear: both; + font-size: 75%; + text-align: right; +} +span.newpage, span.minor, span.bot { + font-weight: bold; +} +span.unpatrolled { + font-weight: bold; + color: red; +} + +.sharedUploadNotice { + font-style: italic; +} + +span.updatedmarker { + color: black; + background-color: #0f0; +} + +table.gallery { + border: 1px solid #ccc; + margin: 2px; + padding: 2px; + background-color: white; +} + +table.gallery tr { + vertical-align: top; +} + +table.gallery td { + vertical-align: top; + background-color: #f9f9f9; + border: solid 2px white; +} +/* Keep this temporarily so that cached pages will display right */ +table.gallery td.galleryheader { + text-align: center; + font-weight: bold; +} +table.gallery caption { + font-weight: bold; +} + +div.gallerybox { + margin: 2px; +} + +div.gallerybox div.thumb { + text-align: center; + border: 1px solid #ccc; + margin: 2px; +} + +div.gallerytext { + overflow: hidden; + font-size: 94%; + padding: 2px 4px; +} + +span.comment { + font-style: italic; +} + +span.changedby { + font-size: 95%; +} + +.previewnote { + text-indent: 3em; + color: #c00; + border-bottom: 1px solid #aaa; + padding-bottom: 1em; + margin-bottom: 1em; +} + +.previewnote p { + margin: 0; + padding: 0; +} + +.editExternally { + border: 1px solid gray; + background-color: #ffffff; + padding: 3px; + margin-top: 0.5em; + float: left; + font-size: small; + text-align: center; +} +.editExternallyHelp { + font-style: italic; + color: gray; +} + +.toggle { + margin-left: 2em; + text-indent: -2em; +} + +/* Classes for EXIF data display */ +table.mw_metadata { + font-size: 0.8em; + margin-left: 0.5em; + margin-bottom: 0.5em; + width: 300px; +} + +table.mw_metadata caption { + font-weight: bold; +} + +table.mw_metadata th { + font-weight: normal; +} + +table.mw_metadata td { + padding: 0.1em; +} + +table.mw_metadata { + border: none; + border-collapse: collapse; +} + +table.mw_metadata td, table.mw_metadata th { + text-align: center; + border: 1px solid #aaaaaa; + padding-left: 0.1em; + padding-right: 0.1em; +} + +table.mw_metadata th { + background-color: #f9f9f9; +} + +table.mw_metadata td { + background-color: #fcfcfc; +} + +table.collapsed tr.collapsable { + display: none; +} + + +/* filetoc */ +ul#filetoc { + text-align: center; + border: 1px solid #aaaaaa; + background-color: #f9f9f9; + padding: 5px; + font-size: 95%; + margin-bottom: 0.5em; + margin-left: 0; + margin-right: 0; +} + +#filetoc li { + display: inline; + list-style-type: none; + padding-right: 2em; +} + +input#wpSummary { + width: 80%; +} + +/* @bug 1714 */ +input#wpSave, input#wpDiff { + margin-right: 0.33em; +} + +#wpSave { + font-weight: bold; +} + +/* Classes for article validation */ + +table.revisionform_default { + border: 1px solid #000000; +} + +table.revisionform_focus { + border: 1px solid #000000; + background-color:#00BBFF; +} + +tr.revision_tr_default { + background-color:#EEEEEE; +} + +tr.revision_tr_first { + background-color:#DDDDDD; +} + +p.revision_saved { + color: green; + font-weight:bold; +} + +#mw_trackbacks { + border: solid 1px #bbbbff; + background-color: #eeeeff; + padding: 0.2em; +} + + +/* Allmessages table */ + +#allmessagestable th { + background-color: #b2b2ff; +} + +#allmessagestable tr.orig { + background-color: #ffe2e2; +} + +#allmessagestable tr.new { + background-color: #e2ffe2; +} + +#allmessagestable tr.def { + background-color: #f0f0ff; +} + + +/* noarticletext */ +div.noarticletext { + border: 1px solid #ccc; + background: #fff; + padding: .2em 1em; + color: #000; +} + +div#searchTargetContainer { + left: 10px; + top: 10px; + width: 90%; + background: white; +} + +div#searchTarget { + padding: 3px; + margin: 5px; + background: #F0F0F0; + border: solid 1px blue; +} + +div#searchTarget ul li { + list-style: none; +} + +div#searchTarget ul li:before { + color: orange; + content: "\00BB \0020"; +} + +div#searchTargetHide { + float:right; + border:solid 1px black; + background:#DCDCDC; + padding:2px; +} + +#powersearch p { + margin-top:0px; +} + +div.multipageimagenavbox { + border: solid 1px silver; + padding: 4px; + margin: 1em; + background: #f0f0f0; +} + +div.multipageimagenavbox div.thumb { + border: none; + margin-left: 2em; + margin-right: 2em; +} + +div.multipageimagenavbox hr { + margin: 6px; +} + +table.multipageimage td { + text-align: center; +} + +/** Special:Version */ + +table#sv-ext, table#sv-hooks, table#sv-software { + margin: 1em; + padding:0em; +} + +#sv-ext td, #sv-hooks td, #sv-software td, +#sv-ext th, #sv-hooks th, #sv-software th { + border: 1px solid #A0A0A0; + padding: 0 0.15em 0 0.15em; +} +#sv-ext th, #sv-hooks th, #sv-software th { + background-color: #F0F0F0; + color: black; + padding: 0 0.15em 0 0.15em; +} +tr.sv-space{ + height: 0.8em; + border:none; +} +tr.sv-space td { display: none; } + +/* + Table pager (e.g. Special:Imagelist) + - remove underlines from the navigation link + - collapse borders + - set the borders to outsets (similar to Special:Allmessages) + - remove line wrapping for all td and th, set background color + - restore line wrapping for the last two table cells (description and size) +*/ +.TablePager { min-width: 80%; } +.TablePager_nav a { text-decoration: none; } +.TablePager { border-collapse: collapse; } +.TablePager, .TablePager td, .TablePager th { + border: 1px solid #aaaaaa; + padding: 0 0.15em 0 0.15em; +} +.TablePager th { background-color: #eeeeff } +.TablePager td { background-color: #ffffff } +.TablePager tr:hover td { background-color: #eeeeff } + +.imagelist td, .imagelist th { white-space: nowrap } +.imagelist .TablePager_col_links { background-color: #eeeeff } +.imagelist .TablePager_col_img_description { white-space: normal } +.imagelist th.TablePager_sort { background-color: #ccccff } + +.templatesUsed { margin-top: 1.5em; } + +.mw-summary-preview { + margin: 0.1em 0; +} + +/* Friendlier slave lag warnings */ +div.mw-lag-warn-normal, +div.mw-lag-warn-high { + padding: 3px; + text-align: center; + margin: 3px auto; +} +div.mw-lag-warn-normal { + border: 1px solid #FFCC66; + background-color: #FFFFCC; +} +div.mw-lag-warn-high { + font-weight: bold; + border: 2px solid #FF0033; + background-color: #FFCCCC; +} + +.MediaTransformError { + background-color: #ccc; + padding: 0.1em; +} +.MediaTransformError td { + text-align: center; + vertical-align: middle; + font-size: 90%; +} + +/** Special:Search stuff */ +div#mw-search-interwiki-caption { + text-align: center; + font-weight: bold; + font-size: 95%; +} + +.mw-search-interwiki-project { + font-size: 97%; + text-align: left; + padding-left: 0.2em; + padding-right: 0.15em; + padding-bottom: 0.2em; + padding-top: 0.15em; + background: #cae8ff; +} + +/* God-damned hack for the crappy layout */ +.os-suggest { + font-size: 127%; +} diff --git a/skins/monobook/news_icon.png b/skins/monobook/news_icon.png new file mode 100644 index 00000000..dd1541d1 Binary files /dev/null and b/skins/monobook/news_icon.png differ diff --git a/skins/monobook/required.gif b/skins/monobook/required.gif new file mode 100644 index 00000000..bd719769 Binary files /dev/null and b/skins/monobook/required.gif differ diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css new file mode 100644 index 00000000..fbd5ab35 --- /dev/null +++ b/skins/monobook/rtl.css @@ -0,0 +1,233 @@ +/* +Right-to-left fixes for MonoBook. +Places sidebar on right, tweaks various alignment issues. + +Works mostly ok nicely on Safari 1.2.1; fine in Mozilla. + +Safari bugs (1.2.1): +* Tabs are still appearing in left-to-right order. (Try after localizing) + +Opera bugs (7.23 linux): +* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other + +IE/mac bugs: +* The thing barfs on Hebrew and Arabic anyway, so no point testing. + +Missing features due to lack of support: +* external link icons + +To test: +* Opera6 +* IE 5.0 +* etc + +*/ +body { + direction: rtl; + unicode-bidi: embed; +} +#column-content { + margin: 0 -12.2em 0 0; + float: left; +} +#column-content #content{ + margin-left: 0; + margin-right: 12.2em; + border-right: 1px solid #aaaaaa; + border-left: none; +} +html > body .portlet { + float: right; + clear: right; +} +.editsection { + float: left; + margin-right: 5px; + margin-left: 0; /* bug 9122: undo default LTR */ +} +/* recover IEMac (might be fine with the float, but usually it's close to IE */ +*>body .portlet { + float: none; + clear: none; +} +.pBody { + padding-right: 0.8em; + padding-left: 0.5em; +} + +/* Fix alignment */ +.documentByLine, +.portletDetails, +.portletMore, +#p-personal { + text-align: left; +} + +div div.thumbcaption { + text-align: right; +} + +div.magnify, +#p-logo { + left: auto; + right: 0; +} +#p-personal { + left: auto; + right: 0; +} + +#p-cactions { + left: auto; + right: 11.5em; + padding-left: 0; + padding-right: 1em; +} +#p-cactions li { + margin-left: 0.3em; + margin-right: 0; + float: right; +} +* html #p-cactions li a { + display: block; + padding-bottom: 0; +} +* html #p-cactions li a:hover { + padding-bottom: 0.2em; +} +/* offsets to distinguish the tab groups */ +li#ca-talk { + margin-right: auto; + margin-left: 1.6em; +} +li#ca-watch,li#ca-unwatch { + margin-right: 1.6em !important; +} + +/* Fix margins for non-css2 browsers */ +/* top right bottom left */ + +ul { + margin-left: 0; + margin-right: 1.5em; +} +ol { + margin-left: 0; + margin-right: 2.4em; +} +dd { + margin-left: 0; + margin-right: 1.6em; +} +#contentSub { + margin-right: 1em; + margin-left: 0; +} +.tocindent { + margin-left: 0; + margin-right: 2em; +} +div.tright, div.floatright, table.floatright { + clear: none; +} +div.tleft, div.floatleft, table.floatleft { + clear: left; +} +#p-personal li { + margin-left: 0; + margin-right: 1em; +} + +li#ca-talk, +li#ca-watch { + margin-right: auto; + margin-left: 1.6em; +} + +#p-personal li { + float: left; +} +/* Fix link icons */ +.external { + padding: 0 !important; + background: none !important; +} +#footer { + clear: both; +} +* html #footer { + margin-left: 0; + margin-right: 13.6em; + border-left: 0; + border-right: 1px solid #fabd23; +} +* html #column-content { + float: none; + margin-left: 0; + margin-right: 0; +} +* html #column-content #content { + margin-left: 0; + margin-top: 3em; +} +* html #column-one { right: 0; } + +/* js pref toc */ + +#preftoc { + margin-right: 1em; +} + +.errorbox, .successbox, #preftoc li, .prefsection fieldset { + float: right; +} + +.prefsection { + padding-right: 2em; +} + +/* workaround for moz bug, displayed bullets on left side */ + +#toc ul { + text-align: right; +} + +#toc ul ul { + margin: 0 2em 0 0; +} + +input#wpSave, input#wpDiff { + margin-right: 0; + margin-left: .33em; +} + +#userlogin { + float: right; + margin: 0 0 1em 3em; +} +/* Convenience links to edit block, delete and protect reasons */ +p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, +p.mw-filedelete-editreasons, p.mw-delete-editreasons { + float: left; +} + +.toggle { + margin-left: 0em; + margin-right: 2em; +} +table.filehistory th { + text-align: right; +} + +/** + * Lists: + * The following lines don't have a visible effect on non-Gecko browsers + * They fix a problem ith Gecko browsers rendering lists to the right of + * left-floated objects in an RTL layout. + */ +html > body div#bodyContent ul { + display: table; +} +html > body div#bodyContent ul#filetoc { + display: block; +} diff --git a/skins/monobook/user.gif b/skins/monobook/user.gif new file mode 100644 index 00000000..c9c9ab96 Binary files /dev/null and b/skins/monobook/user.gif differ diff --git a/skins/monobook/video.png b/skins/monobook/video.png new file mode 100644 index 00000000..38103dac Binary files /dev/null and b/skins/monobook/video.png differ diff --git a/skins/monobook/wiki-indexed.png b/skins/monobook/wiki-indexed.png new file mode 100644 index 00000000..189a2ae3 Binary files /dev/null and b/skins/monobook/wiki-indexed.png differ diff --git a/skins/monobook/wiki.png b/skins/monobook/wiki.png new file mode 100644 index 00000000..69fce988 Binary files /dev/null and b/skins/monobook/wiki.png differ diff --git a/skins/myskin/main.css b/skins/myskin/main.css new file mode 100644 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 new file mode 100644 index 00000000..baec471a Binary files /dev/null and b/skins/simple/discussionitem_icon.gif differ diff --git a/skins/simple/external.png b/skins/simple/external.png new file mode 100644 index 00000000..419c06fb Binary files /dev/null and b/skins/simple/external.png differ diff --git a/skins/simple/file_icon.gif b/skins/simple/file_icon.gif new file mode 100644 index 00000000..847f6485 Binary files /dev/null and b/skins/simple/file_icon.gif differ diff --git a/skins/simple/link_icon.gif b/skins/simple/link_icon.gif new file mode 100644 index 00000000..815ccb1b Binary files /dev/null and b/skins/simple/link_icon.gif differ diff --git a/skins/simple/lock_icon.gif b/skins/simple/lock_icon.gif new file mode 100644 index 00000000..8a87e283 Binary files /dev/null and b/skins/simple/lock_icon.gif differ diff --git a/skins/simple/mail_icon.gif b/skins/simple/mail_icon.gif new file mode 100644 index 00000000..50a87a9a Binary files /dev/null and b/skins/simple/mail_icon.gif differ diff --git a/skins/simple/main.css b/skins/simple/main.css new file mode 100644 index 00000000..6f3e8eb8 --- /dev/null +++ b/skins/simple/main.css @@ -0,0 +1,391 @@ +/* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ + +h1 { font-size: 2em; } +h2 { font-size: 1.5em; } +h3 { font-size: 1.17em; } +h5 { font-size: .83em; } +h6 { font-size: .75em; } +h1, h2, h3, h4, h5, h6 { font-weight: bolder } + +/* Now the custom parts */ + +/* Make edit sections (which are inside h# tags) normal-sized */ +.editsection { + font-weight: normal; +} +h1 .editsection { font-size: 50% } +h2 .editsection { font-size: 66.7% } +h3 .editsection { font-size: 85.5% } +h5 .editsection { font-size: 120% } +h6 .editsection { font-size: 133% } + + +#toolbar { + display: none; +} + +div.center { + text-align: center; +} + +#contentSub { + padding-left: 2em; +} + +a { + text-decoration: none; +} + +a:hover { + text-decoration: underline; +} + +#column-content { + width: 100%; + float: right; + margin: 0 0 0.6em -12.2em; + padding:0; +} + +#content { + margin: 0em 0 0 12.2em; + padding: 0em 1em 1.5em 1em; + border-left: 1px solid #959595; + line-height: 1.5em; +} + +#column-one { + position: absolute; + top: 0px; left: 0px; +} + +#footer { + display: none; +} + +body { + margin: 0; + padding: 0; +} + +#globalWrapper { + width: 100%; + height: 100%; + margin: 0; + padding: 0; +} +.visualClear { clear: both; } + +img { + border: none; +} +p { + margin: 0.4em 0em 0.5em 0em; + line-height: 1.5em; +} +p img { margin: 0; } + +h1, h2, h3, h4, h5, h6 { + margin: 0; + padding-top: 0.5em; + padding-bottom: 0.17em; +} +fieldset { + margin: 1em 0em 1em 0em; + padding: 0em 1em 1em 1em; +} +.usermessage { + background-color: #ffce7b; + border: 1px solid #ffa500; + color: Black; + font-weight: bold; + margin: 2em 0em 1em 0em; + padding: 0.5em 1em; + vertical-align: middle; +} +.error { + color: red; + font-size: larger; +} + +table.rimage { + float:right; + position:relative; + margin-left:1em; + margin-bottom:1em; + text-align:center; +} + +.portlet { + border: none; + float: none; + padding: 0; + width: 11.8em; + overflow: hidden; +} +.portlet h4 { + font-weight: normal; + white-space: nowrap; +} +.portlet h5 { + padding: 0em 1em 0em 0.5em; + display: inline; + height: 1em; + font-weight: normal; + white-space: nowrap; +} +.portlet h6 { + padding: 0em 1em 0em 1em; + display: block; + height: 1.2em; + font-weight: normal; + white-space: nowrap; +} +.pBody { + border-collapse: collapse; + padding: 0 0.8em 0.3em 0.5em; +} +.portlet h1, +.portlet h2, +.portlet h3, +.portlet h4 { + margin: 0; + padding: 0; + font-size: small; +} + +#p-search .pBody { + text-align: center; +} + +#searchInput { + width: 100%; + clear: both; + margin: 0 0 0 0; +} + +input.searchButton { + margin-top:1px; + padding: 0 0.4em; + cursor: pointer; +} + +#p-search .pBody { + padding: 0.5em 0.4em 0.4em 0.4em; +} + +textarea { + width: 100%; +} + +.pBody li, .pBody ul { + padding-left: 0em; + margin-left: 0.5em; +} + +pre { + margin: 2em; + border: solid 1px black; +} + +h1.firstHeading, h2 { + border-bottom: solid 1px black; +} +#bodyContent a[href ^="http://"], +#bodyContent a[href ^="gopher://"] { + background: url("external.png") center right no-repeat; + padding-right: 13px; +} +#bodyContent a[href ^="https://"], +.link-https { + background: url("lock_icon.gif") center right no-repeat; + padding-right: 16px; +} +#bodyContent a[href ^="mailto:"], +.link-mailto { + background: url("mail_icon.gif") center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="news://"] { + background: url("news_icon.png") center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="ftp://"], +.link-ftp { + background: url("file_icon.gif") center right no-repeat; + padding-right: 18px; +} +#bodyContent a[href ^="irc://"], +#bodyContent a.extiw[href ^="irc://"], +.link-irc { + background: url("discussionitem_icon.gif") center right no-repeat; + padding-right: 18px; +} + +#bodyContent a.extiw, +#bodyContent a.extiw:active { + color: #5E7CFF; + background: none; + padding: 0; +} + +td.diff-addedline { + background-color: #B9FFB0; +} + +td.diff-deletedline { + background-color: #f8ffaa; +} + +.diffchange { background-color: #FFCDF3; text-decoration: none; } +#pagehistory li { border: none; } + +span.urlexpansion { + display: none; +} + +div.tocindent { + margin-left: 2em; +} +#toc { + text-align: left; + border-top: solid 1px black; + border-bottom: solid 1px black; +} + +div.floatright, table.floatright { + clear: right; + float: right; + margin: 0; + position: relative; + border-width: 0.5em 0 0.8em 1.4em; +} +div.floatright p { font-style: italic; } +div.floatleft, table.floatleft { + float: left; + clear: left; + margin: 0.3em 0.5em 0.5em 0; + position: relative; + border-width: 0.5em 1.4em 0.8em 0; +} +div.floatleft p { font-style: italic; } +/* thumbnails */ +div.thumb { + margin-bottom: 0.5em; + width: auto; +} +div.thumb div { + padding: 3px !important; + text-align: center; + overflow: hidden; +} + +div.thumb div div.thumbcaption { + border: none; + text-align: left; + line-height: 1.4; + padding: 0.3em 0 0.1em 0; +} +div.magnify { + float: right; + border: none !important; + background: none !important; +} +div.magnify a, div.magnify img { + display: block; + border: none !important; + background: none !important; +} +div.tright { + clear: right; + float: right; + border-width: 0.5em 0 0.8em 1.4em; +} +div.tleft { + float: left; + clear: left; + margin-right:0.5em; + border-width: 0.5em 1.4em 0.8em 0; +} +img.thumbborder { + border: 1px solid #dddddd; +} + +a.stub { color: #772233; } +a.new, +#p-personal a.new { + text-decoration: line-through; +} +li.new { + text-decoration: line-through; +} +.catlinks { + text-align: center; + width: 80%; + margin-left: auto; + margin-right: auto; + padding: 3px; +} + +#mytabs { + background-color: inherit; +} +#p-cactions { + background-color: inherit; +} +div.printfooter { + display: none; +} + +#n-portal, +#n-currentevents, +#n-help, +#n-sitesupport { + display: none; +} + +#preftoc { + float: left; + margin: 1em; + width: 13em; +} +#preftoc li { +} +#preftoc li.selected { + border: 1px dashed #aaa; +} +#preftoc a, +#preftoc a:active { + display: block; +} +#prefcontrol { + clear: both; + float: left; + margin-top: 1em; +} +div.prefsectiontip { + font-size: 95%; + margin-top: 1em; +} + +#mw_trackbacks { + border-style: groove; + padding: 0.2em; +} + +#jump-to-nav { + display: none; +} + +table.collapsed tr.collapsable { + display: none; +} + +.editsection { + float: right; + margin-left: 5px; +} + +.templatesUsed { margin-top: 1.5em; } + diff --git a/skins/simple/rtl.css b/skins/simple/rtl.css new file mode 100644 index 00000000..1ba1431d --- /dev/null +++ b/skins/simple/rtl.css @@ -0,0 +1,176 @@ +/* +Right-to-left fixes for Simple. +Places sidebar on right, tweaks various alignment issues. + +Works mostly ok nicely on Safari 1.2.1; fine in Mozilla. + +Safari bugs (1.2.1): +* Tabs are still appearing in left-to-right order. (Try after localizing) + +Opera bugs (7.23 linux): +* Some bits of ltr text (sidebar box titles) have forward and backward versions overlapping each other + +IE/mac bugs: +* The thing barfs on Hebrew and Arabic anyway, so no point testing. + +Missing features due to lack of support: +* external link icons + +To test: +* Opera6 +* IE 5.0 +* etc + +*/ +body { + direction: rtl; + unicode-bidi: embed; +} +#column-content { + margin: 0 -12.2em 0 0; + float: left; +} +#column-content #content{ + margin-left: 0; + margin-right: 12.2em; + border-right: 1px solid #aaaaaa; + border-left: none; +} +html>body .portlet { + float: right; + clear: right; +} +.editsection { + float: left; + margin-right: 5px; + margin-left: 0; /* bug 9122: undo default LTR */ +} +/* recover IEMac (might be fine with the float, but usually it's close to IE */ +*>body .portlet { + float: none; + clear: none; +} +.pBody { + padding: 0 0.5em 0.3em 0.8em; +} + +/* Fix alignment */ +.documentByLine, +.portletDetails, +.portletMore { + text-align: left; +} + +div div.thumbcaption { + text-align: right; +} + +div.magnify, +#p-logo { + left: auto; + right: 0; +} + +/* Fix margins for non-css2 browsers */ +/* top right bottom left */ + +dd { + margin-left: 0; + margin-right: 1.6em; +} +#contentSub { + margin-right: 1em; + margin-left: 0; +} +.tocindent { + margin-left: 0; + margin-right: 2em; +} +div.tright, div.floatright, table.floatright { + clear: none; +} +div.tleft, div.floatleft, table.floatleft { + clear: left; +} + +/* Fix link icons */ +.external { + padding: 0 !important; + background: none !important; +} +#footer { + clear: both; +} +* html #footer { + margin-left: 0; + margin-right: 13.6em; + border-left: 0; + border-right: 1px solid #fabd23; +} +* html #column-content { + float: none; + margin-left: 0; + margin-right: 0; +} +* html #column-content #content { + margin-left: 0; + margin-top: 3em; +} +* html #column-one { right: 0; } + +/* js pref toc */ + +#preftoc { + margin-right: 1em; +} + +.errorbox, .successbox, #preftoc li, .prefsection fieldset { + float: right; +} + +.prefsection { + padding-right: 2em; +} + +/* workaround for moz bug, displayed bullets on left side */ + +#toc ul { + text-align: right; +} + +#toc ul ul { + margin: 0 2em 0 0; +} + +input#wpSave, input#wpDiff { + margin-right: 0; + margin-left: .33em; +} + +#userlogin { + float: right; + margin: 0 0 1em 3em; +} +/* Convenience links to edit block, delete and protect reasons */ +p.mw-ipb-conveniencelinks, p.mw-protect-editreasons, +p.mw-filedelete-editreasons, p.mw-delete-editreasons { + float: left; +} + +.toggle { + margin-left: 0em; + margin-right: 2em; +} +table.filehistory th { + text-align: right; +} + +/** + * Lists: + * The following lines don't have a visible effect on non-Gecko browsers + * They fix a problem ith Gecko browsers rendering lists to the right of + * left-floated objects in an RTL layout. + */ +html > body div#bodyContent ul { + display: table; +}