Jack Phoenix has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/221034

Change subject: Lots and lots of cleanup; requires at least MW 1.24 (in 
theory), but in practise tested only against MW 1.25
......................................................................

Lots and lots of cleanup; requires at least MW 1.24 (in theory), but in 
practise tested only against MW 1.25

Some of the changes include:
* fixed logging in via the skin's integrated login box
* removed legacy PHP i18n file/wrapper
* added skin.json file for MW 1.25+
* removed legacy external links CSS files in favor of the core RL module
* got rid of the BeforePageDisplay hook in favor of defining the things in 
SkinBlueSky::initPage()
* removed some wikiHow-specific bits 'n' pieces

Change-Id: Iedbcf359cc7d0a88a6e142901b59ac94caa3ddd5
---
M BlueSky.hooks.php
D BlueSky.i18n.php
M BlueSky.php
M BlueSky.skin.php
M i18n/fi.json
D resources/css/externallinks-123.css
D resources/css/externallinks-124.css
A skin.json
M templates/userloginbox.tmpl.php
9 files changed, 331 insertions(+), 413 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSky 
refs/changes/34/221034/1

diff --git a/BlueSky.hooks.php b/BlueSky.hooks.php
index 4ab5557..dc4e78f 100644
--- a/BlueSky.hooks.php
+++ b/BlueSky.hooks.php
@@ -5,74 +5,13 @@
  */
 class SkinBlueSkyHooks {
        /**
-       * TOC processing
-       * Shamelessly stolen from brickimedia's refreshed skin
-       * Currently: 
https://github.com/Brickimedia/Refreshed/blob/master/Refreshed.skin.php#L72
-       */
-
-       public static function wfTOCCrap( OutputPage &$out, ParserOutput 
$parseroutput ) {
-               global $blueSkyTOC;
-               $blueSkyTOC = $parseroutput->mSections;
-
-               return true;
-       }
-
-       public static function onBeforePageDisplayCrap( OutputPage &$out, 
&$skin ) {
-               //global $wgRequest, $wgUser;
-
-               // Hooks are global, but we want these things *only* for this 
skin.
-               if ( get_class( $skin ) !== 'SkinBlueSky' ) {
-                       return true;
-               }
-
-               /*
-               $action = $wgRequest->getVal( 'action', 'view' );
-               $isMainPage = $out->getTitle()->isMainPage();
-               $isArticlePage = $out->getTitle() &&
-                               !$isMainPage &&
-                               $out->getTitle()->getNamespace() == NS_MAIN &&
-                               $action == 'view';
-               */
-
-               $out->addMeta( 'http:content-type', 'text/html; charset=UTF-8' 
);
-
-               /*
-               if ( $isArticlePage || $isMainPage ) {
-                       global $wgLanguageCode;
-
-                       if ( $wgLanguageCode != 'en' ) {
-                               $mobileLang = $wgLanguageCode . '.';
-                       } else {
-                               $mobileLang = '';
-                       }
-
-                       $out->addLink( array(
-                               'rel' => 'alternate',
-                               'media' => 'only screen and (max-width: 640px)',
-                               'href' => 'http://' . $mobileLang . 
'm.wikihow.com/' . $out->getTitle()->getPartialURL()
-                       ) );
-               }
-
-               $out->setCanonicalUrl( $out->getTitle()->getFullURL() );
-               $out->addLink( array(
-                       'href' => 
'https://plus.google.com/102818024478962731382',
-                       'rel' => 'publisher'
-               ) );
-
-               $out->addLink( array(
-                       'rel' => 'alternate',
-                       'type' => 'application/rss+xml',
-                       'title' => 'wikiHow: How-to of the Day',
-                       'href' => 'http://www.wikihow.com/feed.rss'
-               ) );
-
-               $out->addLink( array(
-                       'rel' => 'apple-touch-icon',
-                       'href' => $wgStylePath . 
'/BlueSky/images/safari-large-icon.png'
-               ) );
-
-               echo $out->getHeadItems();
-               */
+        * TOC processing
+        * Shamelessly stolen from brickimedia's refreshed skin
+        * Currently: 
https://github.com/Brickimedia/Refreshed/blob/master/Refreshed.skin.php#L72
+        */
+       public static function wfTOCCrap( OutputPage &$out, ParserOutput 
$parserOutput ) {
+               global $wgBlueSkyTOC;
+               $wgBlueSkyTOC = $parserOutput->mSections;
 
                return true;
        }
diff --git a/BlueSky.i18n.php b/BlueSky.i18n.php
deleted file mode 100644
index 42233bf..0000000
--- a/BlueSky.i18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * 
https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShimb1f505ade9a49d1b' ) ) {
-       function wfJsonI18nShimb1f505ade9a49d1b( $cache, $code, &$cachedData ) {
-               $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-               foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/skins/BlueSky/i18n/$csCode.json";
-                       if ( is_readable( $fileName ) ) {
-                               $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-                               foreach ( array_keys( $data ) as $key ) {
-                                       if ( $key === '' || $key[0] === '@' ) {
-                                               unset( $data[$key] );
-                                       }
-                               }
-                               $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-                       }
-
-                       $cachedData['deps'][] = new FileDependency( $fileName );
-               }
-               return true;
-       }
-
-       $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShimb1f505ade9a49d1b';
-}
diff --git a/BlueSky.php b/BlueSky.php
index 4acc5fc..de8c6ff 100644
--- a/BlueSky.php
+++ b/BlueSky.php
@@ -8,7 +8,7 @@
  * @version 2014-05-15
  * @author Various wikiHow developers
  * @author Jack Phoenix <j...@countervandalism.net>
- * @date 27 May 2014
+ * @date 26 June 2015
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  *
  * To install place the BlueSky folder (the folder containing this file!) into
@@ -16,15 +16,11 @@
  * require_once("$IP/skins/BlueSky/BlueSky.php");
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die( 'This is not a valid entry point to MediaWiki.' );
-}
-
 // Skin credits that will show up on Special:Version
 $wgExtensionCredits['skin'][] = array(
        'path' => __FILE__,
        'name' => 'BlueSky',
-       'version' => '1.0',
+       'version' => '1.1',
        'author' => array( 'wikiHow', 'Jack Phoenix' ),
        // @todo To be moved into the i18n file eventually once i18n is stable 
enough.
        // No need to cause translators unnecessary extra work before I finalize
@@ -39,20 +35,18 @@
 // *this* file.
 $wgValidSkinNames['bluesky'] = 'BlueSky';
 
-// Autoload the skin class, make it a valid skin, set up i18n, set up CSS & JS
-// (via ResourceLoader)
+// Autoload the skin class, set up i18n, set up CSS & JS (via ResourceLoader)
 $wgAutoloadClasses['SkinBlueSky'] = __DIR__ . '/BlueSky.skin.php';
+$wgAutoloadClasses['BlueSkyTemplate'] = __DIR__ . '/BlueSky.skin.php';
 $wgAutoloadClasses['SkinBlueSkyHooks'] = __DIR__ . '/BlueSky.hooks.php';
-$wgExtensionMessagesFiles['SkinBlueSky'] = __DIR__ . '/BlueSky.i18n.php';
+
 $wgMessagesDirs['SkinBlueSky'] = __DIR__ . '/i18n';
 
 // Main CSS ResourceLoader module
 $wgResourceModules['skins.bluesky'] = array(
        'styles' => array(
                // MonoBook also loads these
-               #'skins/common/commonElements.css' => array( 'media' => 
'screen' ),
-               #'skins/common/commonContent.css' => array( 'media' => 'screen' 
),
-               'skins/common/commonInterface.css' => array( 'media' => 
'screen' ),
+               'resources/src/mediawiki.skinning/interface.css' => array( 
'media' => 'screen' ),
                // Styles custom to this skin
                'skins/BlueSky/resources/css/nonarticle.css' => array( 'media' 
=> 'screen' ),
                'skins/BlueSky/resources/css/searchresults.css' => array( 
'media' => 'screen' ),
@@ -68,20 +62,6 @@
 $wgResourceModules['zzzskins.bluesky.mainpage'] = array(
        'styles' => array(
                'skins/BlueSky/resources/css/home.css' => array( 'media' => 
'screen' ),
-       ),
-       'position' => 'top'
-);
-
-$wgResourceModules['skins.bluesky.externallinks.123'] = array(
-       'styles' => array(
-               'skins/BlueSky/resources/css/externallinks-123.css' => array( 
'media' => 'screen' ),
-       ),
-       'position' => 'top'
-);
-
-$wgResourceModules['skins.bluesky.externallinks.124'] = array(
-       'styles' => array(
-               'skins/BlueSky/resources/css/externallinks-124.css' => array( 
'media' => 'screen' ),
        ),
        'position' => 'top'
 );
@@ -208,7 +188,6 @@
        )
 );
 
-$blueSkyTOC = '';
+$wgBlueSkyTOC = '';
 
-$wgHooks['OutputPageParserOutput'][] = 'SkinBlueSkyHooks::wfTOCCrap';
-$wgHooks['BeforePageDisplay'][] = 'SkinBlueSkyHooks::onBeforePageDisplayCrap';
+$wgHooks['OutputPageParserOutput'][] = 'SkinBlueSkyHooks::wfTOCCrap';
\ No newline at end of file
diff --git a/BlueSky.skin.php b/BlueSky.skin.php
index 8850bc3..66ca761 100644
--- a/BlueSky.skin.php
+++ b/BlueSky.skin.php
@@ -1,13 +1,15 @@
 <?php
 /**
- * BlueSky skin
+ * BlueSky skin -- a skin based on wikiHow's third redesign, introduced in
+ * autumn 2013.
  *
  * @file
+ * @ingroup Skins
+ * @version 2014-05-15
+ * @author Various wikiHow developers
+ * @author Jack Phoenix <j...@countervandalism.net>
+ * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
-
-if ( !defined( 'MEDIAWIKI' ) ) {
-       die();
-}
 
 /**
  * Inherit main code from SkinTemplate, set the CSS and template filter.
@@ -23,7 +25,8 @@
        public $mSidebarTopWidgets = array();
 
        /**
-        * Basically just loads the skin's JavaScript via ResourceLoader.
+        * Loads the skin's JavaScript via ResourceLoader and sets up some 
<meta>
+        * tags and whatnot for the page head element.
         *
         * @param OutputPage $out
         */
@@ -41,6 +44,56 @@
                        return true;
                };
 
+               /*
+               global $wgRequest;
+               $action = $wgRequest->getVal( 'action', 'view' );
+               $isMainPage = $out->getTitle()->isMainPage();
+               $isArticlePage = $out->getTitle() &&
+                               !$isMainPage &&
+                               $out->getTitle()->getNamespace() == NS_MAIN &&
+                               $action == 'view';
+               */
+
+               $out->addMeta( 'http:content-type', 'text/html; charset=UTF-8' 
);
+
+               /*
+               if ( $isArticlePage || $isMainPage ) {
+                       global $wgLanguageCode;
+
+                       if ( $wgLanguageCode != 'en' ) {
+                               $mobileLang = $wgLanguageCode . '.';
+                       } else {
+                               $mobileLang = '';
+                       }
+
+                       $out->addLink( array(
+                               'rel' => 'alternate',
+                               'media' => 'only screen and (max-width: 640px)',
+                               'href' => 'http://' . $mobileLang . 
'm.wikihow.com/' . $out->getTitle()->getPartialURL()
+                       ) );
+               }
+
+               $out->setCanonicalUrl( $out->getTitle()->getFullURL() );
+               $out->addLink( array(
+                       'href' => 
'https://plus.google.com/102818024478962731382',
+                       'rel' => 'publisher'
+               ) );
+
+               $out->addLink( array(
+                       'rel' => 'alternate',
+                       'type' => 'application/rss+xml',
+                       'title' => 'wikiHow: How-to of the Day',
+                       'href' => 'http://www.wikihow.com/feed.rss'
+               ) );
+
+               $out->addLink( array(
+                       'rel' => 'apple-touch-icon',
+                       'href' => $wgStylePath . 
'/BlueSky/images/safari-large-icon.png'
+               ) );
+
+               echo $out->getHeadItems();
+               */
+
                // Load JavaScript via ResourceLoader
                $out->addModules( 'skins.bluesky.js' );
        }
@@ -51,28 +104,12 @@
         * @param OutputPage $out
         */
        function setupSkinUserCss( OutputPage $out ) {
-               global $wgVersion, $wgResourceModules;
-
                parent::setupSkinUserCss( $out );
 
-               $baseCSSmodules = array( 'skins.bluesky' );
-               // Pick the correct external links module...the difference 
between
-               // 1.23 and 1.24 versions is in the capitalization of the 
"MonoBook" name
-               // (lowercase for 1.23 and older, CamelCase for 1.24 and newer)
-               if ( version_compare( $wgVersion, '1.23c', '<' ) ) {
-                       $baseCSSmodules[] = 'skins.bluesky.externallinks.123';
-               } elseif (
-                       isset( 
$wgResourceModules['mediawiki.skinning.content.externallinks'] ) &&
-                       
$wgResourceModules['mediawiki.skinning.content.externallinks']
-               )
-               {
-                       // Let's hope that 
https://gerrit.wikimedia.org/r/#/c/143173/ makes
-                       // it to the 1.24 release, but in case if not, there's 
a final fallback
-                       // in this if-else loop for such a case (1.24 w/o this 
skinning module)
-                       $baseCSSmodules[] = 
'mediawiki.skinning.content.externallinks';
-               } else {
-                       $baseCSSmodules[] = 'skins.bluesky.externallinks.124';
-               }
+               $baseCSSmodules = array(
+                       'skins.bluesky',
+                       'mediawiki.skinning.content.externallinks'
+               );
 
                $modules = array();
                $title = $this->getTitle();
@@ -678,7 +715,7 @@
         */
        static function showSideBar() {
                $result = true;
-               wfRunHooks( 'ShowSideBar', array( &$result ) );
+               Hooks::run( 'ShowSideBar', array( &$result ) );
                return $result;
        }
 
@@ -694,7 +731,7 @@
        static function showBreadCrumbs() {
                global $wgTitle, $wgRequest;
                $result = true;
-               wfRunHooks( 'ShowBreadCrumbs', array( &$result ) );
+               Hooks::run( 'ShowBreadCrumbs', array( &$result ) );
                if ( $result ) {
                        $namespace = $wgTitle ? $wgTitle->getNamespace() : 
NS_MAIN;
                        $action = $wgRequest ? $wgRequest->getVal( 'action' ) : 
'';
@@ -718,7 +755,7 @@
                global $wgTitle, $wgRequest;
 
                $result = true;
-               wfRunHooks( 'ShowGrayContainer', array( &$result ) );
+               Hooks::run( 'ShowGrayContainer', array( &$result ) );
 
                $action = $wgRequest ? $wgRequest->getVal( 'action' ) : '';
                $namespace = $wgTitle->getNamespace();
@@ -756,7 +793,7 @@
 
                $tabs = array();
 
-               wfRunHooks( 'pageTabs', array( &$tabs ) );
+               Hooks::run( 'pageTabs', array( &$tabs ) );
 
                if ( count( $tabs ) > 0 ) {
                        return $tabs;
@@ -1257,48 +1294,10 @@
         */
        protected function prepareQuickTemplate( OutputPage $out = null ) {
                global $wgContLang, $wgHideInterlanguageLinks;
-               wfProfileIn( __METHOD__ );
 
                $tpl = parent::prepareQuickTemplate( $out );
                if ( !$out instanceof OutputPage ) {
                        $out = $this->getOutput();
-               }
-
-               // Add various meta properties if the ArticleMetaInfo extension 
is
-               // available
-               if ( class_exists( 'ArticleMetaInfo' ) ) {
-                       $description = 
ArticleMetaInfo::getCurrentTitleMetaDescription();
-                       if ( $description ) {
-                               $out->addMeta( 'description', $description );
-                       }
-                       $keywords = 
ArticleMetaInfo::getCurrentTitleMetaKeywords();
-                       if ( $keywords ) {
-                               $out->mKeywords = array();
-                               $out->addMeta( 'keywords', $keywords );
-                       }
-
-                       ArticleMetaInfo::addFacebookMetaProperties( 
$tpl->data['title'] );
-                       ArticleMetaInfo::addTwitterMetaProperties();
-
-                       ArticleMetaInfo::addFacebookMetaProperties( 
$tpl->data['title'] );
-                       ArticleMetaInfo::addTwitterMetaProperties();
-               }
-
-               // If the UserPagePolicy extension is installed and we're 
trying to
-               // view a User: page that doesn't match the criteria of a "good 
user page"
-               // (in other words, it's likely spam) and we're not logged in, 
force the
-               // article text to be a generic "Sorry, no such page" and force 
the
-               // correct HTTP headers
-               if (
-                       $this->getTitle()->getNamespace() == NS_USER &&
-                       $this->getUser()->getId() == 0 &&
-                       class_exists( 'UserPagePolicy' ) &&
-                       !UserPagePolicy::isGoodUserPage( 
$this->getTitle()->getDBkey() )
-               )
-               {
-                       $txt = wfMessage( 'noarticletext_user' )->parse();
-                       $tpl->setRef( 'bodytext', $txt );
-                       header( 'HTTP/1.1 404 Not Found' );
                }
 
                // <copypasta type="awful" absolutely="true">
@@ -1356,8 +1355,6 @@
                } else {
                        $tpl->set( 'language_urls', false );
                }
-
-               wfProfileOut( __METHOD__ );
 
                return $tpl;
        }
@@ -1433,13 +1430,24 @@
                if ( class_exists( 'UserLoginBox' ) ) {
                        return UserLoginBox::getLogin( $isHead );
                } else {
+                       if ( session_id() == '' ) {
+                               wfSetupSession();
+                       }
+
+                       if ( !LoginForm::getLoginToken() ) {
+                               LoginForm::setLoginToken();
+                               $token = LoginForm::getLoginToken();
+                       } else {
+                               $token = LoginForm::getLoginToken();
+                       }
+
                        // Bah, we have to reimplement UserLoginBox's logic 
here.
                        $actionURL = SpecialPage::getTitleFor( 'Userlogin' 
)->getFullURL( array(
                                'action' => 'submitlogin',
                                'type' => 'login',
                                'autoredirect' => urlencode( 
$this->getTitle()->getPrefixedURL() ),
                                'sitelogin' => '1',
-                               'wpLoginToken' => ( !LoginForm::getLoginToken() 
) ? LoginForm::setLoginToken() : LoginForm::getLoginToken()
+                               'wpLoginToken' => $token
                        ) );
 
                        // wikiHow's SSL_LOGIN_DOMAIN constant is not supported 
intentionally
@@ -1468,6 +1476,7 @@
                                'social_buttons' => '',//self::getSocialLogin( 
$headSuffix ),
                                'suffix' => $headSuffix,
                                'action_url' => htmlspecialchars( $actionURL ),
+                               'token' => $token
                        );
 
                        foreach ( $variables as $variable => $value ) {
@@ -1556,32 +1565,23 @@
         * outputs a formatted page.
         */
        public function execute() {
-               global $wgStylePath, $wgSitename, $wgForumLink, $blueSkyTOC;
+               global $wgStylePath, $wgSitename, $wgForumLink, $wgBlueSkyTOC;
 
                $tocHTML = '';
-               if ( $blueSkyTOC != '' ) {
-                       if ( sizeof( $blueSkyTOC ) > 6 ) {
-                               $tocHTML .= "<div class='toc_long'>";
+               if ( isset( $wgBlueSkyTOC ) && count( $wgBlueSkyTOC ) > 0 ) {
+                       if ( sizeof( $wgBlueSkyTOC ) > 6 ) {
+                               $tocHTML .= '<div class="toc_long">';
                        } else {
-                               $tocHTML .= "<div class='toc_short'>";
+                               $tocHTML .= '<div class="toc_short">';
                        }
                        $i = 0;
-                       foreach ( $blueSkyTOC as $tocpart ) {
+                       foreach ( $wgBlueSkyTOC as $tocpart ) {
                                $class = "toclevel-{$tocpart['toclevel']}";
                                $href = "#{$tocpart['anchor']}";
                                $tocHTML .= "<a href='$href' data-to='$href' 
data-numid='$i' class='$class'><span 
class='toc_square'></span>{$tocpart['line']}</a>";
                                $i++;
                        }
                        $tocHTML .= '</div>';
-               }
-
-               if ( class_exists( 'MobileWikihow' ) ) {
-                       $mobileWikihow = new MobileWikihow();
-                       $result = $mobileWikihow->controller();
-                       // false means we stop processing template
-                       if ( !$result ) {
-                               return;
-                       }
                }
 
                $this->data['pageLanguage'] = 
$this->getSkin()->getTitle()->getPageViewLanguage()->getHtmlCode();
@@ -1609,7 +1609,7 @@
                $isLoggedIn = $user->getID() > 0;
 
                $isTool = false;
-               wfRunHooks( 'getToolStatus', array( &$isTool ) );
+               Hooks::run( 'getToolStatus', array( &$isTool ) );
 
                $isIndexed = class_exists( 'RobotPolicy' ) && 
RobotPolicy::isIndexable( $title );
 
@@ -1623,7 +1623,7 @@
 
                // get the breadcrumbs / category links at the top of the page
                $catLinksTop = $sk->getCategoryLinks( true );
-               wfRunHooks( 'getBreadCrumbs', array( &$catLinksTop ) );
+               Hooks::run( 'getBreadCrumbs', array( &$catLinksTop ) );
                $mainPageObj = Title::newMainPage();
 
                $isPrintable = false;
@@ -1760,18 +1760,6 @@
                        $action == 'view' &&
                        class_exists( 'WikihowShare' );
 
-               $showSliderWidget =
-                       class_exists( 'Slider' ) &&
-                       $title->exists() &&
-                       $title->getNamespace() == NS_MAIN &&
-                       !$title->isProtected() &&
-                       !$isPrintable &&
-                       !$isMainPage &&
-                       $isIndexed &&
-                       // $showSocialSharing &&
-                       $request->getVal( 'oldid' ) == '' &&
-                       ( $request->getVal( 'action' ) == '' || 
$request->getVal( 'action' ) == 'view' );
-
                $isSpecialPage = $title->getNamespace() == NS_SPECIAL
                        || ( $title->getNamespace() == NS_MAIN && 
$request->getVal( 'action' ) == 'protect' )
                        || ( $title->getNamespace() == NS_MAIN && 
$request->getVal( 'action' ) == 'delete' );
@@ -1784,13 +1772,13 @@
 
                $tabsArray = $sk->getTabsArray( $showArticleTabs );
 
-               wfRunHooks( 'JustBeforeOutputHTML', array( &$this ) );
+               Hooks::run( 'JustBeforeOutputHTML', array( &$this ) );
 
                // Output the doctype element and everything that goes before 
the HTML
                // <body> tag
                $this->html( 'headelement' );
 
-               wfRunHooks( 'PageHeaderDisplay', array( 
$sk->isUserAgentMobile() ) ); ?>
+               Hooks::run( 'PageHeaderDisplay', array( 
$sk->isUserAgentMobile() ) ); ?>
 
                <div id="header_outer"><div id="header">
                        <ul id="actions">
@@ -1832,14 +1820,14 @@
                        ?>
                        <a href="<?php echo $mainPageObj->getLocalURL(); ?>" 
id="logo_link"><?php echo $logoElement ?></a>
                        <?php echo $top_search ?>
-                       <?php wfRunHooks( 'EndOfHeader', array( &$out ) ); ?>
+                       <?php Hooks::run( 'EndOfHeader', array( &$out ) ); ?>
                </div></div><!--end #header-->
-               <?php wfRunHooks( 'AfterHeader', array( &$out ) ); ?>
+               <?php Hooks::run( 'AfterHeader', array( &$out ) ); ?>
                <div id="main_container" class="<?php echo ( $isMainPage ? 
'mainpage' : '' ) ?>">
                        <div id="header_space"></div>
 
                <div id="main">
-               <?php wfRunHooks( 'BeforeActionbar', array( &$out ) ); ?>
+               <?php Hooks::run( 'BeforeActionbar', array( &$out ) ); ?>
                <div id="actionbar" class="<?php echo ( $isTool ? 'isTool' : '' 
) ?>">
                        <?php if ( $showBreadCrumbs ): ?>
                                <div id="gatBreadCrumb">
@@ -1860,7 +1848,7 @@
                <div id="article"<?php if ( class_exists( 'Microdata' ) ) { 
echo Microdata::genSchemaHeader(); } ?> class="mw-body">
                        <?php if ( $this->data['newtalk'] ) { ?><div 
class="usermessage"><?php $this->html( 'newtalk' ) ?></div><?php } ?>
                        <?php
-                       wfRunHooks( 'BeforeTabsLine', array( &$out ) );
+                       Hooks::run( 'BeforeTabsLine', array( &$out ) );
                        if ( !$isArticlePage && $this->data['bodyheading'] ) {
                                echo '<div class="wh_block">' . 
$this->data['bodyheading'] . '</div>';
                        }
@@ -2161,49 +2149,11 @@
                        <br class="clearall" />
                </div><!--end #footer_outer-->
                <div id="dialog-box" title=""></div>
-
                <?php
-               // Quick note/edit popup
-               if ( $action == 'diff' && class_exists( 'QuickNoteEdit' ) ) {
-                       echo QuickNoteEdit::displayQuicknote();
-                       echo QuickNoteEdit::displayQuickedit();
-               }
-
-               // Slider box -- for non-logged in users on articles only
-               if ( $showSliderWidget ) {
-                       echo Slider::getBox();
-                       echo '<div id="slideshowdetect"></div>';
-               }
-               ?>
-
-               <div id="fb-root"></div>
-
-               <?php
-               if ( $showRCWidget ) {
-                       RCWidget::showWidgetJS();
-               }
-
-               // Load event listeners all pages
-               if ( class_exists( 'CTALinks' ) && trim( $sk->msg( 
'cta_feature' )->inContentLanguage()->text() ) == 'on' ) {
-                       echo CTALinks::getBlankCTA();
-               }
-
-               wfRunHooks( 'ArticleJustBeforeBodyClose' );
-
-               if ( $showStaffStats ) {
-                       echo Pagestats::getJSsnippet( 'article' );
-               }
-
-               if ( class_exists( 'GoodRevision' ) ) {
-                       $grevid = $title ? GoodRevision::getUsedRev( 
$title->getArticleID() ) : '';
-                       $latestRev = $title->getNamespace() == NS_MAIN ? 
$title->getLatestRevID() : '';
-                       echo '<!-- shown patrolled revid=' . $grevid . ', 
latest=' . $latestRev . ' -->';
-               }
-
                echo wfReportTime();
 
                $this->printTrail();
-?>
+               ?>
 </body>
 </html>
 <?php
diff --git a/i18n/fi.json b/i18n/fi.json
index 5147ec2..32fe181 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -33,6 +33,7 @@
        "bluesky-notifications-no-talk": "Käy [[$1|keskustelusivullasi]] 
nähdäksesi aiemmat viestit.",
        "bluesky-page-edited": "Sivua muokattu viimeksi {{int:ago|$1}}",
        "bluesky-page-edited-user": "Sivua muokannut viimeksi [[User:$2|$2]] 
{{int:ago|$1}}",
+       "bluesky-toc-sections": "Osiot:",
        "bluesky-unread-notifications": "{{PLURAL:$1|Yksi lukematon|$1 
lukematonta}}",
        "bluesky-unwatch": "Lopeta tarkkailu",
        "bluesky-watch": "Tarkkaile",
diff --git a/resources/css/externallinks-123.css 
b/resources/css/externallinks-123.css
deleted file mode 100644
index 6ba29c8..0000000
--- a/resources/css/externallinks-123.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-** this is CSS3, the validator doesn't like it when validating as CSS2
-** copypasted from MonoBook's main.css with s/#bodyContent/.mw-body/ and img 
paths
-** adjusted accordingly
-*/
-.mw-body a.external,
-.mw-body a.external[href ^="gopher://";] {
-       /* @embed */
-       background: url(../../../monobook/external-ltr.png) center right 
no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href ^="https://";],
-.link-https {
-       /* @embed */
-       background: url(../../../monobook/lock_icon.gif) center right no-repeat;
-       padding-right: 16px;
-}
-.mw-body a.external[href ^="mailto:";],
-.link-mailto {
-       /* @embed */
-       background: url(../../../monobook/mail_icon.gif) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="news://";] {
-       /* @embed */
-       background: url(../../../monobook/news_icon.png) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="ftp://";],
-.link-ftp {
-       /* @embed */
-       background: url(../../../monobook/file_icon.gif) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="irc://"],
-.link-irc {
-       /* @embed */
-       background: url(../../../monobook/discussionitem_icon.gif) center right 
no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href $=".ogg"], .mw-body a.external[href $=".OGG"],
-.mw-body a.external[href $=".mid"], .mw-body a.external[href $=".MID"],
-.mw-body a.external[href $=".midi"], .mw-body a.external[href $=".MIDI"],
-.mw-body a.external[href $=".mp3"], .mw-body a.external[href $=".MP3"],
-.mw-body a.external[href $=".wav"], .mw-body a.external[href $=".WAV"],
-.mw-body a.external[href $=".wma"], .mw-body a.external[href $=".WMA"],
-.link-audio {
-       /* @embed */
-       background: url("../../../monobook/audio.png") center right no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href $=".ogm"], .mw-body a.external[href $=".OGM"],
-.mw-body a.external[href $=".avi"], .mw-body a.external[href $=".AVI"],
-.mw-body a.external[href $=".mpeg"], .mw-body a.external[href $=".MPEG"],
-.mw-body a.external[href $=".mpg"], .mw-body a.external[href $=".MPG"],
-.link-video {
-       /* @embed */
-       background: url("../../../monobook/video.png") center right no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href $=".pdf"], .mw-body a.external[href $=".PDF"],
-.mw-body a.external[href *=".pdf#"], .mw-body a.external[href *=".PDF#"],
-.mw-body a.external[href *=".pdf?"], .mw-body a.external[href *=".PDF?"],
-.link-document {
-       /* @embed */
-       background: url("../../../monobook/document.png") center right 
no-repeat;
-       padding-right: 12px;
-}
\ No newline at end of file
diff --git a/resources/css/externallinks-124.css 
b/resources/css/externallinks-124.css
deleted file mode 100644
index 92457c9..0000000
--- a/resources/css/externallinks-124.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-** this is CSS3, the validator doesn't like it when validating as CSS2
-** copypasted from MonoBook's main.css with s/#bodyContent/.mw-body/ and img 
paths
-** adjusted accordingly
-*/
-.mw-body a.external,
-.mw-body a.external[href ^="gopher://";] {
-       /* @embed */
-       background: url(../../../MonoBook/external-ltr.png) center right 
no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href ^="https://";],
-.link-https {
-       /* @embed */
-       background: url(../../../MonoBook/lock_icon.gif) center right no-repeat;
-       padding-right: 16px;
-}
-.mw-body a.external[href ^="mailto:";],
-.link-mailto {
-       /* @embed */
-       background: url(../../../MonoBook/mail_icon.gif) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="news://";] {
-       /* @embed */
-       background: url(../../../MonoBook/news_icon.png) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="ftp://";],
-.link-ftp {
-       /* @embed */
-       background: url(../../../MonoBook/file_icon.gif) center right no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href ^="irc://"],
-.link-irc {
-       /* @embed */
-       background: url(../../../MonoBook/discussionitem_icon.gif) center right 
no-repeat;
-       padding-right: 18px;
-}
-.mw-body a.external[href $=".ogg"], .mw-body a.external[href $=".OGG"],
-.mw-body a.external[href $=".mid"], .mw-body a.external[href $=".MID"],
-.mw-body a.external[href $=".midi"], .mw-body a.external[href $=".MIDI"],
-.mw-body a.external[href $=".mp3"], .mw-body a.external[href $=".MP3"],
-.mw-body a.external[href $=".wav"], .mw-body a.external[href $=".WAV"],
-.mw-body a.external[href $=".wma"], .mw-body a.external[href $=".WMA"],
-.link-audio {
-       /* @embed */
-       background: url("../../../MonoBook/audio.png") center right no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href $=".ogm"], .mw-body a.external[href $=".OGM"],
-.mw-body a.external[href $=".avi"], .mw-body a.external[href $=".AVI"],
-.mw-body a.external[href $=".mpeg"], .mw-body a.external[href $=".MPEG"],
-.mw-body a.external[href $=".mpg"], .mw-body a.external[href $=".MPG"],
-.link-video {
-       /* @embed */
-       background: url("../../../MonoBook/video.png") center right no-repeat;
-       padding-right: 13px;
-}
-.mw-body a.external[href $=".pdf"], .mw-body a.external[href $=".PDF"],
-.mw-body a.external[href *=".pdf#"], .mw-body a.external[href *=".PDF#"],
-.mw-body a.external[href *=".pdf?"], .mw-body a.external[href *=".PDF?"],
-.link-document {
-       /* @embed */
-       background: url("../../../MonoBook/document.png") center right 
no-repeat;
-       padding-right: 12px;
-}
\ No newline at end of file
diff --git a/skin.json b/skin.json
new file mode 100644
index 0000000..2a15164
--- /dev/null
+++ b/skin.json
@@ -0,0 +1,218 @@
+{
+       "name": "BlueSky",
+       "version": "1.1",
+       "author": [
+               "wikiHow",
+               "Jack Phoenix"
+       ],
+       "url": "https://www.mediawiki.org/wiki/Skin:BlueSky";,
+       "license-name": "GPL-2.0+",
+       "description": "Skin based on the current version (late 2013-) of 
wikiHow's skin",
+       "type": "skin",
+       "ValidSkinNames": {
+               "bluesky": "BlueSky"
+       },
+       "MessagesDirs": {
+               "SkinBlueSky": [
+                       "i18n"
+               ]
+       },
+       "AutoloadClasses": {
+               "SkinBlueSky": "BlueSky.skin.php",
+               "BlueSkyTemplate": "BlueSky.skin.php",
+               "SkinBlueSkyHooks": "BlueSky.hooks.php"
+       },
+       "ResourceFileModulePaths": {
+               "localBasePath": "",
+               "remoteSkinPath": "BlueSky"
+       },
+       "ResourceModules": {
+               "skins.bluesky": {
+                       "styles": {
+                               
"resources/src/mediawiki.skinning/interface.css": {
+                                       "media": "screen"
+                               },
+                               "resources/css/nonarticle.css": {
+                                       "media": "screen"
+                               },
+                               "resources/css/searchresults.css": {
+                                       "media": "screen"
+                               },
+                               "resources/css/special.css": {
+                                       "media": "screen"
+                               },
+                               "resources/css/printable.css": {
+                                       "media": "print"
+                               }
+                       },
+                       "position": "top"
+               },
+               "zzzskins.bluesky.mainpage": {
+                       "styles": {
+                               "resources/css/home.css": {
+                                       "media": "print"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.general": {
+                       "styles": {
+                               "resources/css/hacks/general.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.action.delete": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.action.delete.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.action.edit": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.action.edit.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.action.history": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.action.history.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.action.protect": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.action.protect.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.filepage": {
+                       "styles": {
+                               "resources/css/hacks/mediawiki.filepage.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.special.log": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.special.log.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.special.movepage": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.special.movepage.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.special.recentchanges": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.special.recentchanges.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.special.undelete": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.special.undelete.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.hacks.special.watchlist": {
+                       "styles": {
+                               
"resources/css/hacks/mediawiki.special.watchlist.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "themeloader.skins.bluesky.blue": {
+                       "styles": {
+                               "resources/css/theme/blue.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "themeloader.skins.bluesky.green": {
+                       "styles": {
+                               "resources/css/theme/green.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "themeloader.skins.bluesky.grey": {
+                       "styles": {
+                               "resources/css/theme/grey.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "themeloader.skins.bluesky.red": {
+                       "styles": {
+                               "resources/css/theme/red.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "themeloader.skins.bluesky.white": {
+                       "styles": {
+                               "resources/css/theme/white.less": {
+                                       "media": "screen"
+                               }
+                       },
+                       "position": "top"
+               },
+               "skins.bluesky.js.easing": {
+                       "position": "bottom",
+                       "scripts": [
+                               "resources/js/jquery.easing.js"
+                       ]
+               },
+               "skins.bluesky.js": {
+                       "position": "bottom",
+                       "dependencies": [
+                               "jquery.client",
+                               "jquery.ui.dialog",
+                               "skins.bluesky.js.easing"
+                       ],
+                       "messages": [
+                               "navlist_collapse", "navlist_expand",
+                               "userlogin-yourname-ph", 
"userlogin-yourpassword-ph",
+                               "bluesky-js-no-thanks"
+                       ],
+                       "scripts": [
+                               "resources/js/bluesky.js"
+                       ]
+               }
+       },
+       "config": {
+               "BlueSkyTOC": ""
+       },
+       "Hooks": {
+               "OutputPageParserOutput": [
+                       "SkinBlueSkyHooks::wfTOCCrap"
+               ]
+       },
+       "manifest_version": 1
+}
\ No newline at end of file
diff --git a/templates/userloginbox.tmpl.php b/templates/userloginbox.tmpl.php
index 7555420..f61f494 100644
--- a/templates/userloginbox.tmpl.php
+++ b/templates/userloginbox.tmpl.php
@@ -43,6 +43,8 @@
                <a href="<?php echo SpecialPage::getTitleFor( 
$passwordReminderSpecialPageName )->getFullURL() ?>" id="forgot_pwd<?php echo 
$this->data['suffix'] ?>"><?php echo wfMessage( 'userlogin-resetpassword-link' 
)->plain() ?></a>
                <a href="<?php echo SpecialPage::getTitleFor( 'Userlogin', 
'signup' )->getFullURL() ?>"><?php echo wfMessage( 'nologinlink' )->plain() 
?></a>
        </div>
+
+       <?php if ( $this->haveData( 'token' ) ) { ?><input type="hidden" 
name="wpLoginToken" value="<?php $this->text( 'token' ); ?>" /><?php } ?>
 </form>
 <?php
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/221034
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedbcf359cc7d0a88a6e142901b59ac94caa3ddd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSky
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix <j...@countervandalism.net>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to