當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CBlog::BuildRSSAll方法代碼示例

本文整理匯總了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;
開發者ID:Satariall,項目名稱:izurit,代碼行數:31,代碼來源:component.php

示例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;
開發者ID:webgksupport,項目名稱:alpina,代碼行數:31,代碼來源:component.php


注:本文中的CBlog::BuildRSSAll方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。