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