本文整理汇总了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);
}
}
}