本文整理匯總了PHP中CBlogPost::GetSocnetPermsName方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBlogPost::GetSocnetPermsName方法的具體用法?PHP CBlogPost::GetSocnetPermsName怎麽用?PHP CBlogPost::GetSocnetPermsName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CBlogPost
的用法示例。
在下文中一共展示了CBlogPost::GetSocnetPermsName方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
$arResult["Post"]["urlToPost"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("post_id" => CBlogPost::GetPostID($arPost["ID"], $arPost["CODE"], $arParams["ALLOW_POST_CODE"]), "user_id" => $arPost["AUTHOR_ID"]));
if (strlen($arPost["CATEGORY_ID"]) > 0) {
$bHasTag = true;
$arCategory = explode(",", $arPost["CATEGORY_ID"]);
$dbCategory = CBlogCategory::GetList(array(), array("@ID" => $arCategory));
while ($arCatTmp = $dbCategory->Fetch()) {
$arCatTmp["~NAME"] = $arCatTmp["NAME"];
$arCatTmp["NAME"] = htmlspecialcharsEx($arCatTmp["NAME"]);
$arCatTmp["urlToCategory"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_SEARCH_TAG"], array("tag" => urlencode($arCatTmp["NAME"])));
$arResult["Category"][] = $arCatTmp;
}
}
$bAll = false;
$arResult["Post"]["SPERM"] = array();
if ($arPost["HAS_SOCNET_ALL"] != "Y") {
$arSPERM = CBlogPost::GetSocnetPermsName($arResult["Post"]["ID"]);
foreach ($arSPERM as $type => $v) {
foreach ($v as $vv) {
$name = "";
$link = "";
$id = "";
$isExtranet = false;
if ($type == "SG") {
if ($arSocNetGroup = CSocNetGroup::GetByID($vv["ENTITY_ID"])) {
$name = $arSocNetGroup["NAME"];
$link = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_GROUP"], array("group_id" => $vv["ENTITY_ID"]));
$groupSiteID = false;
$rsGroupSite = CSocNetGroup::GetSite($vv["ENTITY_ID"]);
while ($arGroupSite = $rsGroupSite->Fetch()) {
if (!$arResult["bExtranetInstalled"] || $arGroupSite["LID"] != CExtranet::GetExtranetSiteID()) {
$groupSiteID = $arGroupSite["LID"];