本文整理汇总了PHP中CExtranet::GetSitesByLogDestinations方法的典型用法代码示例。如果您正苦于以下问题:PHP CExtranet::GetSitesByLogDestinations方法的具体用法?PHP CExtranet::GetSitesByLogDestinations怎么用?PHP CExtranet::GetSitesByLogDestinations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CExtranet
的用法示例。
在下文中一共展示了CExtranet::GetSitesByLogDestinations方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
$arSoFields["ENTITY_TYPE"] = SONET_ENTITY_USER;
$arSoFields["ENTITY_ID"] = $arBlog["OWNER_ID"];
$arSoFields["URL"] = CComponentEngine::MakePathFromTemplate($arParams["PATH_TO_POST"], array("blog" => $arBlog["URL"], "user_id" => $arBlog["OWNER_ID"], "group_id" => $arParams["SOCNET_GROUP_ID"], "post_id" => $arPost["ID"]));
}
if (intval($arParams["user_id"]) > 0) {
$arSoFields["USER_ID"] = $arParams["user_id"];
}
$logID = CSocNetLog::Add($arSoFields, false);
if (intval($logID) > 0) {
$socnetPerms = CBlogPost::GetSocNetPermsCode($arPost["ID"]);
if (!in_array("U" . $arPost["AUTHOR_ID"], $socnetPerms)) {
$socnetPerms[] = "U" . $arPost["AUTHOR_ID"];
}
CSocNetLog::Update($logID, array("TMP_ID" => $logID));
if (CModule::IncludeModule("extranet")) {
$arSiteID = CExtranet::GetSitesByLogDestinations($socnetPerms);
CSocNetLog::Update($logID, array("SITE_ID" => $arSiteID));
}
CSocNetLogRights::DeleteByLogID($logID);
CSocNetLogRights::Add($logID, $socnetPerms);
CSocNetLog::SendEvent($logID, "SONET_NEW_EVENT", $logID);
}
}
}
// IMAGES UPDATE
if (!empty($arImagesToUpdate)) {
foreach ($arImagesToUpdate as $imgID) {
CBlogImage::Update($imgID, array("POST_ID" => $postID));
}
}
// category update
示例2: Update
//.........这里部分代码省略.........
$arGroup = CBlogGroup::GetByID($arBlog["GROUP_ID"]);
if(strlen($arFields["PATH"]) > 0)
{
$arPostSite = array($arGroup["SITE_ID"] => $arFields["PATH"]);
}
elseif(strlen($arNewPost["PATH"]) > 0)
{
$arNewPost["PATH"] = (
strlen($arNewPost["CODE"]) > 0
? str_replace("#post_id#", $arNewPost["CODE"], $arNewPost["PATH"])
: str_replace("#post_id#", $ID, $arNewPost["PATH"])
);
$arPostSite = array($arGroup["SITE_ID"] => $arNewPost["PATH"]);
}
else
{
$arPostSite = array(
$arGroup["SITE_ID"] => CBlogPost::PreparePath(
$arBlog["URL"],
$arNewPost["ID"],
$arGroup["SITE_ID"],
false,
$arBlog["OWNER_ID"],
$arBlog["SOCNET_GROUP_ID"]
)
);
}
if (
$arBlog["USE_SOCNET"] == "Y"
&& CModule::IncludeModule("extranet")
)
{
$arPostSiteExt = CExtranet::GetSitesByLogDestinations($arFields["SC_PERM"]);
foreach($arPostSiteExt as $lid)
{
if (!array_key_exists($lid, $arPostSite))
{
$arPostSite[$lid] = str_replace(
array("#user_id#", "#post_id#"),
array($arBlog["OWNER_ID"], $arNewPost["ID"]),
COption::GetOptionString("socialnetwork", "userblogpost_page", false, $lid)
);
}
}
}
if(strlen($arNewPost["CATEGORY_ID"])>0)
{
$arC = explode(",", $arNewPost["CATEGORY_ID"]);
$arTag = Array();
foreach($arC as $v)
{
$arCategory = CBlogCategory::GetByID($v);
$arTag[] = $arCategory["NAME"];
}
$tag = implode(",", $arTag);
}
$searchContent = blogTextParser::killAllTags($arNewPost["DETAIL_TEXT"]);
$searchContent .= "\r\n" . $GLOBALS["USER_FIELD_MANAGER"]->OnSearchIndex("BLOG_POST", $arNewPost["ID"]);
$authorName = "";
if(IntVal($arNewPost["AUTHOR_ID"]) > 0)
{
$dbUser = CUser::GetByID($arNewPost["AUTHOR_ID"]);
示例3: SocnetLogUpdateRights
public function SocnetLogUpdateRights($ID, $iblockID, $eventID)
{
if (!CModule::IncludeModule("socialnetwork")) {
return null;
}
$arReaders = CWebDavIblock::GetReaders($ID, $iblockID);
if ($arLog = self::GetSocnetLogByFileID($ID, $eventID)) {
CSocNetLogRights::DeleteByLogID($arLog['ID']);
if (CModule::IncludeModule("extranet")) {
$arSiteID = CExtranet::GetSitesByLogDestinations($arReaders);
CSocNetLog::Update($arLog['ID'], array("SITE_ID" => $arSiteID));
}
CSocNetLogRights::Add($arLog['ID'], $arReaders);
}
}