当前位置: 首页>>代码示例>>PHP>>正文


PHP CBlogComment::AddLiveComment方法代码示例

本文整理汇总了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"]);
开发者ID:vim84,项目名称:b-markt,代码行数:31,代码来源:component.php


注:本文中的CBlogComment::AddLiveComment方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。