r49402 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r49401‎ | r49402 | r49403 >
Date:11:45, 11 April 2009
Author:ashley
Status:deferred
Tags:
Comment:
SocialProfile: more cleanup to UserProfilePage.php
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -18,10 +18,10 @@
1919 */
2020 function __construct( &$title ){
2121 global $wgUser;
22 - parent::__construct($title);
 22+ parent::__construct( $title );
2323 $this->user_name = $title->getText();
24 - $this->user_id = User::idFromName($this->user_name);
25 - $this->user = User::newFromId($this->user_id);
 24+ $this->user_id = User::idFromName( $this->user_name );
 25+ $this->user = User::newFromId( $this->user_id );
2626 $this->user->loadFromDatabase();
2727
2828 $this->is_owner = ( $this->user_name == $wgUser->getName() );
@@ -35,7 +35,7 @@
3636 }
3737
3838 function view(){
39 - global $wgOut, $wgUser, $wgRequest, $wgTitle, $wgContLang, $wgSitename;
 39+ global $wgOut, $wgUser, $wgTitle;
4040
4141 $sk = $wgUser->getSkin();
4242
@@ -47,9 +47,9 @@
4848 return '';
4949 }
5050
51 - $wgOut->addHTML('<div id="profile-top">');
52 - $wgOut->addHTML( $this->getProfileTop($this->user_id, $this->user_name) );
53 - $wgOut->addHTML('<div class="cleared"></div></div>');
 51+ $wgOut->addHTML( '<div id="profile-top">' );
 52+ $wgOut->addHTML( $this->getProfileTop( $this->user_id, $this->user_name ) );
 53+ $wgOut->addHTML( '<div class="cleared"></div></div>' );
5454
5555 // User does not want social profile for User:user_name, so we just show header + page content
5656 if( $wgTitle->getNamespace() == NS_USER && $this->profile_data['user_id'] && $this->profile_data['user_page_type'] == 0 ){
@@ -58,44 +58,44 @@
5959 }
6060
6161 // Left side
62 - $wgOut->addHTML('<div id="user-page-left" class="clearfix">');
 62+ $wgOut->addHTML( '<div id="user-page-left" class="clearfix">' );
6363
64 - if ( !wfRunHooks( 'UserProfileBeginLeft', array( &$this ) ) ) {
 64+ if ( !wfRunHooks( 'UserProfileBeginLeft', array( &$this ) ) ) {
6565 wfDebug( __METHOD__ . ": UserProfileBeginLeft messed up profile!\n" );
6666 }
6767
68 - $wgOut->addHTML( $this->getRelationships($this->user_name, 1) );
69 - $wgOut->addHTML( $this->getRelationships($this->user_name, 2) );
70 - $wgOut->addHTML( $this->getGifts($this->user_name) );
71 - $wgOut->addHTML( $this->getAwards($this->user_name) );
72 - $wgOut->addHTML( $this->getCustomInfo($this->user_name) );
73 - $wgOut->addHTML( $this->getInterests($this->user_name) );
74 - $wgOut->addHTML( $this->getFanBoxes($this->user_name) );
75 - $wgOut->addHTML( $this->getUserStats($this->user_id, $this->user_name) );
 68+ $wgOut->addHTML( $this->getRelationships( $this->user_name, 1 ) );
 69+ $wgOut->addHTML( $this->getRelationships( $this->user_name, 2 ) );
 70+ $wgOut->addHTML( $this->getGifts( $this->user_name ) );
 71+ $wgOut->addHTML( $this->getAwards( $this->user_name ) );
 72+ $wgOut->addHTML( $this->getCustomInfo( $this->user_name ) );
 73+ $wgOut->addHTML( $this->getInterests( $this->user_name ) );
 74+ $wgOut->addHTML( $this->getFanBoxes( $this->user_name ) );
 75+ $wgOut->addHTML( $this->getUserStats( $this->user_id, $this->user_name ) );
7676
7777 if ( !wfRunHooks( 'UserProfileEndLeft', array( &$this ) ) ) {
7878 wfDebug( __METHOD__ . ": UserProfileEndLeft messed up profile!\n" );
7979 }
8080
81 - $wgOut->addHTML('</div>');
 81+ $wgOut->addHTML( '</div>' );
8282
8383 wfDebug("profile start right\n");
8484
8585 // Right side
86 - $wgOut->addHTML('<div id="user-page-right" class="clearfix">');
 86+ $wgOut->addHTML( '<div id="user-page-right" class="clearfix">' );
8787
88 - if ( !wfRunHooks( 'UserProfileBeginRight', array( &$this ) ) ) {
 88+ if ( !wfRunHooks( 'UserProfileBeginRight', array( &$this ) ) ) {
8989 wfDebug( __METHOD__ . ": UserProfileBeginRight messed up profile!\n" );
9090 }
9191
92 - $wgOut->addHTML( $this->getPersonalInfo($this->user_id, $this->user_name) );
93 - $wgOut->addHTML( $this->getUserBoard($this->user_id, $this->user_name) );
 92+ $wgOut->addHTML( $this->getPersonalInfo( $this->user_id, $this->user_name ) );
 93+ $wgOut->addHTML( $this->getUserBoard( $this->user_id, $this->user_name ) );
9494
95 - if ( !wfRunHooks( 'UserProfileEndRight', array( &$this ) ) ) {
 95+ if ( !wfRunHooks( 'UserProfileEndRight', array( &$this ) ) ) {
9696 wfDebug( __METHOD__ . ": UserProfileEndRight messed up profile!\n" );
9797 }
9898
99 - $wgOut->addHTML('</div><div class="cleared"></div>');
 99+ $wgOut->addHTML( '</div><div class="cleared"></div>' );
100100 }
101101
102102 function getUserStatsRow( $label, $value ) {
@@ -112,7 +112,7 @@
113113 }
114114
115115 function getUserStats( $user_id, $user_name ) {
116 - global $wgUser, $wgUserProfileDisplay;
 116+ global $wgUserProfileDisplay;
117117
118118 // Load messages, we're gonna need 'em
119119 wfLoadExtensionMessages( 'SocialProfileUserProfile' );
@@ -123,7 +123,7 @@
124124
125125 $output = ''; // Prevent E_NOTICE
126126
127 - $stats = new UserStats($user_id, $user_name);
 127+ $stats = new UserStats( $user_id, $user_name );
128128 $stats_data = $stats->getUserStats();
129129
130130 $total_value = $stats_data['edits'] . $stats_data['votes'] . $stats_data['comments'] . $stats_data['recruits'] . $stats_data['poll_votes'] . $stats_data['picture_game_votes'] . $stats_data['quiz_points'];
@@ -131,7 +131,7 @@
132132 if( $total_value != 0 ) {
133133 $output .= '<div class="user-section-heading">
134134 <div class="user-section-title">
135 - '.wfMsg('user-stats-title').'
 135+ ' . wfMsg( 'user-stats-title' ) . '
136136 </div>
137137 <div class="user-section-actions">
138138 <div class="action-right">
@@ -143,15 +143,15 @@
144144 </div>
145145 <div class="cleared"></div>
146146 <div class="profile-info-container bold-fix">'.
147 - $this->getUserStatsRow( wfMsgExt( 'user-stats-edits', array( 'parsemag' ), $stats_data['edits'] ), $stats_data['edits'] ) .
148 - $this->getUserStatsRow( wfMsgExt( 'user-stats-votes', array( 'parsemag' ), $stats_data['votes'] ), $stats_data['votes'] ) .
149 - $this->getUserStatsRow( wfMsgExt( 'user-stats-comments', array( 'parsemag' ), $stats_data['comments'] ), $stats_data['comments'] ) .
150 - $this->getUserStatsRow( wfMsgExt( 'user-stats-recruits', array( 'parsemag' ), $stats_data['recruits'] ), $stats_data['recruits'] ) .
151 - $this->getUserStatsRow( wfMsgExt( 'user-stats-poll-votes', array( 'parsemag' ), $stats_data['poll_votes'] ), $stats_data['poll_votes'] ) .
152 - $this->getUserStatsRow( wfMsgExt( 'user-stats-picture-game-votes', array( 'parsemag' ), $stats_data['picture_game_votes']), $stats_data['picture_game_votes'] ) .
153 - $this->getUserStatsRow( wfMsgExt( 'user-stats-quiz-points', array( 'parsemag' ), $stats_data['quiz_points'] ), $stats_data['quiz_points'] );
 147+ $this->getUserStatsRow( wfMsgExt( 'user-stats-edits', 'parsemag', $stats_data['edits'] ), $stats_data['edits'] ) .
 148+ $this->getUserStatsRow( wfMsgExt( 'user-stats-votes', 'parsemag', $stats_data['votes'] ), $stats_data['votes'] ) .
 149+ $this->getUserStatsRow( wfMsgExt( 'user-stats-comments', 'parsemag', $stats_data['comments'] ), $stats_data['comments'] ) .
 150+ $this->getUserStatsRow( wfMsgExt( 'user-stats-recruits', 'parsemag', $stats_data['recruits'] ), $stats_data['recruits'] ) .
 151+ $this->getUserStatsRow( wfMsgExt( 'user-stats-poll-votes', 'parsemag', $stats_data['poll_votes'] ), $stats_data['poll_votes'] ) .
 152+ $this->getUserStatsRow( wfMsgExt( 'user-stats-picture-game-votes', 'parsemag', $stats_data['picture_game_votes']), $stats_data['picture_game_votes'] ) .
 153+ $this->getUserStatsRow( wfMsgExt( 'user-stats-quiz-points', 'parsemag', $stats_data['quiz_points'] ), $stats_data['quiz_points'] );
154154 if( $stats_data['currency'] != '10,000' )
155 - $output .= $this->getUserStatsRow( wfMsgExt( 'user-stats-pick-points', array( 'parsemag' ), $stats_data['currency'] ), $stats_data['currency'] );
 155+ $output .= $this->getUserStatsRow( wfMsgExt( 'user-stats-pick-points', 'parsemag', $stats_data['currency'] ), $stats_data['currency'] );
156156 $output .= '</div>';
157157 }
158158
@@ -183,7 +183,7 @@
184184 }
185185 }
186186
187 - $value = $wgOut->parse( trim($value), false );
 187+ $value = $wgOut->parse( trim( $value ), false );
188188
189189 $output = "<div><b>{$label}</b>{$value}</div>";
190190 }
@@ -191,7 +191,7 @@
192192 }
193193
194194 function getPersonalInfo( $user_id, $user_name ) {
195 - global $wgUser, $wgMemc, $wgUserProfileDisplay;
 195+ global $wgUser, $wgUserProfileDisplay;
196196
197197 // Load messages, we're gonna need 'em
198198 wfLoadExtensionMessages( 'SocialProfileUserProfile' );
@@ -200,31 +200,31 @@
201201 return '';
202202 }
203203
204 - $stats = new UserStats($user_id, $user_name);
 204+ $stats = new UserStats( $user_id, $user_name );
205205 $stats_data = $stats->getUserStats();
206 - $user_level = new UserLevel($stats_data['points']);
207 - $level_link = Title::makeTitle( NS_HELP, wfMsgHtml('user-profile-userlevels-link') );
 206+ $user_level = new UserLevel( $stats_data['points'] );
 207+ $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'user-profile-userlevels-link' ) );
208208
209209 if( !$this->profile_data ){
210 - $profile = new UserProfile($user_name);
 210+ $profile = new UserProfile( $user_name );
211211 $this->profile_data = $profile->getProfile();
212212 }
213213 $profile_data = $this->profile_data;
214214
215 - $location = $profile_data['location_city'] . ", " . $profile_data['location_state'];
 215+ $location = $profile_data['location_city'] . ', ' . $profile_data['location_state'];
216216 if( $profile_data['location_country'] != 'United States' ){
217217 $location = '';
218218 $location .= $profile_data['location_country'];
219219 }
220220
221 - if( $location == ", " ) $location = '';
 221+ if( $location == ', ' ) $location = '';
222222
223 - $hometown = $profile_data['hometown_city'] . ", " . $profile_data['hometown_state'];
 223+ $hometown = $profile_data['hometown_city'] . ', ' . $profile_data['hometown_state'];
224224 if( $profile_data['hometown_country'] != 'United States' ){
225225 $hometown = '';
226226 $hometown .= $profile_data['hometown_country'];
227227 }
228 - if( $hometown == ", " ) $hometown = '';
 228+ if( $hometown == ', ' ) $hometown = '';
229229
230230 $joined_data = $profile_data['real_name'] . $location. $hometown . $profile_data['birthday'] . $profile_data['occupation'] . $profile_data['websites'] . $profile_data['places_lived'] . $profile_data['schools'] . $profile_data['about'];
231231 $edit_info_link = SpecialPage::getTitleFor( 'UpdateProfile' );
@@ -233,12 +233,12 @@
234234 if( $joined_data ) {
235235 $output .= '<div class="user-section-heading">
236236 <div class="user-section-title">
237 - '.wfMsg('user-personal-info-title').'
 237+ ' . wfMsg( 'user-personal-info-title' ) . '
238238 </div>
239239 <div class="user-section-actions">
240240 <div class="action-right">';
241241 if( $wgUser->getName() == $user_name ) {
242 - $output .= '<a href="'.$edit_info_link->escapeFullURL().'">'.wfMsg('user-edit-this').'</a>';
 242+ $output .= '<a href="' . $edit_info_link->escapeFullURL() . '">' . wfMsg( 'user-edit-this' ) . '</a>';
243243 }
244244 $output .= '</div>
245245 <div class="cleared"></div>
@@ -246,25 +246,25 @@
247247 </div>
248248 <div class="cleared"></div>
249249 <div class="profile-info-container">'.
250 - $this->getProfileSection(wfMsg('user-personal-info-real-name'), $profile_data['real_name'], false).
251 - $this->getProfileSection(wfMsg('user-personal-info-location'), $location, false).
252 - $this->getProfileSection(wfMsg('user-personal-info-hometown'), $hometown, false).
253 - $this->getProfileSection(wfMsg('user-personal-info-birthday'), $profile_data['birthday'], false).
254 - $this->getProfileSection(wfMsg('user-personal-info-occupation'), $profile_data['occupation'], false).
255 - $this->getProfileSection(wfMsg('user-personal-info-websites'), $profile_data['websites'], false).
256 - $this->getProfileSection(wfMsg('user-personal-info-places-lived'), $profile_data['places_lived'], false).
257 - $this->getProfileSection(wfMsg('user-personal-info-schools'), $profile_data['schools'], false).
258 - $this->getProfileSection(wfMsg('user-personal-info-about-me'), $profile_data['about'], false).
259 - "</div>";
 250+ $this->getProfileSection( wfMsg( 'user-personal-info-real-name' ), $profile_data['real_name'], false ).
 251+ $this->getProfileSection( wfMsg( 'user-personal-info-location' ), $location, false ).
 252+ $this->getProfileSection( wfMsg( 'user-personal-info-hometown' ), $hometown, false ).
 253+ $this->getProfileSection( wfMsg( 'user-personal-info-birthday' ), $profile_data['birthday'], false ).
 254+ $this->getProfileSection( wfMsg( 'user-personal-info-occupation' ), $profile_data['occupation'], false ).
 255+ $this->getProfileSection( wfMsg( 'user-personal-info-websites' ), $profile_data['websites'], false ).
 256+ $this->getProfileSection( wfMsg( 'user-personal-info-places-lived' ), $profile_data['places_lived'], false ).
 257+ $this->getProfileSection( wfMsg( 'user-personal-info-schools' ), $profile_data['schools'], false ).
 258+ $this->getProfileSection( wfMsg( 'user-personal-info-about-me' ), $profile_data['about'], false ).
 259+ '</div>';
260260 } else if( $wgUser->getName() == $user_name ) {
261261 $output .= '<div class="user-section-heading">
262262 <div class="user-section-title">
263 - '.wfMsg('user-personal-info-title').'
 263+ ' . wfMsg( 'user-personal-info-title' ) . '
264264 </div>
265265 <div class="user-section-actions">
266266 <div class="action-right">
267 - <a href="'.$edit_info_link->escapeFullURL().'">'
268 - .wfMsg('user-edit-this').
 267+ <a href="' . $edit_info_link->escapeFullURL() . '">'
 268+ . wfMsg( 'user-edit-this' ) .
269269 '</a>
270270 </div>
271271 <div class="cleared"></div>
@@ -272,7 +272,7 @@
273273 </div>
274274 <div class="cleared"></div>
275275 <div class="no-info-container">
276 - '.wfMsg('user-no-personal-info').'
 276+ ' . wfMsg( 'user-no-personal-info' ) . '
277277 </div>';
278278 }
279279
@@ -280,7 +280,7 @@
281281 }
282282
283283 function getCustomInfo( $user_name ) {
284 - global $wgUser, $wgMemc, $wgUserProfileDisplay;
 284+ global $wgUser, $wgUserProfileDisplay;
285285
286286 if( $wgUserProfileDisplay['custom'] == false ) {
287287 return '';
@@ -299,12 +299,12 @@
300300 if( $joined_data ) {
301301 $output .= '<div class="user-section-heading">
302302 <div class="user-section-title">
303 - '.wfMsg('custom-info-title').'
 303+ ' . wfMsg( 'custom-info-title' ) . '
304304 </div>
305305 <div class="user-section-actions">
306306 <div class="action-right">';
307307 if( $wgUser->getName() == $user_name ) {
308 - $output .= '<a href="'.$edit_info_link->escapeFullURL().'/custom">'.wfMsg('user-edit-this').'</a>';
 308+ $output .= '<a href="' . $edit_info_link->escapeFullURL() . '/custom">' . wfMsg( 'user-edit-this' ) . '</a>';
309309 }
310310 $output .= '</div>
311311 <div class="cleared"></div>
@@ -312,20 +312,20 @@
313313 </div>
314314 <div class="cleared"></div>
315315 <div class="profile-info-container">'.
316 - $this->getProfileSection(wfMsg('custom-info-field1'), $profile_data['custom_1'], false).
317 - $this->getProfileSection(wfMsg('custom-info-field2'), $profile_data['custom_2'], false).
318 - $this->getProfileSection(wfMsg('custom-info-field3'), $profile_data['custom_3'], false).
319 - $this->getProfileSection(wfMsg('custom-info-field4'), $profile_data['custom_4'], false).
320 - "</div>";
 316+ $this->getProfileSection( wfMsg( 'custom-info-field1' ), $profile_data['custom_1'], false ).
 317+ $this->getProfileSection( wfMsg( 'custom-info-field2' ), $profile_data['custom_2'], false ).
 318+ $this->getProfileSection( wfMsg( 'custom-info-field3' ), $profile_data['custom_3'], false ).
 319+ $this->getProfileSection( wfMsg( 'custom-info-field4' ), $profile_data['custom_4'], false ).
 320+ '</div>';
321321 } else if( $wgUser->getName() == $user_name ) {
322322 $output .= '<div class="user-section-heading">
323323 <div class="user-section-title">
324 - '.wfMsg('custom-info-title').'
 324+ ' . wfMsg( 'custom-info-title' ) . '
325325 </div>
326326 <div class="user-section-actions">
327327 <div class="action-right">
328 - <a href="'.$edit_info_link->escapeFullURL().'/custom">
329 - '.wfMsg('user-edit-this').'
 328+ <a href="' . $edit_info_link->escapeFullURL() . '/custom">
 329+ ' . wfMsg( 'user-edit-this' ) . '
330330 </a>
331331 </div>
332332 <div class="cleared"></div>
@@ -333,7 +333,7 @@
334334 </div>
335335 <div class="cleared"></div>
336336 <div class="no-info-container">
337 - '.wfMsg('custom-no-info').'
 337+ ' . wfMsg( 'custom-no-info' ) . '
338338 </div>';
339339 }
340340
@@ -341,7 +341,7 @@
342342 }
343343
344344 function getInterests( $user_name ) {
345 - global $wgUser, $wgMemc, $wgUserProfileDisplay;
 345+ global $wgUser, $wgUserProfileDisplay;
346346
347347 // Load messages, we're gonna need 'em
348348 wfLoadExtensionMessages( 'SocialProfileUserProfile' );
@@ -351,7 +351,7 @@
352352 }
353353
354354 if( !$this->profile_data ){
355 - $profile = new UserProfile($user_name);
 355+ $profile = new UserProfile( $user_name );
356356 $this->profile_data = $profile->getProfile();
357357 }
358358 $profile_data = $this->profile_data;
@@ -363,12 +363,12 @@
364364
365365 $output .= '<div class="user-section-heading">
366366 <div class="user-section-title">
367 - '.wfMsg('other-info-title').'
 367+ ' . wfMsg( 'other-info-title' ) . '
368368 </div>
369369 <div class="user-section-actions">
370370 <div class="action-right">';
371371 if( $wgUser->getName() == $user_name ) {
372 - $output .= '<a href="'.$edit_info_link->escapeFullURL().'/personal">'.wfMsg('user-edit-this').'</a>';
 372+ $output .= '<a href="' . $edit_info_link->escapeFullURL() . '/personal">' . wfMsg( 'user-edit-this' ) . '</a>';
373373 }
374374 $output .= '</div>
375375 <div class="cleared"></div>
@@ -376,59 +376,59 @@
377377 </div>
378378 <div class="cleared"></div>
379379 <div class="profile-info-container">'.
380 - $this->getProfileSection(wfMsg('other-info-movies'), $profile_data['movies'], false).
381 - $this->getProfileSection(wfMsg('other-info-tv'), $profile_data['tv'], false).
382 - $this->getProfileSection(wfMsg('other-info-music'), $profile_data['music'], false).
383 - $this->getProfileSection(wfMsg('other-info-books'), $profile_data['books'], false).
384 - $this->getProfileSection(wfMsg('other-info-video-games'), $profile_data['video_games'], false).
385 - $this->getProfileSection(wfMsg('other-info-magazines'), $profile_data['magazines'], false).
386 - $this->getProfileSection(wfMsg('other-info-snacks'), $profile_data['snacks'], false).
387 - $this->getProfileSection(wfMsg('other-info-drinks'), $profile_data['drinks'], false).
 380+ $this->getProfileSection( wfMsg( 'other-info-movies' ), $profile_data['movies'], false ).
 381+ $this->getProfileSection( wfMsg( 'other-info-tv' ), $profile_data['tv'], false ).
 382+ $this->getProfileSection( wfMsg( 'other-info-music' ), $profile_data['music'], false ).
 383+ $this->getProfileSection( wfMsg( 'other-info-books' ), $profile_data['books'], false ).
 384+ $this->getProfileSection( wfMsg( 'other-info-video-games' ), $profile_data['video_games'], false ).
 385+ $this->getProfileSection( wfMsg( 'other-info-magazines' ), $profile_data['magazines'], false ).
 386+ $this->getProfileSection( wfMsg( 'other-info-snacks' ), $profile_data['snacks'], false ).
 387+ $this->getProfileSection( wfMsg( 'other-info-drinks' ), $profile_data['drinks'], false ).
388388 '</div>';
389389
390390 } else if( $wgUser->getName() == $user_name ) {
391391 $output .= '<div class="user-section-heading">
392392 <div class="user-section-title">
393 - '.wfMsg('other-info-title').'
 393+ ' . wfMsg( 'other-info-title' ) . '
394394 </div>
395395 <div class="user-section-actions">
396396 <div class="action-right">
397 - <a href="'.$edit_info_link->escapeFullURL().'/personal">'.wfMsg('user-edit-this').'</a>
 397+ <a href="' . $edit_info_link->escapeFullURL() . '/personal">' . wfMsg( 'user-edit-this' ) . '</a>
398398 </div>
399399 <div class="cleared"></div>
400400 </div>
401401 </div>
402402 <div class="cleared"></div>
403403 <div class="no-info-container">
404 - '.wfMsg('other-no-info').'
 404+ ' . wfMsg( 'other-no-info' ) . '
405405 </div>';
406406 }
407407 return $output;
408408 }
409409
410410 function getProfileTop( $user_id, $user_name ) {
411 - global $wgTitle, $wgUser, $wgMemc, $wgUploadPath, $wgLang;
 411+ global $wgTitle, $wgUser, $wgUploadPath, $wgLang;
412412
413413 // Load messages, we're gonna need 'em
414414 wfLoadExtensionMessages( 'SocialProfileUserProfile' );
415415
416 - $stats = new UserStats($user_id, $user_name);
 416+ $stats = new UserStats( $user_id, $user_name );
417417 $stats_data = $stats->getUserStats();
418 - $user_level = new UserLevel($stats_data['points']);
419 - $level_link = Title::makeTitle( NS_HELP, wfMsgHtml('user-profile-userlevels-link') );
 418+ $user_level = new UserLevel( $stats_data['points'] );
 419+ $level_link = Title::makeTitle( NS_HELP, wfMsgHtml( 'user-profile-userlevels-link' ) );
420420
421421 if( !$this->profile_data ){
422 - $profile = new UserProfile($user_name);
 422+ $profile = new UserProfile( $user_name );
423423 $this->profile_data = $profile->getProfile();
424424 }
425425 $profile_data = $this->profile_data;
426426
427427 // Variables and other crap
428428 $page_title = $wgTitle->getText();
429 - $title_parts = explode("/", $page_title);
 429+ $title_parts = explode( '/', $page_title );
430430 $user = $title_parts[0];
431 - $id = User::idFromName($user);
432 - $user_safe = urlencode($user);
 431+ $id = User::idFromName( $user );
 432+ $user_safe = urlencode( $user );
433433
434434 // Safe urls
435435 $add_relationship = SpecialPage::getTitleFor( 'AddRelationship' );
@@ -447,33 +447,37 @@
448448 $user_wiki = Title::makeTitle( NS_USER_WIKI, $user );
449449
450450 if( $id != 0 ) $relationship = UserRelationship::getUserRelationshipByID( $id, $wgUser->getID() );
451 - $avatar = new wAvatar($this->user_id, 'l');
 451+ $avatar = new wAvatar( $this->user_id, 'l' );
452452
453453 wfDebug("profile type" . $profile_data['user_page_type'] . "\n");
454454 $output = '';
455455 if ( $this->isOwner() ) {
456456 $toggle_title = SpecialPage::getTitleFor( 'ToggleUserPage' );
457 - $output .= '<div id="profile-toggle-button"><a href="'.$toggle_title->escapeFullURL().'" rel="nofollow">'. ( ( $this->profile_data['user_page_type'] == 1 ) ? wfMsg('user-type-toggle-old') : wfMsg('user-type-toggle-new') ) .'</a></div>';
 457+ $output .= '<div id="profile-toggle-button">
 458+ <a href="' . $toggle_title->escapeFullURL() . '" rel="nofollow">'
 459+ . ( ( $this->profile_data['user_page_type'] == 1 ) ? wfMsg( 'user-type-toggle-old' ) : wfMsg( 'user-type-toggle-new' ) ) .
 460+ '</a>
 461+ </div>';
458462 }
459463
460464 $output .= '<div id="profile-image">
461 - <img src="'.$wgUploadPath.'/avatars/'.$avatar->getAvatarImage().'" alt="" border="0"/>
 465+ <img src="' . $wgUploadPath . '/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0" />
462466 </div>';
463467
464468 $output .= '<div id="profile-right">';
465469
466470 $output .= '<div id="profile-title-container">
467471 <div id="profile-title">
468 - '.$user_name.'
 472+ ' . $user_name . '
469473 </div>';
470474 global $wgUserLevels;
471475 if( $wgUserLevels ){
472 - $output .= "<div id=\"points-level\">
473 - <a href=\"{$level_link->escapeFullURL()}\">" . wfMsgExt( 'user-profile-points', 'parsemag', $stats_data["points"] ) . "</a>
 476+ $output .= '<div id="points-level">
 477+ <a href="' . $level_link->escapeFullURL() .'">' . wfMsgExt( 'user-profile-points', 'parsemag', $stats_data['points'] ) . '</a>
474478 </div>
475 - <div id=\"honorific-level\">
476 - <a href=\"{$level_link->escapeFullURL()}\" rel=\"nofollow\">({$user_level->getLevelName()})</a>
477 - </div>";
 479+ <div id="honorific-level">
 480+ <a href="' . $level_link->escapeFullURL() .'" rel="nofollow">(' . $user_level->getLevelName() .')</a>
 481+ </div>';
478482 }
479483 $output .= '<div class="cleared"></div>
480484 </div>
@@ -489,8 +493,8 @@
490494 } else if( $wgUser->isLoggedIn() ) {
491495 if( $relationship == false ) {
492496 $output .= $wgLang->pipeList( array(
493 - '<a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=1').'" rel="nofollow">'.wfMsg('user-add-friend').'</a>',
494 - '<a href="'.$add_relationship->escapeFullURL('user='.$user_safe.'&rel_type=2').'" rel="nofollow">'.wfMsg('user-add-foe').'</a>',
 497+ '<a href="' . $add_relationship->escapeFullURL( 'user=' . $user_safe . '&rel_type=1' ) . '" rel="nofollow">' . wfMsg( 'user-add-friend' ) . '</a>',
 498+ '<a href="' . $add_relationship->escapeFullURL( 'user=' . $user_safe . '&rel_type=2' ) . '" rel="nofollow">' . wfMsg( 'user-add-foe' ) . '</a>',
495499 ''
496500 ) );
497501 } else {
@@ -510,27 +514,27 @@
511515
512516 global $wgUserBoard;
513517 if( $wgUserBoard ){
514 - $output .= '<a href="'.$send_message->escapeFullURL('user='.$wgUser->getName().'&conv='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-message').'</a>';
515 - $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 518+ $output .= '<a href="' . $send_message->escapeFullURL( 'user=' . $wgUser->getName() . '&conv=' . $user_safe ) . '" rel="nofollow">' . wfMsg( 'user-send-message' ) . '</a>';
 519+ $output .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
516520 }
517 - $output .= '<a href="'.$give_gift->escapeFullURL('user='.$user_safe).'" rel="nofollow">'.wfMsg('user-send-gift').'</a>';
518 - $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 521+ $output .= '<a href="' . $give_gift->escapeFullURL( 'user=' . $user_safe ) . '" rel="nofollow">' . wfMsg( 'user-send-gift' ) . '</a>';
 522+ $output .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
519523 }
520524
521 - $output .= '<a href="'.$contributions->escapeFullURL().'" rel="nofollow">'.wfMsg('user-contributions').'</a> ';
 525+ $output .= '<a href="' . $contributions->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'user-contributions' ) . '</a> ';
522526
523527 // Links to User:user_name from User_profile:
524528 if( $wgTitle->getNamespace() == NS_USER_PROFILE && $this->profile_data['user_id'] && $this->profile_data['user_page_type'] == 0 ){
525 - $output .= '| <a href="'.$user_page->escapeFullURL().'" rel="nofollow">'.wfMsg('user-page-link').'</a> ';
 529+ $output .= '| <a href="' . $user_page->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'user-page-link' ) . '</a> ';
526530 }
527531
528532 // Links to User:user_name from User_profile:
529533 if( $wgTitle->getNamespace() == NS_USER && $this->profile_data['user_id'] && $this->profile_data['user_page_type'] == 0 ){
530 - $output .= '| <a href="'.$user_social_profile->escapeFullURL().'" rel="nofollow">'.wfMsg('user-social-profile-link').'</a> ';
 534+ $output .= '| <a href="' . $user_social_profile->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'user-social-profile-link' ) . '</a> ';
531535 }
532536
533537 if( $wgTitle->getNamespace() == NS_USER && ( !$this->profile_data['user_id'] || $this->profile_data['user_page_type'] == 1 ) ){
534 - $output .= '| <a href="'.$user_wiki->escapeFullURL().'" rel="nofollow">'.wfMsg('user-wiki-link').'</a>';
 538+ $output .= '| <a href="' . $user_wiki->escapeFullURL() . '" rel="nofollow">' . wfMsg( 'user-wiki-link' ) . '</a>';
535539 }
536540
537541 $output .= '</div>
@@ -543,17 +547,17 @@
544548 function getProfileImage( $user_name ){
545549 global $wgUser, $wgUploadPath;
546550
547 - $avatar = new wAvatar($this->user_id, 'l');
 551+ $avatar = new wAvatar( $this->user_id, 'l' );
548552 $avatar_title = SpecialPage::getTitleFor( 'UploadAvatar' );
549553
550554 $output .= '<div class="profile-image">';
551555 if( $wgUser->getName() == $this->user_name ) {
552 - $output .= "<a href=\"{$avatar->escapeFullURL()}\" rel=\"nofollow\">
553 - <img src=\"{$wgUploadPath}/avatars/".$avatar->getAvatarImage()."\" alt=\"\" border=\"0\"/><br />
554 - (".( ( strpos( $avatar->getAvatarImage(), 'default_' ) != false ) ? "upload image" : "new image" ).")
555 - </a>";
 556+ $output .= '<a href="' . $avatar->escapeFullURL() .'" rel="nofollow">
 557+ <img src="' . $wgUploadPath . '/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0" /><br />
 558+ (' . ( ( strpos( $avatar->getAvatarImage(), 'default_' ) != false ) ? 'upload image' : 'new image' ) . ')
 559+ </a>';
556560 } else {
557 - $output .= '<img src="'.$wgUploadPath.'/avatars/'.$avatar->getAvatarImage().'" alt="" border="0"/>';
 561+ $output .= '<img src="' . $wgUploadPath . '/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0" />';
558562 }
559563 $output .= '</div>';
560564
@@ -586,41 +590,40 @@
587591
588592 // Try cache
589593 if( !$data ) {
590 - $friends = $rel->getRelationshipList($rel_type,$count);
 594+ $friends = $rel->getRelationshipList( $rel_type, $count );
591595 $wgMemc->set( $key, $friends );
592596 } else {
593597 wfDebug( "Got profile relationship type {$rel_type} for user {$user_name} from cache\n" );
594598 $friends = $data;
595599 }
596600
597 - $stats = new UserStats($rel->user_id, $user_name);
 601+ $stats = new UserStats( $rel->user_id, $user_name );
598602 $stats_data = $stats->getUserStats();
599603 $user_safe = urlencode( $user_name );
600604 $view_all_title = SpecialPage::getTitleFor( 'ViewRelationships' );
601605
602606 if( $rel_type == 1 ) {
603607 $relationship_count = $stats_data['friend_count'];
604 - $relationship_title = wfMsg('user-friends-title');
605 -
 608+ $relationship_title = wfMsg( 'user-friends-title' );
606609 } else {
607610 $relationship_count = $stats_data['foe_count'];
608 - $relationship_title = wfMsg('user-foes-title');
 611+ $relationship_title = wfMsg( 'user-foes-title' );
609612 }
610613
611 - if( count($friends) > 0 ) {
 614+ if( count( $friends ) > 0 ) {
612615 $x = 1;
613616 $per_row = 4;
614617
615618 $output .= '<div class="user-section-heading">
616 - <div class="user-section-title">'.$relationship_title.'</div>
 619+ <div class="user-section-title">' . $relationship_title . '</div>
617620 <div class="user-section-actions">
618621 <div class="action-right">';
619 - if( intval( str_replace( ",", "", $relationship_count ) ) > 4 ) {
620 - $output .= '<a href="'.$view_all_title->escapeFullURL('user='.$user_name.'&rel_type='.$rel_type).'" rel="nofollow">'.wfMsg('user-view-all').'</a>';
 622+ if( intval( str_replace( ',', '', $relationship_count ) ) > 4 ) {
 623+ $output .= '<a href="' . $view_all_title->escapeFullURL( 'user=' . $user_name . '&rel_type=' . $rel_type ) . '" rel="nofollow">' . wfMsg( 'user-view-all' ) . '</a>';
621624 }
622625 $output .= '</div>
623626 <div class="action-left">';
624 - if( intval( str_replace( ",", "", $relationship_count ) ) > 4 ) {
 627+ if( intval( str_replace( ',', '', $relationship_count ) ) > 4 ) {
625628 $output .= wfMsg( 'user-count-separator', $per_row, $relationship_count );
626629 } else {
627630 $output .= wfMsg( 'user-count-separator', $relationship_count, $relationship_count );
@@ -635,17 +638,17 @@
636639 foreach( $friends as $friend ) {
637640 $user = Title::makeTitle( NS_USER, $friend['user_name'] );
638641 $avatar = new wAvatar( $friend['user_id'], 'ml' );
639 - $avatar_img = '<img src="'.$wgUploadPath.'/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0"/>';
 642+ $avatar_img = '<img src="' . $wgUploadPath . '/avatars/' . $avatar->getAvatarImage() . '" alt="" border="0" />';
640643
641644 // Chop down username that gets displayed
642 - $user_name = substr($friend['user_name'], 0, 9);
 645+ $user_name = substr( $friend['user_name'], 0, 9 );
643646 if( $user_name != $friend['user_name'] ) $user_name.= '..';
644647
645648 $output .= "<a href=\"".$user->escapeFullURL()."\" title=\"{$friend["user_name"]}\" rel=\"nofollow\">
646649 {$avatar_img}<br />
647650 {$user_name}
648651 </a>";
649 - if( $x == count($friends) || $x != 1 && $x%$per_row == 0 ) $output.= '<div class="cleared"></div>';
 652+ if( $x == count( $friends ) || $x != 1 && $x%$per_row == 0 ) $output.= '<div class="cleared"></div>';
650653 $x++;
651654 }
652655 $output .= '</div>';
@@ -667,8 +670,8 @@
668671 $output = '';
669672
670673 // USER TO USER GIFTS
671 - $g = new UserGifts($user_name);
672 - $user_safe = urlencode($user_name);
 674+ $g = new UserGifts( $user_name );
 675+ $user_safe = urlencode( $user_name );
673676
674677 // Try cache
675678 $key = wfMemcKey( 'user', 'profile', 'gifts', "{$g->user_id}" );
@@ -676,14 +679,14 @@
677680
678681 if( !$data ){
679682 wfDebug( "Got profile gifts for user {$user_name} from DB\n" );
680 - $gifts = $g->getUserGiftList(0, 4);
 683+ $gifts = $g->getUserGiftList( 0, 4 );
681684 $wgMemc->set( $key, $gifts, 60 * 60 * 4 );
682685 } else {
683686 wfDebug( "Got profile gifts for user {$user_name} from cache\n" );
684687 $gifts = $data;
685688 }
686689
687 - $gift_count = $g->getGiftCountByUsername($user_name);
 690+ $gift_count = $g->getGiftCountByUsername( $user_name );
688691 $gift_link = SpecialPage::getTitleFor( 'ViewGifts' );
689692 $per_row = 4;
690693
@@ -691,17 +694,17 @@
692695
693696 $output .= '<div class="user-section-heading">
694697 <div class="user-section-title">
695 - '.wfMsg('user-gifts-title').'
 698+ ' . wfMsg( 'user-gifts-title' ) . '
696699 </div>
697700 <div class="user-section-actions">
698701 <div class="action-right">';
699702 if( $gift_count > 4 ) {
700 - $output .= '<a href="'.$gift_link->escapeFullURL('user='.$user_safe).'" rel="nofollow">'.wfMsg('user-view-all').'</a>';
 703+ $output .= '<a href="' . $gift_link->escapeFullURL( 'user=' . $user_safe ) . '" rel="nofollow">' . wfMsg( 'user-view-all' ) . '</a>';
701704 }
702705 $output .= '</div>
703706 <div class="action-left">';
704707 if( $gift_count > 4 ) {
705 - $output .= wfMsg( 'user-count-separator', "4", $gift_count );
 708+ $output .= wfMsg( 'user-count-separator', '4', $gift_count );
706709 } else {
707710 $output .= wfMsg( 'user-count-separator', $gift_count, $gift_count );
708711 }
@@ -723,10 +726,10 @@
724727 }
725728
726729 $user = Title::makeTitle( NS_USER, $gift['user_name_from'] );
727 - $gift_image = '<img src="'.$wgUploadPath.'/awards/' . Gifts::getGiftImage( $gift['gift_id'], 'ml' ) . '" border="0" alt="" />';
 730+ $gift_image = '<img src="' . $wgUploadPath . '/awards/' . Gifts::getGiftImage( $gift['gift_id'], 'ml' ) . '" border="0" alt="" />';
728731 $gift_link = $user = SpecialPage::getTitleFor( 'ViewGift' );
729732 $output .= "<a href=\"".$gift_link->escapeFullURL('gift_id='.$gift['id'])."\" ".( ( $gift['status'] == 1 ) ? 'class="user-page-new"' : '' )." rel=\"nofollow\">{$gift_image}</a>";
730 - if( $x == count($gifts) || $x != 1 && $x%$per_row == 0 ) $output .= '<div class="cleared"></div>';
 733+ if( $x == count( $gifts ) || $x != 1 && $x%$per_row == 0 ) $output .= '<div class="cleared"></div>';
731734 $x++;
732735
733736 }
@@ -751,21 +754,21 @@
752755 $output = '';
753756
754757 // SYSTEM GIFTS
755 - $sg = new UserSystemGifts($user_name);
 758+ $sg = new UserSystemGifts( $user_name );
756759
757760 // Try cache
758761 $sg_key = wfMemcKey( 'user', 'profile', 'system_gifts', "{$sg->user_id}" );
759762 $data = $wgMemc->get( $sg_key );
760763 if( !$data ){
761764 wfDebug( "Got profile awards for user {$user_name} from DB\n" );
762 - $system_gifts = $sg->getUserGiftList(0, 4);
 765+ $system_gifts = $sg->getUserGiftList( 0, 4 );
763766 $wgMemc->set( $sg_key, $system_gifts, 60 * 60 * 4 );
764767 } else {
765768 wfDebug( "Got profile awards for user {$user_name} from cache\n" );
766769 $system_gifts = $data;
767770 }
768771
769 - $system_gift_count = $sg->getGiftCountByUsername($user_name);
 772+ $system_gift_count = $sg->getGiftCountByUsername( $user_name );
770773 $system_gift_link = SpecialPage::getTitleFor( 'ViewSystemGifts' );
771774 $per_row = 4;
772775
@@ -774,44 +777,44 @@
775778
776779 $output .= '<div class="user-section-heading">
777780 <div class="user-section-title">
778 - '.wfMsg('user-awards-title').'
 781+ ' . wfMsg( 'user-awards-title' ) . '
779782 </div>
780783 <div class="user-section-actions">
781784 <div class="action-right">';
782785 if( $system_gift_count > 4 ) {
783 - $output .= '<a href="'.$system_gift_link->escapeFullURL('user='.$user_name).'" rel="nofollow">'.wfMsg('user-view-all').'</a>';
 786+ $output .= '<a href="' . $system_gift_link->escapeFullURL( 'user=' . $user_name ) . '" rel="nofollow">' . wfMsg( 'user-view-all' ) . '</a>';
784787 }
785788 $output .= '</div>
786789 <div class="action-left">';
787790 if( $system_gift_count > 4 ) {
788 - $output .= wfMsg( 'user-count-separator', "4", $system_gift_count );
 791+ $output .= wfMsg( 'user-count-separator', '4', $system_gift_count );
789792 } else {
790793 $output .= wfMsg( 'user-count-separator', $system_gift_count, $system_gift_count );
791794 }
792 - $output .= "</div>
793 - <div class=\"cleared\"></div>
 795+ $output .= '</div>
 796+ <div class="cleared"></div>
794797 </div>
795798 </div>
796 - <div class=\"cleared\"></div>
797 - <div class=\"user-gift-container\">";
 799+ <div class="cleared"></div>
 800+ <div class="user-gift-container">';
798801
799802 foreach( $system_gifts as $gift ) {
800803
801804 if( $gift['status'] == 1 && $user_name == $wgUser->getName() ){
802 - $sg->clearUserGiftStatus($gift['id']);
 805+ $sg->clearUserGiftStatus( $gift['id'] );
803806 $wgMemc->delete( $sg_key );
804807 $sg->decNewSystemGiftCount( $wgUser->getID() );
805808 }
806809
807 - $gift_image = '<img src="'.$wgUploadPath.'/awards/' . SystemGifts::getGiftImage( $gift['gift_id'], 'ml' ) . '" border="0" alt="" />';
 810+ $gift_image = '<img src="' . $wgUploadPath . '/awards/' . SystemGifts::getGiftImage( $gift['gift_id'], 'ml' ) . '" border="0" alt="" />';
808811 $gift_link = $user = SpecialPage::getTitleFor( 'ViewSystemGift' );
809812
810813 $output .= "<a href=\"".$gift_link->escapeFullURL('gift_id='.$gift['id'])."\" ".( ( $gift['status'] == 1 ) ? 'class="user-page-new"' : '' )." rel=\"nofollow\">
811814 {$gift_image}
812815 </a>";
813816
814 - if( $x == count($system_gifts) || $x != 1 && $x%$per_row == 0 ) $output .= '<div class="cleared"></div>';
815 - $x++;
 817+ if( $x == count( $system_gifts ) || $x != 1 && $x%$per_row == 0 ) $output .= '<div class="cleared"></div>';
 818+ $x++;
816819 }
817820
818821 $output .= '</div>';
@@ -834,13 +837,13 @@
835838
836839 $output = ''; // Prevent E_NOTICE
837840
838 - $wgOut->addScript("<script type=\"text/javascript\" src=\"{$wgUserProfileScripts}/UserProfilePage.js\"></script>\n");
 841+ $wgOut->addScriptFile( $wgUserProfileScripts . '/UserProfilePage.js' );
839842
840 - $rel = new UserRelationship($user_name);
841 - $friends = $rel->getRelationshipList(1, 4);
 843+ $rel = new UserRelationship( $user_name );
 844+ $friends = $rel->getRelationshipList( 1, 4 );
842845
843 - $user_safe = str_replace("&", "%26", $user_name);
844 - $stats = new UserStats($user_id, $user_name);
 846+ $user_safe = str_replace( '&', '%26', $user_name );
 847+ $stats = new UserStats( $user_id, $user_name );
845848 $stats_data = $stats->getUserStats();
846849 $total = $stats_data['user_board'];
847850
@@ -848,19 +851,19 @@
849852
850853 $output .= '<div class="user-section-heading">
851854 <div class="user-section-title">
852 - '.wfMsg("user-board-title").'
 855+ ' . wfMsg( 'user-board-title' ) . '
853856 </div>
854857 <div class="user-section-actions">
855858 <div class="action-right">';
856859 if( $wgUser->getName() == $user_name ) {
857 - if( $friends ) $output .= '<a href="' . UserBoard::getBoardBlastURL().'">'.wfMsg('user-send-board-blast').'</a>';
858 - if( $total > 10 ) $output .= wfMsgExt( 'pipe-separator' , 'escapenoentities' );
 860+ if( $friends ) $output .= '<a href="' . UserBoard::getBoardBlastURL() . '">' . wfMsg( 'user-send-board-blast' ) . '</a>';
 861+ if( $total > 10 ) $output .= wfMsgExt( 'pipe-separator', 'escapenoentities' );
859862 }
860 - if( $total > 10 ) $output .= '<a href="'.UserBoard::getUserBoardURL($user_name).'">'.wfMsg('user-view-all').'</a>';
 863+ if( $total > 10 ) $output .= '<a href="' . UserBoard::getUserBoardURL( $user_name ) . '">' . wfMsg( 'user-view-all' ) . '</a>';
861864 $output .= '</div>
862865 <div class="action-left">';
863866 if( $total > 10 ) {
864 - $output .= wfMsg( 'user-count-separator', "10", $total );
 867+ $output .= wfMsg( 'user-count-separator', '10', $total );
865868 } else if( $total > 0 ) {
866869 $output .= wfMsg( 'user-count-separator', $total, $total );
867870 }
@@ -875,7 +878,7 @@
876879 // Some nice message in a other part of the extension :)
877880 wfLoadExtensionMessages( 'SocialProfileUserBoard' );
878881 $output .= '<div class="user-page-message-form">
879 - <input type="hidden" id="user_name_to" name="user_name_to" value="' . addslashes($user_name).'"/>
 882+ <input type="hidden" id="user_name_to" name="user_name_to" value="' . addslashes( $user_name ) . '" />
880883 <span style="color:#797979;">' . wfMsgHtml( 'userboard_messagetype' ) . '</span>
881884 <select id="message_type">
882885 <option value="0">' . wfMsgHtml( 'userboard_public' ) . '</option>
@@ -883,20 +886,20 @@
884887 </select><p>
885888 <textarea name="message" id="message" cols="43" rows="4"/></textarea>
886889 <div class="user-page-message-box-button">
887 - <input type="button" value="' . wfMsg('userboard_sendbutton') . '" class="site-button" onclick="javascript:send_message();">
 890+ <input type="button" value="' . wfMsg( 'userboard_sendbutton' ) . '" class="site-button" onclick="javascript:send_message();">
888891 </div>
889892 </div>';
890893 } else {
891 - $login_link = SpecialPage::getTitleFor( 'UserLogin' );
 894+ $login_link = SpecialPage::getTitleFor( 'Userlogin' );
892895
893896 $output .= '<div class="user-page-message-form">
894 - '.wfMsg( 'user-board-login-message', $login_link->escapeFullURL() ).'
 897+ ' . wfMsg( 'user-board-login-message', $login_link->escapeFullURL() ) . '
895898 </div>';
896899 }
897900 }
898901 $output .= '<div id="user-page-board">';
899902 $b = new UserBoard();
900 - $output .= $b->displayMessages($user_id, 0, 10);
 903+ $output .= $b->displayMessages( $user_id, 0, 10 );
901904
902905 $output .= '</div>';
903906
@@ -908,7 +911,7 @@
909912 * and FanBoxes extension is installed.
910913 */
911914 function getFanBoxes( $user_name ){
912 - global $wgOut, $wgUser, $wgTitle, $wgMemc, $wgUserProfileDisplay, $wgFanBoxScripts, $wgFanBoxDirectory, $wgEnableUserBoxes;
 915+ global $wgOut, $wgUser, $wgTitle, $wgMemc, $wgUserProfileDisplay, $wgFanBoxScripts, $wgEnableUserBoxes;
913916
914917 if ( !$wgEnableUserBoxes || $wgUserProfileDisplay['userboxes'] == false ) {
915918 return '';
@@ -921,7 +924,7 @@
922925
923926 $output = '';
924927 $f = new UserFanBoxes( $user_name );
925 - $user_safe = ($user_name);
 928+ $user_safe = ( $user_name );
926929
927930 // Try cache
928931 //$key = wfMemcKey( 'user', 'profile', 'fanboxes', "{$f->user_id}" );
@@ -991,6 +994,7 @@
992995 $fantag_leftside = $fantag_leftside->getText();
993996 }
994997
 998+ $leftfontsize = '10px';
995999 if ( $fanbox['fantag_left_textsize'] == 'mediumfont' ) {
9961000 $leftfontsize = '11px';
9971001 }
@@ -1030,9 +1034,9 @@
10311035 if( $wgUser->isLoggedIn() ) {
10321036 if( $check_user_fanbox == 0 ) {
10331037 $output .= "<div class=\"fanbox-pop-up-box-profile\" id=\"fanboxPopUpBox".$fanbox['fantag_id']."\">
1034 - <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\" >
 1038+ <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\">
10351039 <tr>
1036 - <td style=\"font-size:10px\">". wfMsgForContent( 'fanbox-add-fanbox' ) ."</td>
 1040+ <td style=\"font-size:10px\">". wfMsg( 'fanbox-add-fanbox' ) ."</td>
10371041 </tr>
10381042 <tr>
10391043 <td align=\"center\">
@@ -1046,7 +1050,7 @@
10471051 $output .= "<div class=\"fanbox-pop-up-box-profile\" id=\"fanboxPopUpBox".$fanbox['fantag_id']."\">
10481052 <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\">
10491053 <tr>
1050 - <td style=\"font-size:10px\">". wfMsgForContent( 'fanbox-remove-fanbox' ) ."</td>
 1054+ <td style=\"font-size:10px\">". wfMsg( 'fanbox-remove-fanbox' ) ."</td>
10511055 </tr>
10521056 <tr>
10531057 <td align=\"center\">
@@ -1064,7 +1068,7 @@
10651069 $output .= "<div class=\"fanbox-pop-up-box-profile\" id=\"fanboxPopUpBox".$fanbox['fantag_id']."\">
10661070 <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\">
10671071 <tr>
1068 - <td style=\"font-size:10px\">". wfMsgForContent( 'fanbox-add-fanbox-login' ) ."<a href=\"{$login->getFullURL()}\">". wfMsgForContent( 'fanbox-login' ) ."</a></td>
 1072+ <td style=\"font-size:10px\">". wfMsg( 'fanbox-add-fanbox-login' ) ."<a href=\"{$login->getFullURL()}\">". wfMsg( 'fanbox-login' ) ."</a></td>
10691073 </tr>
10701074 <tr>
10711075 <td align=\"center\">

Status & tagging log