Set up Smarty skins to be usable if $wgUseSmarty is set
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 10 Mar 2004 00:56:23 +0000 (00:56 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 10 Mar 2004 00:56:23 +0000 (00:56 +0000)
includes/DefaultSettings.php
includes/Skin.php
includes/SkinSmarty.php

index 4a7fe1f..60a17a1 100644 (file)
@@ -252,6 +252,9 @@ $wgSiteNotice = "";
 
 $wgAllowAnonymousMinor = false;
 
+# Enable experimental smarty skins (put Smart/libs in your include_path!)
+$wgUseSmarty = false;
+
 if( !isset( $wgCommandLineMode ) ) {
        $wgCommandLineMode = false;
 }
index 36752f5..f4bf219 100644 (file)
@@ -6,8 +6,12 @@
 # Language class has internationalized names
 #
 /* private */ $wgValidSkinNames = array(
-       "Standard", "Nostalgia", "CologneBlue" #, "Smarty", "Montparnasse"
+       "Standard", "Nostalgia", "CologneBlue"
 );
+if( $wgUseSmarty ) {
+       $wgValidSkinNames[] = "Smarty";
+       $wgValidSkinNames[] = "Montparnasse";
+}
 
 include_once( "RecentChange.php" );
 
@@ -2381,6 +2385,8 @@ include_once( "SkinStandard.php" );
 include_once( "SkinNostalgia.php" );
 include_once( "SkinCologneBlue.php" );
 
-#include_once( "SkinSmarty.php" );
+if( $wgUseSmarty ) {
+       include_once( "SkinSmarty.php" );
+}
 
 ?>
index d71a947..8e2a3c4 100644 (file)
@@ -1,13 +1,13 @@
 <?php
 
+# And turn on $wgUseSmarty so this file gets included
+
+# Set your include_path so Smarty/libs is available
 include_once( "Smarty.class.php" );
 
 class SkinSmarty extends Skin {
        var $template;
        
-       function SkinSmarty() {
-       }
-       
        function initPage() {
                $this->template = "paddington";
        }