r38587 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38586‎ | r38587 | r38588 >
Date:18:44, 4 August 2008
Author:raymond
Status:old
Tags:
Comment:
* (bug 2314) Add links to users custom CSS and JS into Special:Preferences
** Attn Betawiki: Message 'skinpreview' renamed to 'skin-preview': brackets outside of the hyperlink(s) now: (Preview | associated CSS | associated JS)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -58,9 +58,6 @@
5959 'underline-never',
6060 'underline-default',
6161 ),
62 - 'skinpreview' => array(
63 - 'skinpreview',
64 - ),
6562 'dates' => array(
6663 'sunday',
6764 'monday',
@@ -754,6 +751,10 @@
755752 'qbsettings-floatingright',
756753 'changepassword',
757754 'skin',
 755+ 'skin-header',
 756+ 'skin-preview',
 757+ 'skin-link-to-css',
 758+ 'skin-link-to-js',
758759 'math',
759760 'dateformat',
760761 'datedefault',
@@ -2626,7 +2627,6 @@
26272628 XHTML id names.",
26282629 'toggles' => 'User preference toggles',
26292630 'underline' => '',
2630 - 'skinpreview' => '',
26312631 'dates' => 'Dates',
26322632 'categorypages' => 'Categories related messages',
26332633 'mainpage' => '',
Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -814,9 +814,14 @@
815815
816816 # Skin
817817 #
818 - $wgOut->addHTML( "<fieldset>\n<legend>\n" . wfMsg('skin') . "</legend>\n" );
 818+ $wgOut->addHTML(
 819+ Xml::openElement( 'fieldset' ) .
 820+ Xml::element( 'legend', null, wfMsg( 'skin' ) ) . "\n" .
 821+ wfMsg( 'skin-header' ) . "<br /><br />"
 822+ );
 823+
819824 $mptitle = Title::newMainPage();
820 - $previewtext = wfMsg('skinpreview');
 825+ $previewtext = wfMsg('skin-preview');
821826 # Only show members of Skin::getSkinNames() rather than
822827 # $skinNames (skins is all skin names from Language.php)
823828 $validSkinNames = Skin::getSkinNames();
@@ -832,15 +837,20 @@
833838 if ( in_array( $skinkey, $wgSkipSkins ) ) {
834839 continue;
835840 }
 841+ $pageCSS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.css' );
 842+ $pageJS = Title::makeTitle( NS_USER, $wgUser->getName() . '/' . $skinkey . '.js' );
 843+ $linkToCSS = $sk->link( $pageCSS, wfMsg( 'skin-link-to-css' ) );
 844+ $linkToJS = $sk->link( $pageJS, wfMsg( 'skin-link-to-js' ) );
836845 $checked = $skinkey == $this->mSkin ? ' checked="checked"' : '';
837846
838847 $mplink = htmlspecialchars($mptitle->getLocalURL("useskin=$skinkey"));
839 - $previewlink = "<a target='_blank' href=\"$mplink\">$previewtext</a>";
840 - if( $skinkey == $wgDefaultSkin )
 848+ $linkLine = " (<a target='_blank' href=\"$mplink\">$previewtext</a> | " . $linkToCSS . " | " . $linkToJS . ')';
 849+ if( $skinkey == $wgDefaultSkin ) {
841850 $sn .= ' (' . wfMsg( 'default' ) . ')';
842 - $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label> $previewlink<br />\n" );
 851+ }
 852+ $wgOut->addHTML( "<input type='radio' name='wpSkin' id=\"wpSkin$skinkey\" value=\"$skinkey\"$checked /> <label for=\"wpSkin$skinkey\">{$sn}</label>$linkLine<br />\n" );
843853 }
844 - $wgOut->addHTML( "</fieldset>\n\n" );
 854+ $wgOut->addHTML( Xml::closeElement( 'fieldset' ) );
845855
846856 # Math
847857 #
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -537,8 +537,6 @@
538538 'underline-never' => 'Never',
539539 'underline-default' => 'Browser default',
540540
541 -'skinpreview' => '(Preview)',
542 -
543541 # Dates
544542 'sunday' => 'Sunday',
545543 'monday' => 'Monday',
@@ -1405,6 +1403,10 @@
14061404 'qbsettings-floatingright' => 'Floating right',
14071405 'changepassword' => 'Change password',
14081406 'skin' => 'Skin',
 1407+'skin-header' => 'Available skins. You can customize each skin with the associated cascading style sheet (CSS) and JavaScript pages.',
 1408+'skin-preview' => 'Preview',
 1409+'skin-link-to-css' => 'associated CSS',
 1410+'skin-link-to-js' => 'associated JS',
14091411 'math' => 'Math',
14101412 'dateformat' => 'Date format',
14111413 'datedefault' => 'No preference',
Index: trunk/phase3/RELEASE-NOTES
@@ -44,6 +44,7 @@
4545 ables into into the output of Skin::makeVariablesScript
4646 * Added $wgAddGroups and $wgRemoveGroups display on Special:ListGroupRights
4747 * (bug 14377) Add a date selector to history pages
 48+* (bug 2314) Add links to users custom CSS and JS into Special:Preferences
4849
4950 === Bug fixes in 1.14 ===
5051

Follow-up revisions

RevisionCommit summaryAuthorDate
r38589Follow up for r38587: Thanks to VasilievVV for pointing out that not every wi...raymond19:33, 4 August 2008
r38610Revert r38587, r38589 for now ("(bug 2314) Add links to users custom CSS and...brion04:50, 5 August 2008
r38614Reapply part of r38587:...raymond06:01, 5 August 2008
r46123* Follow up r46117: Add new messages...raymond07:53, 24 January 2009

Status & tagging log