本文整理匯總了PHP中CBlog::GetSocnetReadByBlog方法的典型用法代碼示例。如果您正苦於以下問題:PHP CBlog::GetSocnetReadByBlog方法的具體用法?PHP CBlog::GetSocnetReadByBlog怎麽用?PHP CBlog::GetSocnetReadByBlog使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CBlog
的用法示例。
在下文中一共展示了CBlog::GetSocnetReadByBlog方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: AddSocnetRead
function AddSocnetRead($ID)
{
global $DB;
$ID = IntVal($ID);
if ($ID <= 0) {
return false;
}
if (CBlog::GetSocnetReadByBlog($ID)) {
return true;
}
$strSql = "INSERT INTO b_blog_socnet(BLOG_ID) " . "VALUES(" . $ID . ")";
if ($DB->Query($strSql, False, "File: " . __FILE__ . "<br>Line: " . __LINE__)) {
return true;
}
return false;
}
示例2: GetMessage
if (CModule::IncludeModule("socialnetwork")) {
if ($arFields["USE_SOCNET"] == "Y") {
$bRights = false;
$featureOperationPerms = CSocNetFeaturesPerms::GetOperationPerm(SONET_ENTITY_USER, $arFields["OWNER_ID"], "blog", "view_post");
if ($featureOperationPerms == SONET_RELATIONS_TYPE_ALL) {
$bRights = true;
}
if ($bRights) {
CBlog::AddSocnetRead($ID);
} else {
if (CBlog::GetSocnetReadByBlog($ID)) {
CBlog::DeleteSocnetRead($ID);
}
}
} else {
if (CBlog::GetSocnetReadByBlog($ID)) {
CBlog::DeleteSocnetRead($ID);
}
}
}
if (!$result) {
$bVarsFromForm = true;
if ($ex = $APPLICATION->GetException()) {
$errorMessage .= $ex->GetString() . "<br />";
} else {
$errorMessage .= GetMessage("BLBE_SAVE_ERROR") . "<br />";
}
}
if (strlen($errorMessage) <= 0) {
if (!empty($arBlogOld)) {
if ($arBlogOld["GROUP_ID"] != $arFields["GROUP_ID"]) {