本文整理匯總了PHP中CBlog::BuildRSS方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBlog::BuildRSS方法的具體用法?PHP CBlog::BuildRSS怎麽用?PHP CBlog::BuildRSS使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CBlog
的用法示例。
在下文中一共展示了CBlog::BuildRSS方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
$arFeedParams["PATH_TO_BLOG"] = $arParams["PATH_TO_BLOG"];
$arFeedParams["PATH_TO_POST"] = $arParams["PATH_TO_POST"];
$arFeedParams["PATH_TO_USER"] = $arParams["PATH_TO_USER"];
$arFeedParams["NO_URL_IN_COMMENTS"] = $arParams["NO_URL_IN_COMMENTS"];
$arFeedParams["NO_URL_IN_COMMENTS_AUTHORITY_CHECK"] = $arParams["NO_URL_IN_COMMENTS_AUTHORITY_CHECK"];
$arFeedParams["NO_URL_IN_COMMENTS_AUTHORITY"] = $arParams["NO_URL_IN_COMMENTS_AUTHORITY"];
}
if ($arParams["MODE"] == "C" && !empty($arPost) || $arParams["MODE"] == "P") {
$APPLICATION->RestartBuffer();
header("Content-Type: text/xml");
header("Pragma: no-cache");
if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
$cache->Output();
} else {
if ($arParams["MODE"] == "P") {
$textRSS = CBlog::BuildRSS($arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], $arParams["PATH_TO_BLOG"], $arParams["PATH_TO_POST"], $arParams["PATH_TO_USER"], $bSoNet, $arFeedParams);
} else {
$textRSS = CBlogComment::BuildRSS($arPost["ID"], $arBlog["ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], $arFeedParams);
}
if ($arParams["CACHE_TIME"] > 0) {
$cache->StartDataCache($arParams["CACHE_TIME"], $cache_id, $cache_path);
}
echo $textRSS;
if ($arParams["CACHE_TIME"] > 0) {
$cache->EndDataCache(array());
}
}
die;
} else {
ShowError(GetMessage("BLOG_RSS_NO_BLOG_POST"));
CHTTP::SetStatus("404 Not Found");