本文整理汇总了PHP中CBlogComment::AddLiveComment方法的典型用法代码示例。如果您正苦于以下问题:PHP CBlogComment::AddLiveComment方法的具体用法?PHP CBlogComment::AddLiveComment怎么用?PHP CBlogComment::AddLiveComment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBlogComment
的用法示例。
在下文中一共展示了CBlogComment::AddLiveComment方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlspecialcharsback
$arNewRightsName[] = "[user=" . $id . "]" . htmlspecialcharsback($name) . "[/user]";
} else {
$arNewRightsName[] = "[url=" . $link . "]" . htmlspecialcharsback($name) . "[/url]";
}
} else {
$arNewRightsName[] = htmlspecialcharsback($name);
}
}
}
}
$UserIP = CBlogUser::GetUserIP();
$arComFields = array("POST_ID" => $arParams["ID"], "BLOG_ID" => $arPost["BLOG_ID"], "POST_TEXT" => (count($arNewRightsName) > 1 ? GetMessage("B_B_SHARE") : GetMessage("B_B_SHARE_1")) . implode(", ", $arNewRightsName), "DATE_CREATE" => ConvertTimeStamp(time() + $arResult["TZ_OFFSET"], "FULL"), "AUTHOR_IP" => $UserIP[0], "AUTHOR_IP1" => $UserIP[1], "PARENT_ID" => false, "AUTHOR_ID" => $user_id, "SHARE_DEST" => implode(",", $arNewRights));
if ($comId = CBlogComment::Add($arComFields)) {
BXClearCache(true, "/blog/comment/" . $arParams["ID"] . "/");
if (method_exists("CBlogComment", "AddLiveComment")) {
CBlogComment::AddLiveComment($comId, CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_POST"]), array("post_id" => $arParams["ID"], "user_id" => $arPost["AUTHOR_ID"])) . "?commentId=" . $comId);
}
if ($arPost["AUTHOR_ID"] != $user_id) {
$arFieldsIM = array("TYPE" => "SHARE", "TITLE" => $arPost["TITLE"], "URL" => CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_POST"]), array("post_id" => $arParams["ID"], "user_id" => $arPost["AUTHOR_ID"])), "ID" => $arParams["ID"], "FROM_USER_ID" => $user_id, "TO_USER_ID" => array($arPost["AUTHOR_ID"]));
CBlogPost::NotifyIm($arFieldsIM);
}
if (!empty($arUsers2Notify)) {
$arFieldsIM = array("TYPE" => "SHARE2USERS", "TITLE" => $arPost["TITLE"], "URL" => CComponentEngine::MakePathFromTemplate(htmlspecialcharsBack($arParams["PATH_TO_POST"]), array("post_id" => $arParams["ID"], "user_id" => $arPost["AUTHOR_ID"])), "ID" => $arParams["ID"], "FROM_USER_ID" => $user_id, "TO_USER_ID" => $arUsers2Notify);
CBlogPost::NotifyIm($arFieldsIM);
}
}
/* update socnet log rights*/
$dbRes = CSocNetLog::GetList(array("ID" => "DESC"), array("EVENT_ID" => array("blog_post", "blog_post_important"), "SOURCE_ID" => $arPost["ID"]), false, false, array("ID", "ENTITY_TYPE", "ENTITY_ID"));
if ($arRes = $dbRes->Fetch()) {
$arLogSites = array();
$rsLogSite = CSocNetLog::GetSite($arRes["ID"]);