本文整理汇总了PHP中CBlog::BuildRSSAll方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlog::BuildRSSAll方法的具体用法?PHP CBlog::BuildRSSAll怎么用?PHP CBlog::BuildRSSAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlog
的用法示例。
在下文中一共展示了CBlog::BuildRSSAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialcharsbx
if (strlen($arParams["PATH_TO_POST"]) <= 0) {
$arParams["PATH_TO_POST"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=post&" . $arParams["BLOG_VAR"] . "=#blog#&" . $arParams["POST_VAR"] . "=#post_id#");
}
$arParams["PATH_TO_USER"] = trim($arParams["PATH_TO_USER"]);
if (strlen($arParams["PATH_TO_USER"]) <= 0) {
$arParams["PATH_TO_USER"] = htmlspecialcharsbx($APPLICATION->GetCurPage() . "?" . $arParams["PAGE_VAR"] . "=user&" . $arParams["USER_VAR"] . "=#user_id#");
}
$arParams["ALLOW_POST_CODE"] = $arParams["ALLOW_POST_CODE"] !== "N";
$arParams["IMAGE_MAX_WIDTH"] = IntVal($arParams["IMAGE_MAX_WIDTH"]);
$arParams["IMAGE_MAX_HEIGHT"] = IntVal($arParams["IMAGE_MAX_HEIGHT"]);
$cache = new CPHPCache();
$cache_id = "blog_rss_all_out_" . $arParams["GROUP_ID"] . "_" . $arParams["MESSAGE_COUNT"] . "_" . $arResult["TYPE"] . "_" . IntVal($USER->GetID()) . "_" . $arParams["PATH_TO_POST"] . "_" . $arParams["PATH_TO_USER"];
$cache_path = "/" . SITE_ID . "/blog/rss_all/";
$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 {
$arPathTemplates = array("BLOG" => $arParams["PATH_TO_BLOG"], "GROUP_BLOG_POST" => $arParams["PATH_TO_GROUP_BLOG_POST"], "BLOG_POST" => $arParams["PATH_TO_POST"], "USER" => $arParams["PATH_TO_USER"], "ALLOW_POST_CODE" => $arParams["ALLOW_POST_CODE"], "IMAGE_MAX_WIDTH" => $arParams["IMAGE_MAX_WIDTH"], "IMAGE_MAX_HEIGHT" => $arParams["IMAGE_MAX_HEIGHT"]);
if ($textRSS = CBlog::BuildRSSAll($arParams["GROUP_ID"], $arResult["TYPE"], $arParams["MESSAGE_COUNT"], SITE_ID, false, false, array(), $arPathTemplates, $arParams["PARAM_GROUP_ID"], $arParams["USE_SOCNET"])) {
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;
示例2: CPHPCache
if ($featureOperationPerms == SONET_RELATIONS_TYPE_ALL) {
$arAvBlog[] = $arBlog["ID"];
}
}
}
if ($arParams["CACHE_TIME"] > 0) {
$cacheSoNet->EndDataCache(array("templateCachedData" => $this->GetTemplateCachedData(), "arAvBlog" => $arAvBlog));
}
}
}
//-------------------
$cache = new CPHPCache();
$cache_id = "blog_rss_sonet_out_" . serialize($arParams);
$cache_path = "/" . SITE_ID . "/blog/rss_sonet/" . strtolower($arResult["TYPE"]) . "/";
$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 ($textRSS = CBlog::BuildRSSAll(0, $arResult["TYPE"], $arParams["MESSAGE_COUNT"], SITE_ID, $arParams["PATH_TO_POST"], $arParams["PATH_TO_USER"], $arAvBlog, array("GROUP_BLOG_POST" => $arParams["PATH_TO_GROUP_BLOG_POST"], "BLOG_POST" => $arParams["PATH_TO_POST"]))) {
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;