CologneBlue rewrite: fix sysLinks()
authorMatmaRex <matma.rex@gmail.com>
Thu, 27 Sep 2012 17:27:45 +0000 (19:27 +0200)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 4 Oct 2012 19:39:49 +0000 (19:39 +0000)
* remove link to special pages, what was it even doing there
* kill extensionTabLinks(): SkinTemplateTabs hook, which it calls, has been
  (per [[mw:Manual:Hooks/SkinTemplateTabs]]) removed in 1.18
* split variantLinks()

Also assorted CSS.

Change-Id: I67fdbf80baf52721d0be6bb7c0597225c5010940

skins/CologneBlue.php
skins/cologneblue/screen.css

index 5844a47..6cff67d 100644 (file)
@@ -90,34 +90,6 @@ class CologneBlueTemplate extends BaseTemplate {
 
                return $s;
        }
-
-       /**
-        * Compatibility for extensions adding functionality through tabs.
-        * Eventually these old skins should be replaced with SkinTemplate-based
-        * versions, sigh...
-        * @return string
-        * @todo Exterminate! ...that, and replace it with normal SkinTemplate stuff
-        */
-       function extensionTabLinks() {
-               $tabs = array();
-               $out = '';
-               $s = array();
-               wfRunHooks( 'SkinTemplateTabs', array( $this->getSkin(), &$tabs ) );
-               foreach ( $tabs as $tab ) {
-                       $s[] = Xml::element( 'a',
-                               array( 'href' => $tab['href'] ),
-                               $tab['text'] );
-               }
-
-               if ( count( $s ) ) {
-                       global $wgLang;
-
-                       $out = wfMessage( 'pipe-separator' )->escaped();
-                       $out .= $wgLang->pipeList( $s );
-               }
-
-               return $out;
-       }
        
        function otherLanguages() {
                global $wgOut, $wgLang, $wgHideInterlanguageLinks;
@@ -476,8 +448,9 @@ class CologneBlueTemplate extends BaseTemplate {
                <?php echo wfMessage( 'sitesubtitle' )->escaped() ?>
        </p>
        
-       <p id="syslinks">
-               <span><?php echo $this->sysLinks() ?></span>
+       <p id="toplinks">
+               <span id="syslinks"><?php echo $this->sysLinks() ?></span>
+               <span id="variantlinks"><?php echo $this->variantLinks() ?></span>
        </p>
        <div id="linkcollection">
                <div id="langlinks"><?php echo str_replace( '<br />', '', $this->otherLanguages() ) ?></div>
@@ -547,10 +520,10 @@ class CologneBlueTemplate extends BaseTemplate {
 
        /**
         * @return string
+        * 
+        * @fixed
         */
        function sysLinks() {
-               $personalUrls = $this->data['personal_urls'];
-               
                $s = array(
                        $this->getSkin()->mainPageLink(),
                        Linker::linkKnown(
@@ -565,16 +538,9 @@ class CologneBlueTemplate extends BaseTemplate {
                                Title::newFromText( wfMessage( 'faqpage' )->inContentLanguage()->text() ),
                                wfMessage( 'faq' )->text()
                        ),
-                       Linker::specialLink( 'Specialpages' )
                );
 
-               /* show links to different language variants */
-               if( $this->variantLinks() ) {
-                       $s[] = $this->variantLinks();
-               }
-               if( $this->extensionTabLinks() ) {
-                       $s[] = $this->extensionTabLinks();
-               }
+               $personalUrls = $this->data['personal_urls'];
                if ( $this->data['loggedin'] ) {
                        $s[] = $this->makeLink( 'logout', $personalUrls['logout'] );
                } else {
index 511c81a..ce6b063 100644 (file)
@@ -177,12 +177,12 @@ input.mw-searchInput {
 #footer { margin-left: 152px; }
 
 
-#sitetitle, #sitesub, #syslinks, #linkcollection {
+#sitetitle, #sitesub, #toplinks, #linkcollection {
        margin-top: 0; 
        margin-bottom: 0; 
 }
 
-#sitetitle, #syslinks {
+#sitetitle, #toplinks {
        color: white;
        text-transform: uppercase;
        height: 32pt;
@@ -195,12 +195,12 @@ input.mw-searchInput {
        line-height: 32pt;
        background-color: #6688AA;
 }
-#sitetitle a, #syslinks a {
+#sitetitle a, #toplinks a {
        color: white;
        text-decoration: none; 
 }
 
-#syslinks {
+#toplinks {
        font-family: Verdana, Arial, sans-serif;
        position: absolute;
        top: 0;
@@ -208,16 +208,23 @@ input.mw-searchInput {
        width: 100%;
        font-size: 8pt;
 }
-#syslinks a {
+#toplinks a {
        font-size: 10pt;
 }
-#syslinks span {
+#toplinks #syslinks {
        position: absolute;
        right: 0; 
        bottom: 0;
        width: 100%;
        text-align: right;
 }
+#toplinks #variantlinks {
+       position: absolute;
+       right: 0; 
+       bottom: 12pt;
+       width: 100%;
+       text-align: right;
+}
 
 #sitesub {
        float: left;