本文整理匯總了PHP中CForumTopic::SetReadLabelsNew方法的典型用法代碼示例。如果您正苦於以下問題:PHP CForumTopic::SetReadLabelsNew方法的具體用法?PHP CForumTopic::SetReadLabelsNew怎麽用?PHP CForumTopic::SetReadLabelsNew使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CForumTopic
的用法示例。
在下文中一共展示了CForumTopic::SetReadLabelsNew方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: elseif
********************************************************************/
if ($_REQUEST["ACTION"] == "SET_BE_READ") {
if (!$GLOBALS["USER"]->IsAuthorized()) {
} elseif (!check_bitrix_sessid()) {
} elseif ($_REQUEST["FID"] == "all") {
ForumSetReadForum(false);
} elseif (intVal($_REQUEST["FID"]) > 0 && $_REQUEST["FID"] == $find_forum) {
ForumSetReadForum($_REQUEST["FID"]);
} elseif (!empty($_REQUEST["TID"])) {
$arFilterAction = $arFilter;
$arFilterAction["@ID"] = $_REQUEST["TID"];
$db_res = CForumTopic::GetListEx(array($by => $order, "POSTS" => "DESC"), $arFilterAction, false, 0, array('NoFilter' => true));
if ($db_res && ($res = $db_res->Fetch())) {
do {
$GLOBALS["FORUM_CACHE"]["TOPIC"][$res["ID"]] = $res;
CForumTopic::SetReadLabelsNew($res["ID"], false, false, array("UPDATE_TOPIC_VIEWS" => "N"));
} while ($res = $db_res->Fetch());
}
$url = $APPLICATION->GetCurPageParam("", array("ACTION", "sessid", "TID", "find_forum", "find_date1", "find_date1_DAYS_TO_BACK", "find_date2", "set_filter", "del_filter"));
LocalRedirect($url);
}
}
/********************************************************************
/Action
********************************************************************/
/*******************************************************************/
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
if (!$USER->IsAuthorized()) {
$rsTopics = CForumTopic::GetListEx(array($by => $order, "POSTS" => "DESC"), $arFilter, false, 500, array("sNameTemplate" => $arParams["NAME_TEMPLATE"]));
while ($arTopic = $rsTopics->Fetch()) {
if (!NewMessageTopic($arTopic["FORUM_ID"], $arTopic["ID"], $arTopic["LAST_POST_DATE"], false)) {
示例2: ForumSetReadTopic
function ForumSetReadTopic($FID, $TID)
{
CForumTopic::SetReadLabelsNew($TID);
if (!$GLOBALS['USER']->IsAuthorized()) {
if (!isset($_SESSION["FORUM"]["GUEST_TID"])) {
ForumInitParams();
}
$_SESSION["FORUM"]["GUEST_TID"][intVal($TID)] = CForumNew::GetNowTime();
if (COption::GetOptionString("forum", "USE_COOKIE", "N") == "Y") {
$arCookie = array();
foreach ($_SESSION["FORUM"]["GUEST_TID"] as $key => $val) {
$arCookie[] = intVal($key) . "-" . intVal($val);
}
$GLOBALS["APPLICATION"]->set_cookie("FORUM_GUEST_TID", implode("/", $arCookie), false, "/", false, false, "Y", false);
}
}
}