From: Jens Frank Date: Fri, 27 Aug 2004 05:23:52 +0000 (+0000) Subject: ENH#169: Provide plugin interface for skins. See also module "sampleskin" in extensions. X-Git-Tag: 1.5.0alpha1~2227 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=85bfd4f3755e9bbd8759e51df207d732b0f725f2;p=lhc%2Fweb%2Fwiklou.git ENH#169: Provide plugin interface for skins. See also module "sampleskin" in extensions. --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1892487e1f..7ce451804b 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -511,6 +511,7 @@ $wgDefaultSkin = 'monobook'; $wgAllowRealName = true; # Extensions +$wgSkinExtensionFunctions = array(); $wgExtensionFunctions = array(); # Allow user Javascript page? diff --git a/includes/Setup.php b/includes/Setup.php index c1a303ef16..701a02281f 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -236,6 +236,14 @@ $wgBlockCache = new BlockCache( true ); wfProfileOut( $fname.'-BlockCache' ); wfProfileIn( $fname.'-User' ); +# Extension setup functions +# Entries should be added to this variable during the inclusion +# of the extension file. This allows the extension to perform +# any necessary initialisation in the fully initialised environment +foreach ( $wgSkinExtensionFunctions as $func ) { + $func(); +} + if( $wgCommandLineMode ) { # Used for some maintenance scripts; user session cookies can screw things up # when the database is in an in-between state. diff --git a/includes/SpecialPreferences.php b/includes/SpecialPreferences.php index 596b2b803d..e8bfc3286a 100644 --- a/includes/SpecialPreferences.php +++ b/includes/SpecialPreferences.php @@ -382,8 +382,13 @@ class PreferencesForm { } else { $checked = ""; } + if ( isset( $skinNames[$skinkey] ) ) { + $sn = $skinNames[$skinkey]; + } else { + $sn = $skinname; + } $wgOut->addHTML( "
\n" ); + value=\"$skinkey\"$checked /> {$sn}\n" ); } $wgOut->addHTML( "\n\n" );