本文整理汇总了PHP中blogTextParser::wrap_long_words方法的典型用法代码示例。如果您正苦于以下问题:PHP blogTextParser::wrap_long_words方法的具体用法?PHP blogTextParser::wrap_long_words怎么用?PHP blogTextParser::wrap_long_words使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类blogTextParser
的用法示例。
在下文中一共展示了blogTextParser::wrap_long_words方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
if (!empty($arIdToGet)) {
$arResult["userCache"] = CBlogUser::GetUserInfoArray($arIdToGet, $arParams["PATH_TO_USER"], array("AVATAR_SIZE" => $arParams["AVATAR_SIZE"]));
foreach ($arResult["userCache"] as $userId => $arUserCache) {
$arUserCache["~AUTHOR_NAME"] = CUser::FormatName($arParams["NAME_TEMPLATE"], array("LAST_NAME" => $arUserCache["~LAST_NAME"], "NAME" => $arUserCache["~NAME"], "SECOND_NAME" => $arUserCache["~SECOND_NAME"], "LOGIN" => $arUserCache["~LOGIN"]), $arParams["SHOW_LOGIN"], false);
$arUserCache["AUTHOR_NAME"] = htmlspecialcharsbx($arUserCache["~AUTHOR_NAME"]);
$arResult["userCache"][$userId] = $arUserCache;
}
}
$db_user = CUser::GetById($GLOBALS["USER"]->GetId());
$arResult["USER"] = $db_user->Fetch();
foreach ($arPostsAll as $arPost) {
$text = preg_replace($patt, $repl, $arPost["~DETAIL_TEXT"]);
$text = TruncateText($text, $arParams["MESSAGE_LENGTH"]);
$text = CBlogTools::DeleteDoubleBR($p->convert($text, true, false, $allow));
$arPost["~CLEAR_TEXT"] = $text;
$arPost["CLEAR_TEXT"] = $p->wrap_long_words($text);
$arPost["perms"] = $arResult["perms"];
if (!$bGroupMode && $arParams["USER_ID"] == $user_id && (empty($arParams["4ME"]) || $arPost["AUTHOR_ID"] == $user_id)) {
$arPost["perms"] = BLOG_PERMS_FULL;
} elseif (!$bGroupMode && $arParams["USER_ID"] != $user_id || strlen($arParams["4ME"]) > 0) {
$arPost["perms"] = CBlogPost::GetSocNetPostPerms($arPost["ID"], true);
}
$arUser = $arResult["userCache"][$arPost["AUTHOR_ID"]];
$arPost["~AUTHOR_NAME"] = $arUser["~AUTHOR_NAME"];
$arPost["AUTHOR_NAME"] = $arUser["AUTHOR_NAME"];
$arPost["AUTHOR_AVATAR"] = $arUser["PERSONAL_PHOTO_resized"];
$arPost["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["~PATH_TO_POST"], array("post_id" => CBlogPost::GetPostID($arPost["ID"], $arPost["CODE"], $arParams["ALLOW_POST_CODE"]), "user_id" => $arPost["BLOG_OWNER_ID"]));
$arPost["urlToPosts"] = CComponentEngine::MakePathFromTemplate($arParams["~PATH_TO_BLOG_POSTS"], array("user_id" => $arPost["BLOG_OWNER_ID"]));
$arPost["urlToPostsImportant"] = CComponentEngine::MakePathFromTemplate($arParams["~PATH_TO_POST_IMPORTANT"], array("user_id" => $arPost["BLOG_OWNER_ID"]));
$arPost["urlToUser"] = $arPost["urlToAuthor"] = $arUser["url"];
if ($arPost["perms"] >= BLOG_PERMS_WRITE) {