当前位置: 首页>>代码示例>>PHP>>正文


PHP CBlogUser::GetUserFriends方法代码示例

本文整理汇总了PHP中CBlogUser::GetUserFriends方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogUser::GetUserFriends方法的具体用法?PHP CBlogUser::GetUserFriends怎么用?PHP CBlogUser::GetUserFriends使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CBlogUser的用法示例。


在下文中一共展示了CBlogUser::GetUserFriends方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: explode

     $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"])) {
开发者ID:rasuldev,项目名称:torino,代码行数:31,代码来源:component.php


注:本文中的CBlogUser::GetUserFriends方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。