本文整理汇总了PHP中CBlogUser::GetUserFriendsList方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogUser::GetUserFriendsList方法的具体用法?PHP CBlogUser::GetUserFriendsList怎么用?PHP CBlogUser::GetUserFriendsList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlogUser
的用法示例。
在下文中一共展示了CBlogUser::GetUserFriendsList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetMessage
if (IntVal($arParams["ID"]) > 0) {
$arBlogUser = CBlogUser::GetByID($arParams["ID"], BLOG_BY_USER_ID);
$arBlogUser = CBlogTools::htmlspecialcharsExArray($arBlogUser);
if ($arBlogUser) {
if ($USER->IsAuthorized() && $USER->GetID() == $arBlogUser["USER_ID"]) {
if ($arParams["SET_TITLE"] == "Y") {
$APPLICATION->SetTitle(GetMessage("B_B_FR_TITLES"));
}
} else {
$dbUser = CUser::GetByID($arBlogUser["USER_ID"]);
$arUser = $dbUser->GetNext();
if ($arParams["SET_TITLE"] == "Y") {
$APPLICATION->SetTitle(str_replace("#NAME#", CBlogUser::GetUserName($arBlogUser["ALIAS"], $arUser["NAME"], $arUser["LAST_NAME"], $arUser["LOGIN"]), GetMessage("B_B_FR_TITLE_OF")));
}
}
$dbList = CBlogUser::GetUserFriendsList($arParams["ID"], $USER->GetID(), $USER->IsAuthorized(), $arParams["MESSAGE_COUNT"], $arParams["GROUP_ID"]);
$arResult["FRIENDS_POSTS"] = array();
$arResult["IDS"] = array();
$p = new blogTextParser(false, $arParams["PATH_TO_SMILE"]);
$arParserParams = array("imageWidth" => $arParams["IMAGE_MAX_WIDTH"], "imageHeight" => $arParams["IMAGE_MAX_HEIGHT"]);
while ($arList = $dbList->Fetch()) {
$arResult["IDS"][] = $arList["ID"];
$arPost = CBlogPost::GetByID($arList["ID"]);
$arPost = CBlogTools::htmlspecialcharsExArray($arPost);
$arBlog = CBlog::GetByID($arPost["BLOG_ID"]);
$arBlog = CBlogTools::htmlspecialcharsExArray($arBlog);
$arPost["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arBlog["URL"], "post_id" => CBlogPost::GetPostID($arPost["ID"], $arPost["CODE"], $arParams["ALLOW_POST_CODE"])));
$arPost["urlToAuthor"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_USER"], array("user_id" => $arPost["AUTHOR_ID"]));
if ($arPost["AUTHOR_ID"] == $arBlog["OWNER_ID"]) {
$arPost["urlToBlog"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_BLOG"], array("blog" => $arBlog["URL"]));
} else {