Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | } |
114 | 114 | |
115 | 115 | function getUserStats( $user_id, $user_name ) { |
116 | | - global $wgUser, $IP, $wgUserProfileDisplay; |
| 116 | + global $wgUser, $wgUserProfileDisplay; |
117 | 117 | |
118 | 118 | // Load messages, we're gonna need 'em |
119 | 119 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | } |
193 | 193 | |
194 | 194 | function getPersonalInfo( $user_id, $user_name ) { |
195 | | - global $IP, $wgUser, $wgMemc, $wgUserProfileDisplay; |
| 195 | + global $wgUser, $wgMemc, $wgUserProfileDisplay; |
196 | 196 | |
197 | 197 | // Load messages, we're gonna need 'em |
198 | 198 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -280,7 +280,7 @@ |
281 | 281 | } |
282 | 282 | |
283 | 283 | function getCustomInfo( $user_name ) { |
284 | | - global $IP, $wgUser, $wgMemc, $wgUserProfileDisplay; |
| 284 | + global $wgUser, $wgMemc, $wgUserProfileDisplay; |
285 | 285 | |
286 | 286 | if( $wgUserProfileDisplay['custom'] == false ) { |
287 | 287 | return ''; |
— | — | @@ -341,7 +341,7 @@ |
342 | 342 | } |
343 | 343 | |
344 | 344 | function getInterests( $user_name ) { |
345 | | - global $IP, $wgUser, $wgMemc, $wgUserProfileDisplay; |
| 345 | + global $wgUser, $wgMemc, $wgUserProfileDisplay; |
346 | 346 | |
347 | 347 | // Load messages, we're gonna need 'em |
348 | 348 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -407,7 +407,7 @@ |
408 | 408 | } |
409 | 409 | |
410 | 410 | function getProfileTop( $user_id, $user_name ) { |
411 | | - global $IP, $wgTitle, $wgUser, $wgMemc, $wgUploadPath, $wgLang; |
| 411 | + global $wgTitle, $wgUser, $wgMemc, $wgUploadPath, $wgLang; |
412 | 412 | |
413 | 413 | // Load messages, we're gonna need 'em |
414 | 414 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -561,7 +561,7 @@ |
562 | 562 | } |
563 | 563 | |
564 | 564 | function getRelationships( $user_name, $rel_type ){ |
565 | | - global $IP, $wgMemc, $wgUser, $wgUserProfileDisplay, $wgUploadPath; |
| 565 | + global $wgMemc, $wgUser, $wgUserProfileDisplay, $wgUploadPath; |
566 | 566 | |
567 | 567 | // Load messages, we're gonna need 'em |
568 | 568 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -654,7 +654,7 @@ |
655 | 655 | } |
656 | 656 | |
657 | 657 | function getGifts( $user_name ){ |
658 | | - global $IP, $wgUser, $wgMemc, $wgUserProfileDisplay, $wgUploadPath; |
| 658 | + global $wgUser, $wgMemc, $wgUserProfileDisplay, $wgUploadPath; |
659 | 659 | |
660 | 660 | // Load messages, we're gonna need 'em |
661 | 661 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -738,7 +738,7 @@ |
739 | 739 | } |
740 | 740 | |
741 | 741 | function getAwards( $user_name ){ |
742 | | - global $IP, $wgUser, $wgMemc, $wgUserProfileDisplay, $wgUploadPath; |
| 742 | + global $wgUser, $wgMemc, $wgUserProfileDisplay, $wgUploadPath; |
743 | 743 | |
744 | 744 | // Load messages, we're gonna need 'em |
745 | 745 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -821,7 +821,7 @@ |
822 | 822 | } |
823 | 823 | |
824 | 824 | function getUserBoard( $user_id, $user_name ){ |
825 | | - global $IP, $wgMemc, $wgUser, $wgOut, $wgUserProfileDisplay, $wgUserProfileScripts; |
| 825 | + global $wgMemc, $wgUser, $wgOut, $wgUserProfileDisplay, $wgUserProfileScripts; |
826 | 826 | |
827 | 827 | // Load messages, we're gonna need 'em |
828 | 828 | wfLoadExtensionMessages( 'SocialProfileUserProfile' ); |
— | — | @@ -908,18 +908,19 @@ |
909 | 909 | * and FanBoxes extension is installed. |
910 | 910 | */ |
911 | 911 | function getFanBoxes( $user_name ){ |
912 | | - global $wgOut, $IP, $wgUser, $wgTitle, $wgMemc, $wgUserProfileDisplay, $wgFanBoxScripts, $wgFanBoxDirectory, $wgEnableUserBoxes; |
| 912 | + global $wgOut, $wgUser, $wgTitle, $wgMemc, $wgUserProfileDisplay, $wgFanBoxScripts, $wgFanBoxDirectory, $wgEnableUserBoxes; |
913 | 913 | |
914 | 914 | if ( !$wgEnableUserBoxes || $wgUserProfileDisplay['userboxes'] == false ) { |
915 | 915 | return ''; |
916 | 916 | } |
917 | 917 | |
918 | | - $wgOut->addScript("<script type=\"text/javascript\" src=\"{$wgFanBoxScripts}/FanBoxes.js\"></script>\n"); |
919 | | - $wgOut->addScript("<link rel='stylesheet' type='text/css' href=\"{$wgFanBoxScripts}/FanBoxes.css\"/>\n"); |
| 918 | + $wgOut->addScriptFile( $wgFanBoxScripts . '/FanBoxes.js' ); |
| 919 | + $wgOut->addStyle( '../..' . $wgFanBoxScripts . '/FanBoxes.css' ); |
920 | 920 | |
921 | | - wfLoadExtensionMessages('FanBox'); |
| 921 | + wfLoadExtensionMessages( 'FanBox' ); |
922 | 922 | |
923 | | - $f = new UserFanBoxes($user_name); |
| 923 | + $output = ''; |
| 924 | + $f = new UserFanBoxes( $user_name ); |
924 | 925 | $user_safe = ($user_name); |
925 | 926 | |
926 | 927 | // Try cache |
— | — | @@ -935,9 +936,9 @@ |
936 | 937 | // $fanboxes = $data; |
937 | 938 | //} |
938 | 939 | |
939 | | - $fanboxes = $f->getUserFanboxes(0, 10); |
| 940 | + $fanboxes = $f->getUserFanboxes( 0, 10 ); |
940 | 941 | |
941 | | - $fanbox_count = $f->getFanBoxCountByUsername($user_name); |
| 942 | + $fanbox_count = $f->getFanBoxCountByUsername( $user_name ); |
942 | 943 | $fanbox_link = SpecialPage::getTitleFor( 'ViewUserBoxes' ); |
943 | 944 | $per_row = 1; |
944 | 945 | |
— | — | @@ -945,17 +946,19 @@ |
946 | 947 | |
947 | 948 | $output .= '<div class="user-section-heading"> |
948 | 949 | <div class="user-section-title"> |
949 | | - '.wfMsg('user-fanbox-title').' |
| 950 | + ' . wfMsg( 'user-fanbox-title' ) . ' |
950 | 951 | </div> |
951 | 952 | <div class="user-section-actions"> |
952 | 953 | <div class="action-right">'; |
953 | | - if( $fanbox_count > 10 ) $output .= '<a href="'.$fanbox_link->escapeFullURL('user='.$user_safe).'" rel="nofollow">'.wfMsg('user-view-all').'</a>'; |
| 954 | + if( $fanbox_count > 10 ){ |
| 955 | + $output .= '<a href="' . $fanbox_link->escapeFullURL( 'user=' . $user_safe ) . '" rel="nofollow">' . wfMsg( 'user-view-all' ) . '</a>'; |
| 956 | + } |
954 | 957 | $output .= '</div> |
955 | 958 | <div class="action-left">'; |
956 | 959 | if( $fanbox_count > 10 ) { |
957 | | - $output .= wfMsg('user-count-separator', "10", $fanbox_count ); |
| 960 | + $output .= wfMsg( 'user-count-separator', '10', $fanbox_count ); |
958 | 961 | } else { |
959 | | - $output .= wfMsg( 'user-count-separator',$fanbox_count, $fanbox_count); |
| 962 | + $output .= wfMsg( 'user-count-separator', $fanbox_count, $fanbox_count ); |
960 | 963 | } |
961 | 964 | $output .= '</div> |
962 | 965 | <div class="cleared"></div> |
— | — | @@ -970,14 +973,14 @@ |
971 | 974 | $tagParser = new Parser(); |
972 | 975 | foreach( $fanboxes as $fanbox ) { |
973 | 976 | |
974 | | - $check_user_fanbox = $f->checkIfUserHasFanbox($fanbox['fantag_id']); |
| 977 | + $check_user_fanbox = $f->checkIfUserHasFanbox( $fanbox['fantag_id'] ); |
975 | 978 | |
976 | 979 | if( $fanbox['fantag_image_name'] ){ |
977 | 980 | $fantag_image_width = 45; |
978 | 981 | $fantag_image_height = 53; |
979 | 982 | $fantag_image = wfFindFile( $fanbox['fantag_image_name'] ); |
980 | | - $fantag_image_url = $fantag_image->createThumb($fantag_image_width, $fantag_image_height); |
981 | | - $fantag_image_tag = '<img alt="" src="' . $fantag_image_url . '"/>'; |
| 983 | + $fantag_image_url = $fantag_image->createThumb( $fantag_image_width, $fantag_image_height ); |
| 984 | + $fantag_image_tag = '<img alt="" src="' . $fantag_image_url . '" />'; |
982 | 985 | }; |
983 | 986 | |
984 | 987 | if ( $fanbox['fantag_left_text'] == '' ){ |
— | — | @@ -1015,7 +1018,7 @@ |
1016 | 1019 | <div class=\"individual-fanbox\" id=\"individualFanbox".$fanbox['fantag_id']."\"> |
1017 | 1020 | <div class=\"show-message-container-profile\" id=\"show-message-container".$fanbox['fantag_id']."\"> |
1018 | 1021 | <a class=\"perma\" style=\"font-size:8px; color:".$fanbox['fantag_right_textcolor']."\" href=\"".$fantag_title->escapeFullURL()."\" title=\"{$fanbox["fantag_title"]}\">".wfMsg('fanbox-perma')."</a> |
1019 | | - <table class=\"fanBoxTableProfile\" onclick=\"javascript:openFanBoxPopup('fanboxPopUpBox{$fanbox["fantag_id"]}', 'individualFanbox{$fanbox["fantag_id"]}')\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" > |
| 1022 | + <table class=\"fanBoxTableProfile\" onclick=\"javascript:openFanBoxPopup('fanboxPopUpBox{$fanbox["fantag_id"]}', 'individualFanbox{$fanbox["fantag_id"]}')\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> |
1020 | 1023 | <tr> |
1021 | 1024 | <td id=\"fanBoxLeftSideOutputProfile\" style=\"color:".$fanbox['fantag_left_textcolor']."; font-size:$leftfontsize\" bgcolor=\"".$fanbox['fantag_left_bgcolor']."\">".$fantag_leftside."</td> |
1022 | 1025 | <td id=\"fanBoxRightSideOutputProfile\" style=\"color:".$fanbox['fantag_right_textcolor']."; font-size:$rightfontsize\" bgcolor=\"".$fanbox['fantag_right_bgcolor']."\">".$right_text."</td> |
— | — | @@ -1057,7 +1060,7 @@ |
1058 | 1061 | } |
1059 | 1062 | |
1060 | 1063 | if( $wgUser->getID() == 0 ) { |
1061 | | - $login = SpecialPage::getTitleFor( 'UserLogin' ); |
| 1064 | + $login = SpecialPage::getTitleFor( 'Userlogin' ); |
1062 | 1065 | $output .= "<div class=\"fanbox-pop-up-box-profile\" id=\"fanboxPopUpBox".$fanbox['fantag_id']."\"> |
1063 | 1066 | <table cellpadding=\"0\" cellspacing=\"0\" align=\"center\"> |
1064 | 1067 | <tr> |