Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -1324,7 +1324,6 @@ |
1325 | 1325 | |
1326 | 1326 | $output = ''; |
1327 | 1327 | $f = new UserFanBoxes( $user_name ); |
1328 | | - $user_safe = ( $user_name ); |
1329 | 1328 | |
1330 | 1329 | // Try cache |
1331 | 1330 | /* |
— | — | @@ -1349,15 +1348,15 @@ |
1350 | 1349 | |
1351 | 1350 | if ( $fanboxes ) { |
1352 | 1351 | $output .= '<div class="user-section-heading"> |
1353 | | - <div class="user-section-title">' |
1354 | | - . wfMsg( 'user-fanbox-title' ) . |
| 1352 | + <div class="user-section-title">' . |
| 1353 | + wfMsg( 'user-fanbox-title' ) . |
1355 | 1354 | '</div> |
1356 | 1355 | <div class="user-section-actions"> |
1357 | 1356 | <div class="action-right">'; |
1358 | 1357 | // If there are more than ten fanboxes, display a "View all" link |
1359 | 1358 | // instead of listing them all on the profile page |
1360 | 1359 | if ( $fanbox_count > 10 ) { |
1361 | | - $output .= '<a href="' . $fanbox_link->escapeFullURL( 'user=' . $user_safe ) . '" rel="nofollow">' . |
| 1360 | + $output .= '<a href="' . $fanbox_link->escapeFullURL( 'user=' . $user_name ) . '" rel="nofollow">' . |
1362 | 1361 | wfMsg( 'user-view-all' ) . '</a>'; |
1363 | 1362 | } |
1364 | 1363 | $output .= '</div> |
— | — | @@ -1385,7 +1384,13 @@ |
1386 | 1385 | $fantag_image_width = 45; |
1387 | 1386 | $fantag_image_height = 53; |
1388 | 1387 | $fantag_image = wfFindFile( $fanbox['fantag_image_name'] ); |
1389 | | - $fantag_image_url = $fantag_image->createThumb( $fantag_image_width, $fantag_image_height ); |
| 1388 | + $fantag_image_url = ''; |
| 1389 | + if ( is_object( $fantag_image ) ) { |
| 1390 | + $fantag_image_url = $fantag_image->createThumb( |
| 1391 | + $fantag_image_width, |
| 1392 | + $fantag_image_height |
| 1393 | + ); |
| 1394 | + } |
1390 | 1395 | $fantag_image_tag = '<img alt="" src="' . $fantag_image_url . '" />'; |
1391 | 1396 | } |
1392 | 1397 | |
— | — | @@ -1393,11 +1398,15 @@ |
1394 | 1399 | $fantag_leftside = $fantag_image_tag; |
1395 | 1400 | } else { |
1396 | 1401 | $fantag_leftside = $fanbox['fantag_left_text']; |
1397 | | - $fantag_leftside = $tagParser->parse( $fantag_leftside, $wgTitle, $wgOut->parserOptions(), false ); |
| 1402 | + $fantag_leftside = $tagParser->parse( |
| 1403 | + $fantag_leftside, $wgTitle, |
| 1404 | + $wgOut->parserOptions(), false |
| 1405 | + ); |
1398 | 1406 | $fantag_leftside = $fantag_leftside->getText(); |
1399 | 1407 | } |
1400 | 1408 | |
1401 | 1409 | $leftfontsize = '10px'; |
| 1410 | + $rightfontsize = '11px'; |
1402 | 1411 | if ( $fanbox['fantag_left_textsize'] == 'mediumfont' ) { |
1403 | 1412 | $leftfontsize = '11px'; |
1404 | 1413 | } |
— | — | @@ -1417,7 +1426,9 @@ |
1418 | 1427 | // Get permalink |
1419 | 1428 | $fantag_title = Title::makeTitle( NS_FANTAG, $fanbox['fantag_title'] ); |
1420 | 1429 | $right_text = $fanbox['fantag_right_text']; |
1421 | | - $right_text = $tagParser->parse( $right_text, $wgTitle, $wgOut->parserOptions(), false ); |
| 1430 | + $right_text = $tagParser->parse( |
| 1431 | + $right_text, $wgTitle, $wgOut->parserOptions(), false |
| 1432 | + ); |
1422 | 1433 | $right_text = $right_text->getText(); |
1423 | 1434 | |
1424 | 1435 | // Output fanboxes |
— | — | @@ -1425,7 +1436,7 @@ |
1426 | 1437 | <div class=\"individual-fanbox\" id=\"individualFanbox" . $fanbox['fantag_id'] . "\"> |
1427 | 1438 | <div class=\"show-message-container-profile\" id=\"show-message-container" . $fanbox['fantag_id'] . "\"> |
1428 | 1439 | <a class=\"perma\" style=\"font-size:8px; color:" . $fanbox['fantag_right_textcolor'] . "\" href=\"" . $fantag_title->escapeFullURL() . "\" title=\"{$fanbox['fantag_title']}\">" . wfMsg( 'fanbox-perma' ) . "</a> |
1429 | | - <table class=\"fanBoxTableProfile\" onclick=\"javascript:openFanBoxPopup('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> |
| 1440 | + <table class=\"fanBoxTableProfile\" onclick=\"javascript:FanBoxes.openFanBoxPopup('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> |
1430 | 1441 | <tr> |
1431 | 1442 | <td id=\"fanBoxLeftSideOutputProfile\" style=\"color:" . $fanbox['fantag_left_textcolor'] . "; font-size:$leftfontsize\" bgcolor=\"" . $fanbox['fantag_left_bgcolor'] . "\">" . $fantag_leftside . "</td> |
1432 | 1443 | <td id=\"fanBoxRightSideOutputProfile\" style=\"color:" . $fanbox['fantag_right_textcolor'] . "; font-size:$rightfontsize\" bgcolor=\"" . $fanbox['fantag_right_bgcolor'] . "\">" . $right_text . "</td> |
— | — | @@ -1443,8 +1454,8 @@ |
1444 | 1455 | </tr> |
1445 | 1456 | <tr> |
1446 | 1457 | <td align=\"center\"> |
1447 | | - <input type=\"button\" value=\"" . wfMsg( 'fanbox-add' ) . "\" size=\"10\" onclick=\"closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}'); showAddRemoveMessageUserPage(1, {$fanbox['fantag_id']}, 'show-addremove-message-half')\" /> |
1448 | | - <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
| 1458 | + <input type=\"button\" value=\"" . wfMsg( 'fanbox-add' ) . "\" size=\"10\" onclick=\"FanBoxes.closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}'); FanBoxes.showAddRemoveMessageUserPage(1, {$fanbox['fantag_id']}, 'show-addremove-message-half')\" /> |
| 1459 | + <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"FanBoxes.closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
1449 | 1460 | </td> |
1450 | 1461 | </tr> |
1451 | 1462 | </table> |
— | — | @@ -1457,8 +1468,8 @@ |
1458 | 1469 | </tr> |
1459 | 1470 | <tr> |
1460 | 1471 | <td align=\"center\"> |
1461 | | - <input type=\"button\" value=\"" . wfMsg( 'fanbox-remove' ) . "\" size=\"10\" onclick=\"closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}'); showAddRemoveMessageUserPage(2, {$fanbox['fantag_id']}, 'show-addremove-message-half')\" /> |
1462 | | - <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
| 1472 | + <input type=\"button\" value=\"" . wfMsg( 'fanbox-remove' ) . "\" size=\"10\" onclick=\"FanBoxes.closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}'); FanBoxes.showAddRemoveMessageUserPage(2, {$fanbox['fantag_id']}, 'show-addremove-message-half')\" /> |
| 1473 | + <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"FanBoxes.closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
1463 | 1474 | </td> |
1464 | 1475 | </tr> |
1465 | 1476 | </table> |
— | — | @@ -1478,7 +1489,7 @@ |
1479 | 1490 | </tr> |
1480 | 1491 | <tr> |
1481 | 1492 | <td align=\"center\"> |
1482 | | - <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
| 1493 | + <input type=\"button\" value=\"" . wfMsg( 'cancel' ) . "\" size=\"10\" onclick=\"FanBoxes.closeFanboxAdd('fanboxPopUpBox{$fanbox['fantag_id']}', 'individualFanbox{$fanbox['fantag_id']}')\" /> |
1483 | 1494 | </td> |
1484 | 1495 | </tr> |
1485 | 1496 | </table> |