ables into into the output of Skin::makeVariablesScript
* Added $wgAddGroups and $wgRemoveGroups display on Special:ListGroupRights
* (bug 14377) Add a date selector to history pages
+* (bug 2314) Add links to users custom CSS and JS into Special:Preferences
=== Bug fixes in 1.14 ===
# Skin
#
- $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
+ $wgOut->addHTML(
+ Xml::openElement( 'fieldset' ) .
+ Xml::element( 'legend', null, wfMsg( 'skin' ) ) . "\n" .
+ wfMsg( 'skin-header' ) . "<br /><br />"
+ );
+
$mptitle = Title::newMainPage();
- $previewtext = wfMsg('skinpreview');
+ $previewtext = wfMsg('skin-preview');
# Only show members of Skin::getSkinNames() rather than
# $skinNames (skins is all skin names from Language.php)
$validSkinNames = Skin::getSkinNames();
if ( in_array( $skinkey, $wgSkipSkins ) ) {
continue;
}
+ $pageCSS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.css' );
+ $pageJS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.js' );
+ $linkToCSS = $sk->link( $pageCSS, wfMsg( 'skin-link-to-css' ) );
+ $linkToJS = $sk->link( $pageJS, wfMsg( 'skin-link-to-js' ) );
$checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
$mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
- $previewlink = "<a target='_blank' href=\"$mplink\">$previewtext</a>";
- if( $skinkey == $wgDefaultSkin )
+ $linkLine = " (<a target='_blank' href=\"$mplink\">$previewtext</a> | " . $linkToCSS . " | " . $linkToJS . ')';
+ if( $skinkey == $wgDefaultSkin ) {
$sn .= ' (' . wfMsg( 'default' ) . ')';
- $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label> $previewlink<br />\n" );
+ }
+ $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label>$linkLine<br />\n" );
}
- $wgOut->addHTML( "</fieldset>\n\n" );
+ $wgOut->addHTML( Xml::closeElement( 'fieldset' ) );
# Math
#
'underline-never' => 'Never',
'underline-default' => 'Browser default',
-'skinpreview' => '(Preview)',
-
# Dates
'sunday' => 'Sunday',
'monday' => 'Monday',
'qbsettings-floatingright' => 'Floating right',
'changepassword' => 'Change password',
'skin' => 'Skin',
+'skin-header' => 'Available skins. You can customize each skin with the associated cascading style sheet (CSS) and JavaScript pages.',
+'skin-preview' => 'Preview',
+'skin-link-to-css' => 'associated CSS',
+'skin-link-to-js' => 'associated JS',
'math' => 'Math',
'dateformat' => 'Date format',
'datedefault' => 'No preference',