Revision: 46117
Author: aaron
Date: 2009-01-24 05:28:31 +0000 (Sat, 24 Jan 2009)
Log Message:
-----------
Add link to css/js subpage in preferences
Modified Paths:
--------------
trunk/phase3/includes/specials/SpecialPreferences.php
trunk/phase3/languages/messages/MessagesEn.php
Modified: trunk/phase3/includes/specials/SpecialPreferences.php
===================================================================
--- trunk/phase3/includes/specials/SpecialPreferences.php 2009-01-24
03:27:01 UTC (rev 46116)
+++ trunk/phase3/includes/specials/SpecialPreferences.php 2009-01-24
05:28:31 UTC (rev 46117)
@@ -864,13 +864,18 @@
}
}
asort($validSkinNames);
- foreach ($validSkinNames as $skinkey => $sn ) {
+ foreach( $validSkinNames as $skinkey => $sn ) {
$checked = $skinkey == $this->mSkin ? '
checked="checked"' : '';
$mplink = htmlspecialchars(
$mptitle->getLocalURL( "useskin=$skinkey" ) );
$previewlink = "(<a target='_blank'
href=\"$mplink\">$previewtext</a>)";
+ $cssPage = Title::makeTitleSafe( NS_USER,
$wgUser->getName().'/'.$skinkey.'.css' );
+ $jsPage = Title::makeTitleSafe( NS_USER,
$wgUser->getName().'/'.$skinkey.'.js' );
+ $customCSS = $sk->makeLinkObj( $cssPage,
wfMsgHtml('prefs-custom-css') );
+ $customJS = $sk->makeLinkObj( $jsPage,
wfMsgHtml('prefs-custom-js') );
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> $previewlink ($customCSS) ($customJS)<br
/>\n" );
}
$wgOut->addHTML( "</fieldset>\n\n" );
}
Modified: trunk/phase3/languages/messages/MessagesEn.php
===================================================================
--- trunk/phase3/languages/messages/MessagesEn.php 2009-01-24 03:27:01 UTC
(rev 46116)
+++ trunk/phase3/languages/messages/MessagesEn.php 2009-01-24 05:28:31 UTC
(rev 46117)
@@ -1574,6 +1574,8 @@
'defaultns' => 'Search in these namespaces by default:',
'default' => 'default',
'files' => 'Files',
+'prefs-custom-css' => 'Custom CSS',
+'prefs-custom-js' => 'Custom JS',
# User rights
'userrights' => 'User rights management', # Not used as
normal message but as header for the special page itself
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs