subpage subtitle shown in monobook now
authorGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 28 Apr 2004 15:07:28 +0000 (15:07 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Wed, 28 Apr 2004 15:07:28 +0000 (15:07 +0000)
includes/Skin.php
includes/SkinPHPTal.php
stylesheets/monobook/IE50Fixes.css
stylesheets/monobook/main.css

index 8734b8b..16e5711 100644 (file)
@@ -533,17 +533,26 @@ class Skin {
 
        function pageSubtitle()
        {
-               global $wgOut,$wgTitle,$wgNamespacesWithSubpages;
+               global $wgOut;
 
                $sub = $wgOut->getSubtitle();
                if ( "" == $sub ) {
                        global $wgExtraSubtitle;
                        $sub = wfMsg( "fromwikipedia" ) . $wgExtraSubtitle;
                }
+               $subpages = $this->subPageSubtitle();
+               $sub .= !empty($subpages)?"</p><p class='subpages'>$subpages":'';
+               $s = "<p class='subtitle'>{$sub}</p>\n";
+               return $s;
+       }
+
+       function subPageSubtitle()
+       {
+               global $wgOut,$wgTitle,$wgNamespacesWithSubpages;
+               $subpages = '';
                if($wgOut->isArticle() && !empty($wgNamespacesWithSubpages[$wgTitle->getNamespace()])) {
                        $ptext=$wgTitle->getPrefixedText();
                        if(preg_match("/\//",$ptext)) {
-                               $sub.="</p><p class='subpages'>";
                                $links=explode("/",$ptext);
                                $c=0;
                                $growinglink="";
@@ -554,19 +563,17 @@ class Skin {
                                                $getlink = $this->makeLink( $growinglink, $link );
                                                if(preg_match("/class='new'/i",$getlink)) { break; } # this is a hack, but it saves time
                                                if ($c>1) {
-                                                       $sub .= " | ";
+                                                       $subpages .= " | ";
                                                } else  {
-                                                       $sub .="&lt; ";
+                                                       $subpages .="&lt; ";
                                                }
-                                               $sub .= $getlink;
+                                               $subpages .= $getlink;
                                                $growinglink.="/";
                                        }
-                                       
                                }
                        }
                }
-               $s = "<p class='subtitle'>{$sub}</p>\n";
-               return $s;
+               return $subpages;
        }
 
        function nameAndLogin()
index d0152e1..400222e 100644 (file)
        {
                var $_context = array();
 
-               function set($varName, $value)
-               {
+               function set($varName, $value) {
                        $this->_context[$varName] = $value;
                }
 
-               function translate($value)
-               {
+               function translate($value) {
                        $value = wfMsg( $value );
-
                        // interpolate variables
                        while (preg_match('/\$([0-9]*?)/sm', $value, $m)) {
                                list($src, $var) = $m;
-                               $varValue = $this->_context[$var];
+                               $varValue = @$this->_context[$var];
                                $value = str_replace($src, $varValue, $value);
                        }
                        return $value;
                        $tpl->set( "pagetitle", $wgOut->getHTMLTitle() );
                        
                        $tpl->setRef( "thispage", &$this->thispage );
-                       $tpl->set( "subtitle", $out->getSubtitle() );
+                       $subpagestr = $this->subPageSubtitle();
+                       $tpl->set( 
+                               "subtitle",  !empty($subpagestr)?
+                               '<span class="subpages">'.$subpagestr.'</span>'.$out->getSubtitle():
+                               $out->getSubtitle()  
+                       );
                        $tpl->set( 'catlinks', $this->getCategories());
                        if( $wgOut->isSyndicated() ) {
                                $feeds = array();
index 3c4165a..c05361a 100644 (file)
@@ -87,6 +87,9 @@ ul#portal-personaltools {
     white-space: nowrap !important;
 }
 
+#portlet-contentViews li a:hover {
+    padding-bottom: 0.5em;
+}
 /* 5.0 doesn't like the background icon for external links and user */
 .link-external,
 .external {
index 6599ee2..78746d1 100644 (file)
@@ -266,6 +266,9 @@ pre {
     color: #7d7d7d;
     width: auto;
 }
+span.subpages {
+    display: block;
+}
 #siteSubtitle {
     display: none;    
 }