r48407 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48406‎ | r48407 | r48408 >
Date:11:23, 14 March 2009
Author:ashley
Status:deferred
Tags:
Comment:
UserWelcome: add css file + other miscellaneous tweaks
Modified paths:
  • /trunk/extensions/SocialProfile/UserWelcome/UserWelcome.css (added) (history)
  • /trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php
@@ -29,8 +29,9 @@
3030 );
3131
3232 function wfWelcomeUser() {
33 - global $wgParser;
 33+ global $wgParser, $wgOut, $wgScriptPath;
3434 $wgParser->setHook( 'welcomeUser', 'getWelcomeUser' );
 35+ $wgOut->addStyle( $wgScriptPath . '/extensions/SocialProfile/UserWelcome/UserWelcome.css' );
3536 return true;
3637 }
3738
@@ -38,7 +39,6 @@
3940 $wgExtensionMessagesFiles['UserWelcome'] = $dir . 'UserWelcome.i18n.php';
4041
4142 function getWelcomeUser( $input, $args, $parser ){
42 -
4343 $parser->disableCache();
4444 $output = getWelcome();
4545
@@ -56,7 +56,7 @@
5757
5858 // Safe links
5959 $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'mp-userlevels-link' ) );
60 - $avatar_link = Title::makeTitle( NS_SPECIAL, 'UploadAvatar' );
 60+ $avatar_link = SpecialPage::getTitleFor( 'UploadAvatar' );
6161 $invite_link = Title::makeTitle( NS_SPECIAL, 'InviteContacts' );
6262
6363 // Make an avatar
@@ -78,12 +78,13 @@
7979 if( $wgUserLevels ){
8080 $output .= '<div class="mp-welcome-points">
8181 <div class="points-and-level">
82 - <div class="total-points">'.wfMsgExt( 'mp-welcome-points', array( 'parsemag' ), $stats_data['points'] ).'</div>
 82+ <div class="total-points">'.wfMsgExt( 'mp-welcome-points', 'parsemag', $stats_data['points'] ).'</div>
8383 <div class="honorific-level"><a href="'.$level_link->escapeFullURL().'">('.$user_level->getLevelName().')</a></div>
8484 </div>
8585 <div class="cleared"></div>
8686 <div class="needed-points">
87 - ' . wfMsgExt( 'mp-welcome-needed-points', array( 'parsemag' ), $level_link->escapeFullURL(),
 87+ <br />
 88+ ' . wfMsgExt( 'mp-welcome-needed-points', 'parsemag', $level_link->escapeFullURL(),
8889 $user_level->getNextLevelName(), $user_level->getPointsNeededToAdvance() ) . '
8990 </div>
9091 </div>';
Index: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.css
@@ -0,0 +1,65 @@
 2+/* Main Page welcome user */
 3+.mp-welcome-logged-in {
 4+ margin: 0px 0px 0px 15px;
 5+}
 6+
 7+.mp-welcome-logged-in h2 {
 8+ font-size: 20px;
 9+ line-height: 24px;
 10+ border-bottom: none;
 11+ padding: 8px 0px 10px 0px !important;
 12+ margin: 0px 0px 0px 0px !important;
 13+}
 14+
 15+.mp-welcome-info {
 16+ float: left;
 17+ width: 240px;
 18+}
 19+
 20+.mp-welcome-image {
 21+ float: left;
 22+ margin: 0px 10px 0px 0px;
 23+ text-align: center;
 24+}
 25+
 26+.mp-welcome-image a {
 27+ font-size: 10px;
 28+ text-decoration: none;
 29+}
 30+
 31+.mp-welcome-image img {
 32+ background-color: #FFFFFF;
 33+ border: 1px solid #DCDCDC;
 34+ padding: 3px;
 35+}
 36+
 37+.mp-welcome-points {
 38+ float: left;
 39+ width: 200px;
 40+}
 41+
 42+.points-and-level {
 43+ margin: 0px 0px 3px;
 44+}
 45+
 46+.needed-points {
 47+ color: #666666;
 48+ font-size: 10px;
 49+ line-height: 12px;
 50+ padding: 5px 0px 0px;
 51+}
 52+
 53+.total-points {
 54+ background-color: #CC0000;
 55+ color: #FFFFFF;
 56+ float: left;
 57+ font-size: 12px;
 58+ font-weight: bold;
 59+ margin: 0px 5px 0px 0px;
 60+ padding: 1px 5px;
 61+ text-align: center;
 62+}
 63+
 64+.honorific-level {
 65+ float: left;
 66+}
\ No newline at end of file
Property changes on: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.css
___________________________________________________________________
Name: svn:eol-style
167 + native

Status & tagging log