Index: trunk/extensions/SocialProfile/UserWelcome/UserWelcome.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * |
7 | 7 | * @file |
8 | 8 | * @ingroup Extensions |
9 | | - * @version 1.3 |
| 9 | + * @version 1.3.1 |
10 | 10 | * @author David Pean <david.pean@gmail.com> |
11 | 11 | * @author Jack Phoenix <jack@countervandalism.net> |
12 | 12 | * @link http://www.mediawiki.org/wiki/Extension:UserWelcome Documentation |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | $wgExtensionCredits['parserhook'][] = array( |
22 | 22 | 'path' => __FILE__, |
23 | 23 | 'name' => 'UserWelcome', |
24 | | - 'version' => '1.3', |
| 24 | + 'version' => '1.3.1', |
25 | 25 | 'author' => array( 'David Pean', 'Jack Phoenix' ), |
26 | 26 | 'descriptionmsg' => 'userwelcome-desc', |
27 | 27 | 'url' => 'http://www.mediawiki.org/wiki/Extension:UserWelcome', |
— | — | @@ -30,7 +30,7 @@ |
31 | 31 | /** |
32 | 32 | * Register <welcomeUser /> tag with the parser |
33 | 33 | * @param $parser Object: instance of Parser |
34 | | - * @return true |
| 34 | + * @return Boolean: true |
35 | 35 | */ |
36 | 36 | function wfWelcomeUser( &$parser ) { |
37 | 37 | $parser->setHook( 'welcomeUser', 'getWelcomeUser' ); |
— | — | @@ -48,7 +48,7 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | function getWelcome() { |
52 | | - global $wgUser, $wgOut, $wgScriptPath, $wgUploadPath; |
| 52 | + global $wgUser, $wgOut, $wgScriptPath, $wgLang; |
53 | 53 | |
54 | 54 | // Add CSS |
55 | 55 | $wgOut->addExtensionStyle( $wgScriptPath . '/extensions/SocialProfile/UserWelcome/UserWelcome.css' ); |
— | — | @@ -69,7 +69,8 @@ |
70 | 70 | $output = '<div class="mp-welcome-logged-in"> |
71 | 71 | <h2>' . wfMsg( 'mp-welcome-logged-in', $wgUser->getName() ) . '</h2> |
72 | 72 | <div class="mp-welcome-image"> |
73 | | - <a href="' . $wgUser->getUserPage()->escapeFullURL() . '" rel="nofollow"><img src="' . $wgUploadPath . '/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0"/></a>'; |
| 73 | + <a href="' . $wgUser->getUserPage()->escapeFullURL() . '" rel="nofollow">' . |
| 74 | + $avatar->getAvatarURL() . '</a>'; |
74 | 75 | if ( strpos( $avatar->getAvatarImage(), 'default_' ) !== false ) { |
75 | 76 | $output .= '<div><a href="' . $avatar_link->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'mp-welcome-upload' ) . '</a></div>'; |
76 | 77 | } else { |
— | — | @@ -81,7 +82,12 @@ |
82 | 83 | if ( $wgUserLevels ) { |
83 | 84 | $output .= '<div class="mp-welcome-points"> |
84 | 85 | <div class="points-and-level"> |
85 | | - <div class="total-points">' . wfMsgExt( 'mp-welcome-points', 'parsemag', $stats_data['points'] ) . '</div> |
| 86 | + <div class="total-points">' . |
| 87 | + wfMsgExt( |
| 88 | + 'mp-welcome-points', |
| 89 | + 'parsemag', |
| 90 | + $wgLang->formatNum( $stats_data['points'] ) |
| 91 | + ) . '</div> |
86 | 92 | <div class="honorific-level"><a href="' . $level_link->escapeFullURL() . '">(' . $user_level->getLevelName() . ')</a></div> |
87 | 93 | </div> |
88 | 94 | <div class="cleared"></div> |