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