Index: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php |
— | — | @@ -29,8 +29,9 @@ |
30 | 30 | ); |
31 | 31 | |
32 | 32 | function wfWelcomeUser() { |
33 | | - global $wgParser; |
| 33 | + global $wgParser, $wgOut, $wgScriptPath; |
34 | 34 | $wgParser->setHook( 'welcomeUser', 'getWelcomeUser' ); |
| 35 | + $wgOut->addStyle( $wgScriptPath . '/extensions/SocialProfile/UserWelcome/UserWelcome.css' ); |
35 | 36 | return true; |
36 | 37 | } |
37 | 38 | |
— | — | @@ -38,7 +39,6 @@ |
39 | 40 | $wgExtensionMessagesFiles['UserWelcome'] = $dir . 'UserWelcome.i18n.php'; |
40 | 41 | |
41 | 42 | function getWelcomeUser( $input, $args, $parser ){ |
42 | | - |
43 | 43 | $parser->disableCache(); |
44 | 44 | $output = getWelcome(); |
45 | 45 | |
— | — | @@ -56,7 +56,7 @@ |
57 | 57 | |
58 | 58 | // Safe links |
59 | 59 | $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'mp-userlevels-link' ) ); |
60 | | - $avatar_link = Title::makeTitle( NS_SPECIAL, 'UploadAvatar' ); |
| 60 | + $avatar_link = SpecialPage::getTitleFor( 'UploadAvatar' ); |
61 | 61 | $invite_link = Title::makeTitle( NS_SPECIAL, 'InviteContacts' ); |
62 | 62 | |
63 | 63 | // Make an avatar |
— | — | @@ -78,12 +78,13 @@ |
79 | 79 | if( $wgUserLevels ){ |
80 | 80 | $output .= '<div class="mp-welcome-points"> |
81 | 81 | <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> |
83 | 83 | <div class="honorific-level"><a href="'.$level_link->escapeFullURL().'">('.$user_level->getLevelName().')</a></div> |
84 | 84 | </div> |
85 | 85 | <div class="cleared"></div> |
86 | 86 | <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(), |
88 | 89 | $user_level->getNextLevelName(), $user_level->getPointsNeededToAdvance() ) . ' |
89 | 90 | </div> |
90 | 91 | </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 |
1 | 67 | + native |