本文整理汇总了PHP中CForumNew::InitReadLabels方法的典型用法代码示例。如果您正苦于以下问题:PHP CForumNew::InitReadLabels方法的具体用法?PHP CForumNew::InitReadLabels怎么用?PHP CForumNew::InitReadLabels使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CForumNew
的用法示例。
在下文中一共展示了CForumNew::InitReadLabels方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: LocalRedirect
LocalRedirect("list.php?FID=" . $FID);
die;
}
$FID = IntVal($arTopic["FORUM_ID"]);
$arForum = CForumNew::GetByID($FID);
if (!$arForum) {
LocalRedirect("index.php");
die;
}
// Now $FID and $TID (and $MID if needed) have actual and coordinated values
// Let's check if current user can can view this topic
if (!CForumTopic::CanUserViewTopic($TID, $USER->GetUserGroupArray())) {
$APPLICATION->AuthForm("Для просмотра темы введите ваши логин и пароль");
}
// Let's init read labels
CForumNew::InitReadLabels($FID, $USER->GetUserGroupArray());
CForumTopic::SetReadLabels($TID, $USER->GetUserGroupArray());
if ($GLOBALS["SHOW_FORUM_DEBUG_INFO"]) {
$arForumDebugInfo[] = "<br><font color=\"#FF0000\">Initializing Variables: " . Round(getmicrotime() - $prexectime, 3) . " sec</font>";
}
// ACTIONS: reply, open/close topic, moderate, etc.
if ($GLOBALS["SHOW_FORUM_DEBUG_INFO"]) {
$prexectime = getmicrotime();
}
$strErrorMessage = "";
$strOKMessage = "";
$bVarsFromForm = false;
if ($_SERVER["REQUEST_METHOD"] == "POST" && $_POST["MESSAGE_TYPE"] == "REPLY") {
$arFieldsG = array("POST_MESSAGE" => $_POST["POST_MESSAGE"], "AUTHOR_NAME" => $_POST["AUTHOR_NAME"], "AUTHOR_EMAIL" => $_POST["AUTHOR_EMAIL"], "USE_SMILES" => $_POST["USE_SMILES"], "ATTACH_IMG" => $_FILES["ATTACH_IMG"]);
$MID = ForumAddMessage("REPLY", $FID, $TID, 0, $arFieldsG, $strErrorMessage, $strOKMessage);
$MID = IntVal($MID);