* Add tab links from extensions to classic-based skins (SkinTemplateTab hook)
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 31 Oct 2006 14:41:59 +0000 (14:41 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 31 Oct 2006 14:41:59 +0000 (14:41 +0000)
  Provides better cross-skin compatibility for extensions using the modern
  skin hooks, such as Oversight
* Moved variant language links on Cologne Blue and Nostalgia to before the
  login/logout link

RELEASE-NOTES
includes/Skin.php
skins/CologneBlue.php
skins/Nostalgia.php

index 19355f4..e75e212 100644 (file)
@@ -111,6 +111,11 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Added {{#special:}} parser function, to give the local default title for 
   special pages
 * (bug 7766) Remove redundant / from AJAX requests, can break some servers
+* Add tab links from extensions to classic-based skins (SkinTemplateTab hook)
+  Provides better cross-skin compatibility for extensions using the modern
+  skin hooks, such as Oversight
+* Moved variant language links on Cologne Blue and Nostalgia to before the
+  login/logout link
 
 
 == Languages updated ==
index 1a74cfc..374ca20 100644 (file)
@@ -896,10 +896,30 @@ END;
                #$s .= $sep . $this->specialPagesList();
                
                $s .= $this->variantLinks();
+               
+               $s .= $this->extensionTabLinks();
 
                return $s;
        }
        
+       /**
+        * Compatibility for extensions adding functionality through tabs.
+        * Eventually these old skins should be replaced with SkinTemplate-based
+        * versions, sigh...
+        * @return string
+        */
+       function extensionTabLinks() {
+               $tabs = array();
+               $s = '';
+               wfRunHooks( 'SkinTemplateTabs', array( $this, &$tabs ) );
+               foreach( $tabs as $tab ) {
+                       $s .= ' | ' . Xml::element( 'a',
+                               array( 'href' => $tab['href'] ),
+                               $tab['text'] );
+               }
+               return $s;
+       }
+       
        /**
         * Language/charset variant links for classic-style skins
         * @return string
index 6ad8914..8450cde 100644 (file)
@@ -146,17 +146,19 @@ class SkinCologneBlue extends Skin {
                  . " | " .
                  $this->makeKnownLink( wfMsgForContent( "faqpage" ), wfMsg("faq") )
                  . " | " .
-                 $this->specialLink( "specialpages" ) . " | ";
+                 $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 );
                }
 
-               /* show links to different language variants */
-               $s .= $this->variantLinks();
-
                return $s;
        }
 
index 1d76a95..3b19e41 100644 (file)
@@ -63,15 +63,17 @@ class SkinNostalgia extends Skin {
                        $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 {
                        $s .= $sep . $this->specialLink( "userlogout" );
                }
                
-               /* show links to different language variants */
-               $s .= $this->variantLinks();
-               
                $s .= $sep . $this->specialPagesList();
 
                return $s;