本文整理汇总了PHP中forumTextParser::wrap_long_words方法的典型用法代码示例。如果您正苦于以下问题:PHP forumTextParser::wrap_long_words方法的具体用法?PHP forumTextParser::wrap_long_words怎么用?PHP forumTextParser::wrap_long_words使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类forumTextParser
的用法示例。
在下文中一共展示了forumTextParser::wrap_long_words方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MakeTimeStamp
$res["NUMBER"] = $number++;
// data
$res["POST_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["POST_DATE"], CSite::GetDateFormat()));
$res["EDIT_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["EDIT_DATE"], CSite::GetDateFormat()));
// text
$res["ALLOW"] = array_merge($arAllow, array("SMILES" => $res["USE_SMILES"] == "Y" ? $arResult["FORUM"]["ALLOW_SMILES"] : "N"));
$res["~POST_MESSAGE_TEXT"] = COption::GetOptionString("forum", "FILTER", "Y") == "Y" ? $res["~POST_MESSAGE_FILTER"] : $res["~POST_MESSAGE"];
// attach
$res["ATTACH_IMG"] = "";
$res["FILES"] = array();
$res["~ATTACH_FILE"] = array();
$res["ATTACH_FILE"] = array();
/************** Message info/***************************************/
/************** Author info ****************************************/
$res["AUTHOR_ID"] = intVal($res["AUTHOR_ID"]);
$res["AUTHOR_NAME"] = $parser->wrap_long_words($res["AUTHOR_NAME"]);
if ($res["AUTHOR_ID"] <= 0) {
// Status
list($res["AUTHOR_STATUS_CODE"], $res["AUTHOR_STATUS"]) = ForumGetUserForumStatus(0);
} else {
if (!array_key_exists($res["AUTHOR_ID"], $UserInfo)) {
$perm = CForumNew::GetUserPermission($res["FORUM_ID"], CUser::GetUserGroup($res["AUTHOR_ID"]));
$arUser = array("Perms" => $perm, "Rank" => $perm <= "Q" ? CForumUser::GetUserRank($res["AUTHOR_ID"], LANGUAGE_ID) : "", "Points" => !empty($res["POINTS"]) ? array("POINTS" => $res["POINTS"], "DATE_UPDATE" => $res["DATE_UPDATE"]) : false);
$arUData = array();
// Status
list($arUData["AUTHOR_STATUS_CODE"], $arUData["AUTHOR_STATUS"]) = ForumGetUserForumStatus($res["AUTHOR_ID"], $arUser["Perms"], $arUser);
// Avatar
if (!empty($res["AVATAR"])) {
$arUData["AVATAR"] = array("ID" => $res["~AVATAR"], "FILE" => CFile::GetFileArray($res["~AVATAR"]));
$arUData["AVATAR"]["HTML"] = CFile::ShowImage($arUData["AVATAR"]["FILE"], COption::GetOptionString("forum", "avatar_max_width", 90), COption::GetOptionString("forum", "avatar_max_height", 90), "border=\"0\"", "", true);
}
示例2: array
}
$arNavParams = array("nPageSize" => $arParams["FORUMS_PER_PAGE"], "bShowAll" => false);
$arNavigation = CDBResult::GetNavParams($arNavParams);
if ($this->StartResultCache($arParams["CACHE_TIME"], array($arFilterForum, $arForumAddParams, $arNavigation))) {
$arForumAddParams['nav_result'] = false;
$dbForumNav = CForumNew::GetListEx($arForumOrder, $arFilterForum, false, false, $arForumAddParams);
$arForumAddParams['nav_result'] = $dbForumNav;
$dbForum = CForumNew::GetListEx($arForumOrder, $arFilterForum, false, false, $arForumAddParams);
$arResult["NAV_RESULT"] = $dbForumNav;
$arResult["NAV_STRING"] = $dbForumNav->GetPageNavStringEx($navComponentObject, GetMessage("F_FORUM"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
$arResult["NAV_PAGE"] = $dbForumNav->NavNum . ':' . $dbForumNav->NavPageNomer;
$arForums = array();
while ($res = $dbForum->GetNext()) {
$res["MODERATE"] = array("TOPICS" => 0, "POSTS" => intVal($res["POSTS_UNAPPROVED"]));
$res["mCnt"] = $res["MODERATE"]["POSTS"];
$res["TITLE"] = $parser->wrap_long_words($res["TITLE"]);
$res["LAST_POSTER_NAME"] = $parser->wrap_long_words($res["LAST_POSTER_NAME"]);
$res["LAST_POST_DATE"] = intval($res["LAST_MESSAGE_ID"]) > 0 ? CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["LAST_POST_DATE"], CSite::GetDateFormat())) : "";
$res["URL"] = array("MODERATE_MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_APPR"], array("FID" => $res["ID"], "TID" => "s")), "TOPICS" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_LIST"], array("FID" => $res["ID"])), "MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $res["ID"], "TID" => $res["TID"], "TITLE_SEO" => $res["TITLE_SEO"], "MID" => $res["LAST_MESSAGE_ID"])) . "#message" . $res["LAST_MESSAGE_ID"], "AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["LAST_POSTER_ID"])));
/************** For custom template ********************************/
$res["topic_list"] = $res["URL"]["TOPICS"];
$res["message_appr"] = $res["URL"]["MODERATE_MESSAGE"];
$res["message_list"] = $res["URL"]["MESSAGE"];
$res["profile_view"] = $res["URL"]["AUTHOR"];
/*******************************************************************/
$res["FORUM_GROUP_ID"] = intVal($res["FORUM_GROUP_ID"]);
$arGroupForum[$res["FORUM_GROUP_ID"]]["FORUM"][] = $res;
$arResult["FORUMS_LIST"][$res["ID"]] = $res["ID"];
CForumCacheManager::SetTag($this->GetCachePath(), "forum_msg_count" . $res["ID"]);
}
$arGroups = array();
示例3: intVal
$res["LAST_POST_DATE"] = $res["ABS_LAST_POST_DATE"];
$res["LAST_POSTER_NAME"] = $res["ABS_LAST_POSTER_NAME"];
$res["LAST_MESSAGE_ID"] = $res["ABS_LAST_MESSAGE_ID"];
$res["mCnt"] = intVal($res["POSTS_UNAPPROVED"]);
$res["numMessages"] = $res["POSTS"] + $res["mCnt"];
$res["mCntURL"] = $res["URL"]["MODERATE_MESSAGE"];
} else {
$res["numMessages"] = $res["POSTS"];
}
/*******************************************************************/
$res["numMessages"] = $res["numMessages"] + 1;
/*******************************************************************/
$res["pages"] = ForumShowTopicPages($res["numMessages"], $res["URL"]["TOPIC"], "PAGEN_" . $arParams["PAGEN"], intVal($arParams["MESSAGES_PER_PAGE"]));
$res["PAGES_COUNT"] = intVal(ceil($res["numMessages"] / $arParams["MESSAGES_PER_PAGE"]));
/*******************************************************************/
$res["TITLE"] = $parser->wrap_long_words($res["TITLE"]);
$res["DESCRIPTION"] = $parser->wrap_long_words($res["DESCRIPTION"]);
$res["USER_START_NAME"] = $parser->wrap_long_words($res["USER_START_NAME"]);
$res["LAST_POSTER_NAME"] = $parser->wrap_long_words($res["LAST_POSTER_NAME"]);
$res["LAST_POST_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["LAST_POST_DATE"], CSite::GetDateFormat()));
$res["START_DATE"] = CForumFormat::DateFormat($arParams["DATE_FORMAT"], MakeTimeStamp($res["START_DATE"], CSite::GetDateFormat()));
/************** For custom template ********************************/
$res["read"] = $res["URL"]["TOPIC"];
$res["read_last_unread"] = $res["URL"]["MESSAGE_UNREAD"];
$res["read_last_message"] = $res["URL"]["LAST_MESSAGE"];
$res["USER_START_HREF"] = $res["URL"]["USER_START"];
$res["LAST_POSTER_HREF"] = $res["URL"]["LAST_POSTER_HREF"];
$res["author_profile"] = $res["URL"]["LAST_POSTER_HREF"];
/************** For custom template/********************************/
$arResult["Topics"][] = $res;
}
示例4: array
$res["URL"] = array("AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["USER_ID"])), "~AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["USER_ID"])), "POSTS" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_USER_POST"], array("UID" => $res["USER_ID"], "mode" => "all")), "~POSTS" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_USER_POST"], array("UID" => $res["USER_ID"], "mode" => "all")));
$res["profile_view"] = $res["URL"]["AUTHOR"];
$res["user_post"] = $res["URL"]["POSTS"];
$res["pm_edit"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_EDIT"], array("FID" => 0, "MID" => 0, "mode" => "new", "UID" => $res["USER_ID"]));
$res["mail"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("TYPE" => "mail", "UID" => $res["USER_ID"]));
$res["DATE_REG"] = !empty($res["DATE_REGISTER_SHORT"]) ? CForumFormat::DateFormat($arParams["DATE_FORMAT"], MakeTimeStamp($res["DATE_REGISTER_SHORT"], CSite::GetDateFormat())) : "";
$res["LAST_VISIT"] = !empty($res["LAST_VISIT"]) ? CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["LAST_VISIT"], CSite::GetDateFormat())) : "";
$res["icq"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("TYPE" => "icq", "UID" => $res["USER_ID"]));
if (strLen($res["AVATAR"]) > 0) {
$res["~AVATAR"] = array("ID" => $res["AVATAR"], "FILE" => CFile::GetFileArray($res["AVATAR"]));
$res["~AVATAR"]["HTML"] = CFile::ShowImage($res["~AVATAR"]["FILE"], COption::GetOptionString("forum", "avatar_max_width", 100), COption::GetOptionString("forum", "avatar_max_height", 100), "border=\"0\"", "", true);
$res["~AVATAR"]["HTML_SMALL"] = CFile::ShowImage($res["~AVATAR"]["FILE"], 20, 20, "border=0 alt=\"\"", "", true);
$res["AVATAR_ARRAY"] = $res["~AVATAR"];
$res["AVATAR"] = $res["~AVATAR"]["HTML_SMALL"];
}
$res["SHOW_ABC"] = $parser->wrap_long_words($res["SHOW_ABC"]);
$arResult["USERS"][] = $res;
} while ($res = $db_res->GetNext());
}
}
/********************************************************************
/Data
********************************************************************/
$this->IncludeComponentTemplate();
if ($arParams["SET_NAVIGATION"] != "N") {
$APPLICATION->AddChainItem(GetMessage("LU_TITLE_USER"));
}
if ($arParams["SET_TITLE"] != "N") {
$APPLICATION->SetTitle(GetMessage("LU_TITLE_USER"));
}
/******************************************************************/
示例5: ShowError
$db_res = CUser::GetByID(intVal($arParams["UID"]));
if (!($ar_res = $db_res->Fetch())) {
$db_res = CUser::GetByLogin($arParams["UID"]);
$ar_res = $db_res->Fetch();
$arParams["UID"] = $ar_res["ID"];
}
$bUserFound = !empty($ar_res) && is_array($ar_res);
}
if (!$bUserFound) {
CHTTP::SetStatus("404 Not Found");
ShowError(empty($arParams["UID"]) ? GetMessage("F_NO_UID") : GetMessage("F_NO_DUSER", array("#UID#" => htmlspecialcharsEx($arParams["UID"]))));
return false;
}
foreach ($ar_res as $key => $val) {
$arResult["USER"]["~" . $key] = $val;
$arResult["USER"][$key] = is_string($val) ? $parser->wrap_long_words(htmlspecialcharsex(trim($val))) : $val;
}
$arResult["USER"]["PERSONAL_BIRTHDAY_FORMATED"] = CForumFormat::FormatDate($arResult["USER"]["~PERSONAL_BIRTHDAY"], CLang::GetDateFormat("SHORT"), $arParams["DATE_FORMAT"]);
$arResult["FORUM_USER"] = CForumUser::GetByUSER_ID($arParams["UID"]);
$arResult["FORUM_USER"] = empty($arResult["FORUM_USER"]) ? array() : $arResult["FORUM_USER"];
foreach ($arResult["FORUM_USER"] as $key => $val) {
$arResult["FORUM_USER"]["~" . $key] = $val;
$arResult["FORUM_USER"][$key] = is_string($val) ? $parser->wrap_long_words(htmlspecialcharsEx($val)) : $val;
}
/********************************************************************
Default values
********************************************************************/
$strErrorMessage = "";
$strOKMessage = "";
$arParams["UID"] = intval($arParams["UID"]);
$arResult["FID"] = intval($_REQUEST["FID"]);
示例6: array
LocalRedirect(ForumAddPageParams($arNote["link"], array("result" => $arNote["code"]), true, false).
(!empty($arParams["MID"]) ? "#message".$arParams["MID"] : ""));
}
/********************************************************************
/Action
********************************************************************/
/********************************************************************
Data
********************************************************************/
/************** Topic **********************************************/
foreach ($arResult["TOPIC"] as $key => $val):
$arResult["TOPIC"]["~".$key] = $val;
$arResult["TOPIC"][$key] = htmlspecialcharsEx($val);
if (!is_array($val))
$arResult["TOPIC"][$key] = $parser->wrap_long_words($arResult["TOPIC"][$key]);
endforeach;
$arResult["TOPIC"]["iLAST_TOPIC_MESSAGE"] = "";
/************** Forum **********************************************/
foreach ($arResult["FORUM"] as $key => $val):
$arResult["FORUM"]["~".$key] = $val;
$arResult["FORUM"][$key] = htmlspecialcharsEx($val);
endforeach;
if ($arParams["SHOW_FIRST_POST"] == "N"):
$arParams["SHOW_FIRST_POST"] = ($arResult["FORUM"]["ALLOW_TOPIC_TITLED"] == "Y" ? "Y" : "N");
endif;
/************** Current User ***************************************/
$arResult["USER"]["SHOW_NAME"] = $GLOBALS["FORUM_STATUS_NAME"]["guest"];
$arResult["USER"]["RIGHTS"] = array(
"ADD_TOPIC" => CForumTopic::CanUserAddTopic($arParams["FID"], $arUserGroups, $USER->GetID(), $arResult["FORUM"]) ? "Y" : "N",
"MODERATE" => (CForumNew::CanUserModerateForum($arParams["FID"], $arUserGroups, $USER->GetID()) == true ? "Y" : "N"),