本文整理汇总了PHP中forumTextParser::strip_words方法的典型用法代码示例。如果您正苦于以下问题:PHP forumTextParser::strip_words方法的具体用法?PHP forumTextParser::strip_words怎么用?PHP forumTextParser::strip_words使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类forumTextParser
的用法示例。
在下文中一共展示了forumTextParser::strip_words方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$files[$res["MESSAGE_ID"]] = $files[$res["MESSAGE_ID"]] ?: array();
$files[$res["MESSAGE_ID"]][$res["FILE_ID"]] = $res;
}
if (!empty($arParams["USER_FIELDS"])) {
$db_props = CForumMessage::GetList(array("ID" => "ASC"), array("@ID" => $ids), false, 0, array("SELECT" => $arParams["USER_FIELDS"]));
while ($res = $db_props->Fetch()) {
$props[$res["ID"]] = array_intersect_key($res, array_flip($arParams["USER_FIELDS"]));
}
}
$arAllow = array("HTML" => $arParams["ALLOW_HTML"], "ANCHOR" => $arParams["ALLOW_ANCHOR"], "BIU" => $arParams["ALLOW_BIU"], "IMG" => $arParams["ALLOW_IMG"], "VIDEO" => $arParams["ALLOW_VIDEO"], "LIST" => $arParams["ALLOW_LIST"], "QUOTE" => $arParams["ALLOW_QUOTE"], "CODE" => $arParams["ALLOW_CODE"], "FONT" => $arParams["ALLOW_FONT"], "SMILES" => $arParams["ALLOW_SMILES"], "NL2BR" => $arParams["ALLOW_NL2BR"], "TABLE" => $arParams["ALLOW_TABLE"], "UPLOAD" => $arParams["ALLOW_UPLOAD"], "ALIGN" => $arParams["ALLOW_ALIGN"]);
foreach ($arTopics as &$topic) {
$topic['MESSAGE']["POST_MESSAGE_TEXT"] = $parser->convert($topic['MESSAGE']["~POST_MESSAGE_TEXT"], array_merge($arAllow, array("SMILES" => $topic["MESSAGE"]["USE_SMILES"] == "Y" ? $arParams["ALLOW_SMILES"] : "N", "USERFIELDS" => $props[$topic["MESSAGE"]["ID"]])), "html", $files[$topic["MESSAGE"]["ID"]]);
if ($arParams['TOPIC_POST_MESSAGE_LENGTH'] > 0) {
$symbols_len = strlen(strip_tags($topic['MESSAGE']["POST_MESSAGE_TEXT"]));
if ($symbols_len > $arParams['TOPIC_POST_MESSAGE_LENGTH']) {
$strip_text = $parser->strip_words($topic['MESSAGE']["POST_MESSAGE_TEXT"], $arParams['TOPIC_POST_MESSAGE_LENGTH']);
if ($symbols_len > $arParams['TOPIC_POST_MESSAGE_LENGTH']) {
$strip_text = $strip_text . "...";
}
$topic['MESSAGE']["POST_MESSAGE_TEXT"] = $parser->closetags($strip_text);
}
}
$topic['MESSAGE']["FILES"] = $files[$topic["MESSAGE"]["ID"]];
$topic['MESSAGE']["FILES_PARSED"] = $parser->arFilesIDParsed;
unset($topic["MESSAGE"]["USE_SMILES"]);
}
}
}
}
$arResult['TOPICS'] = CForumCacheManager::Compress($arTopics);
$arResult['FORUMS'] = CForumCacheManager::Compress($arForums);