Decided to go with yet another approach for adding extra stylesheets for Vector ...
authorTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 30 Sep 2009 23:01:46 +0000 (23:01 +0000)
committerTrevor Parscal <tparscal@users.mediawiki.org>
Wed, 30 Sep 2009 23:01:46 +0000 (23:01 +0000)
1. Removed ExperiementalSkins extension
2. Added $wgVectorExtraStyles to DefaultSettings.php
3. Added code in Vector.php that adds in any extra styles defined just after adding in the main style

includes/DefaultSettings.php
skins/Vector.php

index 6f99492..6646997 100644 (file)
@@ -4108,6 +4108,14 @@ $wgVectorUseSimpleSearch = false;
  */
 $wgVectorUseIconWatch = false;
 
+/**
+ * Add extra stylesheets for Vector - This is only being used so that we can play around with different options while
+ * keeping our CSS code in the SVN and not having to change the main Vector styles. This will probably go away later on.
+ * null = add no extra styles
+ * array = list of style paths relative to skins/vector/
+ */
+$wgVectorExtraStyles = null;
+
 /**
  * Preprocessor caching threshold
  */
index e18230e..f97392e 100644 (file)
@@ -26,8 +26,8 @@ class SkinVector extends SkinTemplate {
         * @param object $out Output page object to initialize
         */
        public function initPage( OutputPage $out ) {
-               global $wgStylePath, $wgJsMimeType, $wgStyleVersion;
-
+               global $wgStylePath, $wgJsMimeType, $wgStyleVersion, $wgScriptPath, $wgVectorExtraStyles;
+               
                parent::initPage( $out );
 
                // Append skin-specific styles
@@ -41,6 +41,13 @@ class SkinVector extends SkinTemplate {
                                $wgStylePath .
                                '/vector/csshover.htc")}</style><![endif]-->'
                );
+               // Add extra stylesheets
+               // THIS IS ONLY USEFUL FOR EXPERIMENTING WITH DIFFERNT STYLE OPTIONS! THIS WILL BE REMOVED IN THE NEAR FUTURE.
+               if ( is_array( $wgVectorExtraStyles ) ) {
+                       foreach ( $wgVectorExtraStyles as $style ) {
+                               $out->addStyle( 'vector/' . $style, 'screen' );
+                       }
+               }
                // Append common IE fixes, which perhaps should be included in all
                // skins, but for now it seems each skin needs to include them
                // explicitly