* use images from style dir
authorGabriel Wicke <gwicke@users.mediawiki.org>
Tue, 27 Apr 2004 12:18:48 +0000 (12:18 +0000)
committerGabriel Wicke <gwicke@users.mediawiki.org>
Tue, 27 Apr 2004 12:18:48 +0000 (12:18 +0000)
* wgStyleSheetPath -> wgStylePath, wgStyleSheetPath references wgStylePath for backwards compatibility

LocalSettings.sample
config/index.php
includes/DefaultSettings.php
includes/OutputPage.php
includes/Skin.php
includes/SkinPHPTal.php
includes/SkinStandard.php
stylesheets/monobook/main.css

index 53d1e8b..925ccbf 100644 (file)
@@ -59,7 +59,7 @@ $wgArticlePath      = "{$wgScript}/$1";
 
 ## Normally you don't need to change these once the above are set...
 #
-$wgStyleSheetPath   = "{$wgScriptPath}/style";
+$wgStylePath   = "{$wgScriptPath}/style";
 $wgStyleSheetDirectory = "{$IP}/style";
 
 $wgUploadPath       = "{$wgScriptPath}/upload";
@@ -201,4 +201,4 @@ $wgLocalInterwiki   = $wgSitename;
 # A list of proxy servers (ips if possible) to purge on changes
 # don't specify ports here (80 is default)
 # $wgSquidServers = array('127.0.0.1');
-?>
\ No newline at end of file
+?>
index 24ce16a..9432776 100644 (file)
@@ -703,7 +703,7 @@ if ( \$wgCommandLineMode ) {
 {$pretty}\$wgArticlePath      = \"\$wgScript/\$1\";
 {$ugly}\$wgArticlePath      = \"\$wgScript?title=\$1\";
 
-\$wgStyleSheetPath   = \"\$wgScriptPath/stylesheets\";
+\$wgStylePath   = \"\$wgScriptPath/stylesheets\";
 \$wgStyleSheetDirectory = \"\$IP/stylesheets\";
 
 \$wgUploadPath       = \"\$wgScriptPath/images\";
index 135ef64..5a83e4c 100644 (file)
@@ -33,7 +33,8 @@ $wgUsePathInfo                = ( strpos( php_sapi_name(), "cgi" ) === false );
 $wgScript           = "{$wgScriptPath}/index.php";
 $wgRedirectScript   = "{$wgScriptPath}/redirect.php";
 
-$wgStyleSheetPath   = "{$wgScriptPath}/style";
+$wgStylePath   = "{$wgScriptPath}/style";
+$wgStyleSheetPath = &$wgStylePath;
 $wgStyleSheetDirectory = "{$IP}/style";
 $wgArticlePath      = "{$wgScript}?title=$1";
 $wgUploadPath       = "{$wgScriptPath}/upload";
index 86d2cbc..6f09926 100644 (file)
@@ -650,13 +650,13 @@ class OutputPage {
                array_push( $this->mMetatags, array( "http:Content-type", "$wgMimeType; charset={$wgOutputEncoding}" ) );
                
                $ret .= $this->getHeadLinks();
-               global $wgStyleSheetPath;
+               global $wgStylePath;
                if( $this->isPrintable() ) {
                        $media = "";
                } else {
                        $media = "media='print'";
                }
-               $printsheet = htmlspecialchars( "$wgStyleSheetPath/wikiprintable.css" );
+               $printsheet = htmlspecialchars( "$wgStylePath/wikiprintable.css" );
                $ret .= "<link rel='stylesheet' type='text/css' $media href='$printsheet' />\n";
 
                $sk = $wgUser->getSkin();
@@ -668,7 +668,7 @@ class OutputPage {
        }
        
        function getHeadLinks() {
-               global $wgRequest, $wgStyleSheetPath;
+               global $wgRequest, $wgStylePath;
                $ret = "";
                foreach ( $this->mMetatags as $tag ) {
                        if ( 0 == strcasecmp( "http:", substr( $tag[0], 0, 5 ) ) ) {
@@ -703,7 +703,7 @@ class OutputPage {
                        $ret .= "<link rel='alternate' type='application/rss+xml' title='RSS' href='$link' />\n";
                }
                # FIXME: get these working
-               # $fix = htmlspecialchars( $wgStyleSheetPath . "/ie-png-fix.js" );
+               # $fix = htmlspecialchars( $wgStylePath . "/ie-png-fix.js" );
                # $ret .= "<!--[if gte IE 5.5000]><script type='text/javascript' src='$fix'></script><![endif]-->";
                return $ret;
        }
index 4399c4c..6c76a03 100644 (file)
@@ -167,18 +167,18 @@ class Skin {
        }
 
        function getHeadScripts() {
-               global $wgStyleSheetPath;
-               $r = "<script type=\"text/javascript\" src=\"{$wgStyleSheetPath}/wikibits.js\"></script>\n";
+               global $wgStylePath;
+               $r = "<script type=\"text/javascript\" src=\"{$wgStylePath}/wikibits.js\"></script>\n";
                return $r;
        }
 
        function getUserStyles()
        {
-               global $wgOut, $wgStyleSheetPath;
+               global $wgOut, $wgStylePath;
                $sheet = $this->getStylesheet();
                $s = "<style type='text/css'>\n";
                $s .= "/*/*/\n"; # <-- Hide the styles from Netscape 4 without hiding them from IE/Mac
-               $s .= "@import url(\"$wgStyleSheetPath/$sheet\");\n";
+               $s .= "@import url(\"$wgStylePath/$sheet\");\n";
                $s .= $this->doGetUserStyles();
                $s .= "/* */\n";
                $s .= "</style>\n";
@@ -834,8 +834,8 @@ class Skin {
        }
        
        function getPoweredBy() {
-               global $wgUploadPath;
-               $url = htmlspecialchars( "$wgUploadPath/poweredby_mediawiki_88x31.png" );
+               global $wgStylePath;
+               $url = htmlspecialchars( "$wgStylePath/images/poweredby_mediawiki_88x31.png" );
                $img = "<a href='http://www.mediawiki.org/'><img src='$url' alt='MediaWiki' /></a>";
                return $img;
        }
@@ -1745,7 +1745,7 @@ class Skin {
 
 
        function makeThumbLinkObj( $img, $label = "", $align = "right", $boxwidth = 180, $framed=false ) {
-               global $wgUploadPath, $wgLang;
+               global $wgStylePath, $wgLang;
                # $image = Title::makeTitle( Namespace::getImage(), $name );
                $url  = $img->getURL();
                
@@ -1795,7 +1795,7 @@ class Skin {
                        } else {
                                $zoomicon =  '<div class="magnify" style="float:'.$magnifyalign.'">'.
                                        '<a href="'.$u.'" class="internal" title="'.$more.'">'.
-                                       '<img src="'.$wgUploadPath.'/magnify-clip.png" ' .
+                                       '<img src="'.$wgStylePath.'/magnify-clip.png" ' .
                                        'width="15" height="11" alt="'.$more.'" /></a></div>';
                        }
                }
@@ -1875,7 +1875,7 @@ class Skin {
        # Enhanced RC ungrouped line
        function recentChangesBlockLine ( $rcObj )
        {
-               global $wgUploadPath, $wgLang ;
+               global $wgStylePath, $wgLang ;
 
                # Get rc_xxxx variables
                extract( $rcObj->mAttribs ) ;
@@ -1884,7 +1884,7 @@ class Skin {
                # Spacer image
                $r = "" ;
 
-               $r .= "<img src='{$wgUploadPath}/Arr_.png' width='12' height='12' border='0' />" ;              $r .= "<tt>" ;
+               $r .= "<img src='{$wgStylePath}/images/Arr_.png' width='12' height='12' border='0' />" ;                $r .= "<tt>" ;
 
                if ( $rc_type == RC_MOVE ) {
                        $r .= "&nbsp;&nbsp;";
@@ -1939,7 +1939,7 @@ class Skin {
        # Enhanced RC group
        function recentChangesBlockGroup ( $block )
        {
-               global $wgUploadPath, $wgLang ;
+               global $wgStylePath, $wgLang ;
 
                $r = "" ;
                $M = wfMsg( "minoreditletter" );
@@ -1973,8 +1973,8 @@ class Skin {
                $rcm = "RCM{$this->rcCacheIndex}" ;
                $toggleLink = "javascript:toggleVisibility(\"{$rci}\",\"{$rcm}\",\"{$rcl}\")" ;
                $arrowdir = $wgLang->isRTL() ? "l" : "r";
-               $tl  = "<span id='{$rcm}'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_{$arrowdir}.png' width='12' height='12' /></a></span>" ;
-               $tl .= "<span id='{$rcl}' style='display:none'><a href='$toggleLink'><img src='{$wgUploadPath}/Arr_d.png' width='12' height='12' /></a></span>" ;
+               $tl  = "<span id='{$rcm}'><a href='$toggleLink'><img src='{$wgStylePath}/images/Arr_{$arrowdir}.png' width='12' height='12' /></a></span>" ;
+               $tl .= "<span id='{$rcl}' style='display:none'><a href='$toggleLink'><img src='{$wgStylePath}/images/Arr_d.png' width='12' height='12' /></a></span>" ;
                $r .= $tl ;
 
                # Main line
@@ -2016,7 +2016,7 @@ class Skin {
                        # Get rc_xxxx variables
                        extract( $rcObj->mAttribs );
                        
-                       $r .= "<img src='{$wgUploadPath}/Arr_.png' width=12 height=12 />";
+                       $r .= "<img src='{$wgStylePath}/images/Arr_.png' width=12 height=12 />";
                        $r .= "<tt>&nbsp; &nbsp; &nbsp; &nbsp;" ;
                        if ( $rc_new ) $r .= $N ;
                        else $r .= "&nbsp;" ;
@@ -2058,7 +2058,7 @@ class Skin {
        # RC lines, arranges them, and outputs the HTML
        function recentChangesBlock ()
        {
-               global $wgUploadPath ;
+               global $wgStylePath ;
                if ( count ( $this->rc_cache ) == 0 ) return "" ;
                $blockOut = "";
                foreach ( $this->rc_cache AS $secureName => $block ) {
@@ -2471,7 +2471,7 @@ class Skin {
        // toolbar for common editing functions. It can be disabled in the user preferences.
        // The necsesary JavaScript code can be found in style/wikibits.js.
        function getEditToolbar() {
-               global $wgUploadPath, $wgLang, $wgMimeType;
+               global $wgStylePath, $wgLang, $wgMimeType;
 
                // toolarray an array of arrays which each include the filename of
                // the button image (without path), the opening tag, the closing tag,
@@ -2566,7 +2566,7 @@ class Skin {
                $toolbar.="document.writeln(\"<div id='toolbar'>\");\n";
                foreach($toolarray as $tool) {
 
-                       $image=$wgUploadPath."/".$tool["image"];
+                       $image=$wgStylePath."/images/".$tool["image"];
                        $open=$tool["open"];
                        $close=$tool["close"];
                        $sample = addslashes( $tool["sample"] );
index e72a2ec..76225b6 100644 (file)
@@ -62,7 +62,7 @@
 
                function outputPage( &$out ) {
                        global $wgTitle, $wgArticle, $wgUser, $wgLang, $wgOut;
-                       global $wgScript, $wgStyleSheetPath, $wgLanguageCode, $wgUseNewInterlanguage;
+                       global $wgScript, $wgStylePath, $wgLanguageCode, $wgUseNewInterlanguage;
                        global $wgMimeType, $wgOutputEncoding, $wgUseDatabaseMessages, $wgRequest;
                        global $wgDisableCounters, $wgLogo, $action, $wgFeedClasses;
                        
                        $tpl->set( "sysop", $wgUser->isSysop() );
                        */
                        $tpl->set( "searchaction", $this->escapeSearchLink() );
-                       $tpl->setRef( "stylepath", &$wgStyleSheetPath );
+                       $tpl->setRef( "stylepath", &$wgStylePath );
                        $tpl->setRef( "logopath", &$wgLogo );
                        $tpl->setRef( "lang", &$wgLanguageCode );
                        $tpl->set( "dir", $wgLang->isRTL() ? "rtl" : "ltr" );
index d2549a1..929fc3e 100644 (file)
@@ -5,31 +5,31 @@ class SkinStandard extends Skin {
 
        function getHeadScripts()
        {
-               global $wgStyleSheetPath;
+               global $wgStylePath;
 
                $s = parent::getHeadScripts();
                if ( 3 == $this->qbSetting() ) { # Floating left
                        $s .= "<script language='javascript' type='text/javascript' " .
-                         "src='{$wgStyleSheetPath}/sticky.js'></script>\n";
+                         "src='{$wgStylePath}/sticky.js'></script>\n";
                }
                return $s;
        }
 
        function getUserStyles()
        {
-               global $wgStyleSheetPath;
+               global $wgStylePath;
 
                $s = parent::getUserStyles();
                if ( 3 == $this->qbSetting() ) { # Floating left
                        $s .= "<style type='text/css'>\n" .
-                         "@import '{$wgStyleSheetPath}/quickbar.css';\n</style>\n";
+                         "@import '{$wgStylePath}/quickbar.css';\n</style>\n";
                }
                return $s;
        }
 
        function doGetUserStyles()
        {
-               global $wgUser, $wgOut, $wgStyleSheetPath;
+               global $wgUser, $wgOut, $wgStylePath;
 
                $s = parent::doGetUserStyles();
                $qb = $this->qbSetting();
index f16d734..18e9549 100644 (file)
@@ -150,7 +150,7 @@ ul {
 }
 ol {
     line-height: 1.5em;
-    margin: 0.3em 0 0 2.4em;
+    margin: 0.3em 0 0 2.2em;
     padding:0;
 }
 ul a, ol a {