Пример #1
0
     $arResult["User"]["PERSONAL_WWW"] = (strpos($arResult["User"]["PERSONAL_WWW"], "http") === false ? "http://" : "") . $arResult["User"]["PERSONAL_WWW"];
 }
 $arHobby = explode(", ", $arResult["User"]["~INTERESTS"]);
 $arResult["User"]["Hobby"] = array();
 foreach ($arHobby as $Hobby) {
     if (strlen($Hobby) > 0) {
         $arResult["User"]["Hobby"][] = array("link" => $arParams["PATH_TO_SEARCH"] . 'where=USER&q=' . urlencode($Hobby), "name" => htmlspecialcharsEx($Hobby));
     }
 }
 $dbFriends = CBlogUser::GetUserFriends($arParams["ID"], True);
 $arResult["User"]["friendsOf"] = array();
 while ($arFriends = $dbFriends->GetNext()) {
     $arResult["User"]["friendsOf"][] = array("link" => CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arFriends["URL"])), "name" => $arFriends["NAME"]);
 }
 $arResult["User"]["friends"] = array();
 $dbFriends = CBlogUser::GetUserFriends($arParams["ID"], False);
 while ($arFriends = $dbFriends->GetNext()) {
     $arResult["User"]["friends"][] = array("link" => CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arFriends["URL"])), "name" => $arFriends["NAME"]);
 }
 $arResult["User"]["PERSONAL_PHOTO_FILE"] = CFile::GetFileArray($arResult["User"]["PERSONAL_PHOTO"]);
 if ($arResult["User"]["PERSONAL_PHOTO_FILE"] !== false) {
     $arResult["User"]["PERSONAL_PHOTO_IMG"] = CFile::ShowImage($arResult["User"]["PERSONAL_PHOTO_FILE"], 150, 150, "border=0", "", true);
 }
 $arResult["User"]["AVATAR_FILE"] = CFile::GetFileArray($arResult["User"]["AVATAR"]);
 if ($arResult["User"]["AVATAR_FILE"] !== false) {
     $arResult["User"]["Avatar_resized"] = CFile::ResizeImageGet($arResult["User"]["AVATAR_FILE"], array("width" => 100, "height" => 100), BX_RESIZE_IMAGE_EXACT, false);
     $arResult["User"]["AVATAR_IMG"] = CFile::ShowImage($arResult["User"]["Avatar_resized"]["src"], 100, 100, "border=0");
 }
 // ********************* User properties ***************************************************
 $arResult["USER_PROPERTIES"] = array("SHOW" => "N");
 if (!empty($arParams["USER_PROPERTY"])) {