本文整理汇总了PHP中CSocNetLogComments::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogComments::getList方法的具体用法?PHP CSocNetLogComments::getList怎么用?PHP CSocNetLogComments::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CSocNetLogComments
的用法示例。
在下文中一共展示了CSocNetLogComments::getList方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: loadLogCommentData
protected function loadLogCommentData()
{
$queryLogComment = \CSocNetLogComments::getList(array(), array("ID" => $this->entityId), false, false, array("ID", "ENTITY_TYPE", "ENTITY_ID", "EVENT_ID", "SOURCE_ID", "LOG_ID"));
return $this->logCommentData = $queryLogComment->fetch();
}
示例2: getDataToShow
public function getDataToShow($userId = 0)
{
$return = null;
if (($res = $this->getDataToCheck($this->entityId)) && !empty($res)) {
list($message, $topic, $forum) = $res;
$return = array('TITLE' => Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE01"), 'DETAIL_URL' => \CForumNew::preparePath2Message($forum["PATH2FORUM_MESSAGE"], array("FORUM_ID" => $message["FORUM_ID"], "TOPIC_ID" => $message["TOPIC_ID"], "MESSAGE_ID" => $message["ID"], "SOCNET_GROUP_ID" => $topic["SOCNET_GROUP_ID"], "OWNER_ID" => $topic["OWNER_ID"], "PARAM1" => $message["PARAM1"], "PARAM2" => $message["PARAM2"])), 'DESCRIPTION' => $topic['TITLE'] == $topic['XML_ID'] ? '' : $topic["TITLE"], 'MEMBERS' => array(), 'DUPLICATE_TO_SOCNET' => "N");
if (($topic["SOCNET_GROUP_ID"] > 0 || $topic["OWNER_ID"] > 0) && $message["NEW_TOPIC"] == "Y" && Loader::includeModule("socialnetwork") && ($res = \CSocNetLog::getList(array("ID" => "DESC"), array("SOURCE_ID" => $message["ID"], "EVENT_ID" => "forum"), false, false, array("ID", "URL", "ENTITY_TYPE", "ENTITY_ID", "LOG_ID"))->fetch()) && $res) {
$return["TITLE"] = $topic["SOCNET_GROUP_ID"] > 0 ? Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE08") : Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE09");
$return["DETAIL_URL"] = empty($res["URL"]) ? \CComponentEngine::makePathFromTemplate(\COption::getOptionString("socialnetwork", "log_entry_page", false, SITE_ID), array("log_id" => $res["ID"])) : $res["URL"];
if (strpos($return["DETAIL_URL"], "#GROUPS_PATH#") !== false) {
$tmp = \CSocNetLogTools::processPath(array("URL" => $return["DETAIL_URL"]), $userId);
$return["DETAIL_URL"] = $tmp["URLS"]["URL"];
}
$return['DUPLICATE_TO_SOCNET'] = "Y";
$return["ENTITY_TYPE"] = $res["ENTITY_TYPE"];
$return["ENTITY_ID"] = $res["ENTITY_ID"];
$return["EVENT_ID"] = "forum";
$return["SOURCE_ID"] = $message["ID"];
$return["LOG_ID"] = $res["LOG_ID"];
$return["MODULE_ID"] = "forum";
} else {
if (!empty($topic["XML_ID"]) || $topic["SOCNET_GROUP_ID"] > 0 || $topic["OWNER_ID"] > 0) {
$entityId = substr($topic["XML_ID"], strrpos($topic["XML_ID"], "_") + 1);
$entityType = substr($topic["XML_ID"], 0, strrpos($topic["XML_ID"], "_"));
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE02");
if ((in_array($entityType, array("FORUM", "TASK", "EVENT", "IBLOCK", "TIMEMAN_ENTRY", "TIMEMAN", "TIMEMAN_REPORT")) || $topic["SOCNET_GROUP_ID"] > 0 || $topic["OWNER_ID"] > 0) && Loader::includeModule("socialnetwork") && ($res = \CSocNetLogComments::getList(array("ID" => "DESC"), array("SOURCE_ID" => $message["ID"], "EVENT_ID" => array("calendar_comment", "commondocs_comment", "files_comment", "forum", "news_comment", "photo_comment", "tasks_comment", "wiki_comment", "report_comment", "timeman_entry_comment")), false, false, array("ID", "SOURCE_ID", "LOG_ID", "EVENT_ID", "ENTITY_TYPE", "ENTITY_ID", "URL", "MODULE_ID"))->fetch()) && $res) {
$return["DETAIL_URL"] = empty($res["URL"]) ? \CComponentEngine::makePathFromTemplate(\COption::getOptionString("socialnetwork", "log_entry_page", false, SITE_ID), array("log_id" => $res["LOG_ID"])) . "?commentId=" . $res["ID"] : $res["URL"];
if (strpos($return["DETAIL_URL"], "#GROUPS_PATH#") !== false) {
$tmp = \CSocNetLogTools::processPath(array("URL" => $return["DETAIL_URL"]), $userId);
$return["DETAIL_URL"] = $tmp["URLS"]["URL"];
}
switch ($res["EVENT_ID"]) {
case "tasks_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE03");
if (Loader::includeModule("tasks")) {
$connector = new TaskConnector($entityId, $this->attachedObject);
$subData = $connector->getDataToShow();
if ($subData["MEMBERS"]) {
$return["MEMBERS"] = $subData["MEMBERS"];
}
}
break;
case "calendar_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE04");
$return["DETAIL_URL"] = null;
break;
case "commondocs_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE05");
break;
case "crm_activity_add_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE06");
break;
case "files_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE07");
break;
case "forum":
$return["TITLE"] = $topic["SOCNET_GROUP_ID"] > 0 ? Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE08") : Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE09");
break;
case "news_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE10");
break;
case "photo_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE11");
break;
case "wiki_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE12");
break;
case "report_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE13");
break;
case "timeman_entry_comment":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE14");
break;
}
$return['DUPLICATE_TO_SOCNET'] = "Y";
$return["ENTITY_TYPE"] = $res["ENTITY_TYPE"];
$return["ENTITY_ID"] = $res["ENTITY_ID"];
$return["EVENT_ID"] = $res["EVENT_ID"];
$return["SOURCE_ID"] = $res["SOURCE_ID"];
$return["LOG_ID"] = $res["LOG_ID"];
$return["MODULE_ID"] = $res["MODULE_ID"];
} else {
$return["DETAIL_URL"] = \CForumNew::preparePath2Message($forum["PATH2FORUM_MESSAGE"], array("FORUM_ID" => $message["FORUM_ID"], "TOPIC_ID" => $message["TOPIC_ID"], "MESSAGE_ID" => $message["ID"], "SOCNET_GROUP_ID" => $topic["SOCNET_GROUP_ID"], "OWNER_ID" => $topic["OWNER_ID"], "PARAM1" => $message["PARAM1"], "PARAM2" => $entityId));
switch ($entityType) {
case "EVENT":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE04");
break;
case "TASK":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE03");
break;
case "IBLOCK":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE15");
break;
case "TIMEMAN_ENTRY":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE14");
break;
case "TIMEMAN":
case "TIMEMAN_REPORT":
$return["TITLE"] = Loc::getMessage("DISK_UF_FORUM_MESSAGE_CONNECTOR_MESSAGE13");
break;
//.........这里部分代码省略.........