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


PHP CSocNetLogTools::FormatEvent_IsMessageShort方法代码示例

本文整理汇总了PHP中CSocNetLogTools::FormatEvent_IsMessageShort方法的典型用法代码示例。如果您正苦于以下问题:PHP CSocNetLogTools::FormatEvent_IsMessageShort方法的具体用法?PHP CSocNetLogTools::FormatEvent_IsMessageShort怎么用?PHP CSocNetLogTools::FormatEvent_IsMessageShort使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CSocNetLogTools的用法示例。


在下文中一共展示了CSocNetLogTools::FormatEvent_IsMessageShort方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: FormatEvent_IsMessageShort

	public static function FormatEvent_IsMessageShort($message, $short_message = false)
	{
		return CSocNetLogTools::FormatEvent_IsMessageShort($message, $short_message);
	}
开发者ID:ASDAFF,项目名称:bxApiDocs,代码行数:4,代码来源:log.php

示例2: FormatComment_Report

 public static function FormatComment_Report($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if (!CModule::IncludeModule("socialnetwork")) {
         return $arResult;
     }
     if (!$bMail && $arParams["USE_COMMENT"] != "Y") {
         $arLog["ENTITY_ID"] = $arFields["ENTITY_ID"];
         $arLog["ENTITY_TYPE"] = $arFields["ENTITY_TYPE"];
     }
     $news_tmp = $arLog["TITLE"];
     $title_tmp = GetMessage("REPORT_NEW_COMMENT") . '"' . $arLog["TITLE"] . '"' . "\n";
     $title_tmp .= GetMessage("COMMENT_AUTHOR") . CUser::FormatName(CSite::GetNameFormat(false), array("NAME" => $arFields["CREATED_BY_NAME"], "LAST_NAME" => $arFields["CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arFields["CREATED_BY_SECOND_NAME"], "LOGIN" => $arFields["CREATED_BY_LOGIN"]), true) . "\n";
     $title_tmp .= GetMessage("COMMENT_TEXT");
     $title = str_replace(array("#TITLE#", "#ENTITY#"), array($news_tmp, $bMail ? $arResult["ENTITY"]["FORMATTED"] : $arResult["ENTITY"]["FORMATTED"]["NAME"]), $title_tmp);
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $bMail || $arParams["USE_COMMENT"] != "Y" ? $title : "", "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     $arResult["ENTITY"]["TYPE_MAIL"] = GetMessage("REPORT_TITLE_FOR_MAIL");
     if ($bMail) {
         $reportURL = COption::GetOptionString("timeman", "WORK_REPORT_PATH", "/company/work_report.php");
         if (strlen($reportURL) == 0) {
             $reportURL = "/company/work_report.php";
         }
         $reportURL = CSocNetLogTools::FormatEvent_GetURL(array("URL" => $reportURL, "SITE_ID" => $arFields["LOG_SITE_ID"]));
         if (strlen($reportURL) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $reportURL . "#user_id=" . $arLog["ENTITY_ID"] . "&report=" . $arLog["SOURCE_ID"];
         }
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "USERFIELDS" => $arFields["UF"], "USER" => "Y");
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $parserLog->pathToUser = $parserLog->userPath = $arParams["PATH_TO_USER"];
             $parserLog->bMobile = $arParams["MOBILE"] == "Y";
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
         } else {
             $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "N", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "USERFIELDS" => $arFields["UF"]);
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:54,代码来源:timeman_report_full.php

示例3: FormatComment_Data

 function FormatComment_Data($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if (!CModule::IncludeModule("socialnetwork")) {
         return $arResult;
     }
     if (in_array($arLog["ENTITY_TYPE"], array(SONET_SUBSCRIBE_ENTITY_GROUP, SONET_SUBSCRIBE_ENTITY_USER))) {
         $arResult["ENTITY"] = CSocNetLogTools::FormatEvent_GetEntity($arLog, $arParams, $bMail);
     }
     if (!$bMail && $arParams["USE_COMMENT"] != "Y") {
         $arLog["ENTITY_ID"] = $arFields["ENTITY_ID"];
         $arLog["ENTITY_TYPE"] = $arFields["ENTITY_TYPE"];
     }
     if (!$bMail && array_key_exists("URL", $arLog) && strlen($arLog["URL"]) > 0) {
         $news_tmp = '<a href="' . $arLog["URL"] . '">' . $arLog["TITLE"] . '</a>';
     } else {
         $news_tmp = $arLog["TITLE"];
     }
     $title_tmp = $bMail ? GetMessage("LFP_SOCNET_LOG_DATA_COMMENT_" . $arLog["ENTITY_TYPE"] . "_TITLE_MAIL") : GetMessage("LFP_SOCNET_LOG_DATA_COMMENT_TITLE");
     $title = str_replace(array("#TITLE#", "#ENTITY#"), array($news_tmp, $bMail ? $arResult["ENTITY"]["FORMATTED"] : $arResult["ENTITY"]["FORMATTED"]["NAME"]), $title_tmp);
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $bMail || $arParams["USE_COMMENT"] != "Y" ? "<a href=\"asdfasdf\">" . $title . "</a>" : "", "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     if ($bMail) {
         $url = CSocNetLogTools::FormatEvent_GetURL($arLog, true);
         if (strlen($url) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $url;
         }
     } else {
         $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
         $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N");
         $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N");
         $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:38,代码来源:include.php

示例4: FormatComment_Wiki

 static function FormatComment_Wiki($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if ($bMail) {
         $arResult['CREATED_BY'] = CSocNetLogTools::FormatEvent_GetCreatedBy($arFields, $arParams, $bMail);
         $arResult['ENTITY'] = CSocNetLogTools::FormatEvent_GetEntity($arLog, $arParams, $bMail);
     }
     if (!$bMail && array_key_exists('URL', $arLog) && strlen($arLog['URL']) > 0) {
         $wiki_tmp = '<a href="' . $arLog['URL'] . '">' . $arLog['TITLE'] . '</a>';
     } else {
         $wiki_tmp = $arLog['TITLE'];
     }
     $title = str_replace(array('#TITLE#', '#ENTITY#', '#CREATED_BY#'), array($wiki_tmp, $arResult['ENTITY']['FORMATTED'], $bMail ? $arResult['CREATED_BY']['FORMATTED'] : ''), $bMail ? GetMessage('WIKI_SOCNET_LOG_COMMENT_TITLE_MAIL') : GetMessage('WIKI_SOCNET_LOG_COMMENT_TITLE'));
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $title, "MESSAGE" => $bMail ? CSocNetTextParser::killAllTags($arFields['MESSAGE']) : $arFields['MESSAGE']);
     if ($bMail) {
         $url = CSocNetLogTools::FormatEvent_GetURL($arLog);
         if (strlen($url) > 0) {
             $arResult['EVENT_FORMATTED']['URL'] = $url;
         }
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $arAllow = array("HTML" => "N", "ALIGN" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "VIDEO" => "Y", "LOG_VIDEO" => "N", "SHORT_ANCHOR" => "Y", "USERFIELDS" => $arFields["UF"], "USER" => "Y");
             $parserLog->pathToUser = $arParams["PATH_TO_USER"];
             $parserLog->arUserfields = $arFields["UF"];
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
         } else {
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "Y", "VIDEO" => "Y", "LOG_VIDEO" => "N");
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:rasuldev,项目名称:torino,代码行数:47,代码来源:wiki_socnet.php

示例5: FormatComment_News

 function FormatComment_News($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if (!CModule::IncludeModule("socialnetwork")) {
         return $arResult;
     }
     if ($bMail) {
         $arResult["CREATED_BY"] = CSocNetLogTools::FormatEvent_GetCreatedBy($arFields, $arParams, $bMail);
         $arResult["ENTITY"] = CIntranetEventHandlers::GetEntity_News($arLog, $bMail);
     } elseif ($arParams["USE_COMMENT"] != "Y") {
         $arLog["ENTITY_ID"] = $arFields["ENTITY_ID"];
         $arLog["ENTITY_TYPE"] = $arFields["ENTITY_TYPE"];
         $arResult["ENTITY"] = CIntranetEventHandlers::GetEntity_News($arLog, false);
     }
     if (!$bMail && array_key_exists("URL", $arLog) && strlen($arLog["URL"]) > 0) {
         $news_tmp = '<a href="' . $arLog["URL"] . '">' . $arLog["TITLE"] . '</a>';
     } else {
         $news_tmp = $arLog["TITLE"];
     }
     $title_tmp = $bMail ? GetMessage("INTR_SOCNET_LOG_NEWS_COMMENT_TITLE_MAIL") : GetMessage("INTR_SOCNET_LOG_NEWS_COMMENT_TITLE");
     $title = str_replace(array("#TITLE#", "#ENTITY#", "#CREATED_BY#"), array($news_tmp, $arResult["ENTITY"]["FORMATTED"], $bMail ? $arResult["CREATED_BY"]["FORMATTED"] : ""), $title_tmp);
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $bMail || $arParams["USE_COMMENT"] != "Y" ? $title : "", "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     if ($bMail) {
         $url = CSocNetLogTools::FormatEvent_GetURL($arLog);
         if (strlen($url) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $url;
         }
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $arAllow = array("HTML" => "N", "ALIGN" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "VIDEO" => "Y", "LOG_VIDEO" => "N", "SHORT_ANCHOR" => "Y", "USERFIELDS" => $arFields["UF"], "USER" => "Y");
             $parserLog->pathToUser = $parserLog->userPath = $arParams["PATH_TO_USER"];
             $parserLog->arUserfields = $arFields["UF"];
             $parserLog->bMobile = $arParams["MOBILE"] == "Y";
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
         } else {
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N");
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:56,代码来源:include.php

示例6: FormatComment

 public static function FormatComment($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if (!CModule::IncludeModule("socialnetwork")) {
         return $arResult;
     }
     $arResult["EVENT_FORMATTED"] = array("TITLE" => GetMessage('I_NEW_USER_TITLE'), "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     $arResult["ENTITY"]["TYPE_MAIL"] = GetMessage('I_NEW_USER_TITLE');
     if ($bMail) {
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $arAllow = array("HTML" => "N", "ALIGN" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "QUOTE" => "Y", "CODE" => "Y", "FONT" => "Y", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "VIDEO" => "Y", "LOG_VIDEO" => "N", "SHORT_ANCHOR" => "Y", "USERFIELDS" => $arFields["UF"], "USER" => $arParams["IM"] == "Y" ? "N" : "Y");
             $parserLog->pathToUser = $parserLog->userPath = $arParams["PATH_TO_USER"];
             $parserLog->arUserfields = $arFields["UF"];
             $parserLog->bMobile = $arParams["MOBILE"] == "Y";
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = preg_replace("/\\[user\\s*=\\s*([^\\]]*)\\](.+?)\\[\\/user\\]/is" . BX_UTF_PCRE_MODIFIER, "\\2", $arResult["EVENT_FORMATTED"]["MESSAGE"]);
         } else {
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N");
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:39,代码来源:notify.php

示例7: FormatComment_Photo

 function FormatComment_Photo($arFields, $arParams, $bMail = false, $arLog = array())
 {
     if ($bMail && strlen($arFields["MAIL_LANGUAGE_ID"]) > 0) {
         IncludeModuleLangFile(__FILE__, $arFields["MAIL_LANGUAGE_ID"]);
     }
     $arResult = array("EVENT_FORMATTED" => array());
     if ($bMail) {
         $arResult["CREATED_BY"] = CSocNetLogTools::FormatEvent_GetCreatedBy($arFields, $arParams, $bMail);
         $arResult["ENTITY"] = CSocNetLogTools::FormatEvent_GetEntity($arLog, $arParams, $bMail);
     } elseif ($arParams["USE_COMMENT"] != "Y") {
         $arResult["ENTITY"] = CSocNetLogTools::FormatEvent_GetEntity($arFields, $arParams, false);
     }
     if (!$bMail && array_key_exists("URL", $arLog) && strlen($arLog["URL"]) > 0) {
         $photo_tmp = '<a href="' . $arLog["URL"] . '">' . $arLog["TITLE"] . '</a>';
     } else {
         $photo_tmp = $arLog["TITLE"];
     }
     if ($bMail) {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_" . ($arFields["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_GROUP ? "GROUP" : "USER") . "_PHOTO_COMMENT_MAIL");
     } else {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_PHOTO_COMMENT");
     }
     $album_name = "";
     if (array_key_exists("PARAMS", $arLog) && strlen($arLog["PARAMS"]) > 0) {
         $arTmp = unserialize($arLog["PARAMS"]);
         if ($arTmp && array_key_exists("SECTION_NAME", $arTmp)) {
             $album_name = $arTmp["SECTION_NAME"];
         }
     }
     if ($bMail) {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_" . ($arFields["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_GROUP ? "GROUP" : "USER") . "_PHOTO_COMMENT_MAIL");
     } else {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_PHOTO_COMMENT");
     }
     $title = str_replace(array("#TITLE#", "#ENTITY#", "#CREATED_BY#", "#ALBUM#"), array($photo_tmp, $arResult["ENTITY"]["FORMATTED"], $bMail ? $arResult["CREATED_BY"]["FORMATTED"] : "", $album_name), $title_tmp);
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $bMail || $arParams["USE_COMMENT"] != "Y" ? $title : "", "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     if ($bMail) {
         $url = CSocNetLogTools::FormatEvent_GetURL($arLog);
         if (strlen($url) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $url;
         }
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "USERFIELDS" => $arFields["UF"], "USER" => $arParams["IM"] == "Y" ? "N" : "Y");
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $parserLog->arUserfields = $arFields["UF"];
             $parserLog->pathToUser = $parserLog->userPath = $arParams["PATH_TO_USER"];
             $parserLog->bMobile = $arParams["MOBILE"] == "Y";
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = preg_replace("/\\[user\\s*=\\s*([^\\]]*)\\](.+?)\\[\\/user\\]/is" . BX_UTF_PCRE_MODIFIER, "\\2", $arResult["EVENT_FORMATTED"]["MESSAGE"]);
         } else {
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N");
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     if ($bMail && strlen($arFields["MAIL_LANGUAGE_ID"]) > 0) {
         IncludeModuleLangFile(__FILE__, LANGUAGE_ID);
     }
     return $arResult;
 }
开发者ID:Satariall,项目名称:izurit,代码行数:74,代码来源:log_tools.php

示例8: FormatComment_Data

 function FormatComment_Data($arFields, $arParams, $bMail = false, $arLog = array())
 {
     $arResult = array("EVENT_FORMATTED" => array());
     if (!CModule::IncludeModule("socialnetwork")) {
         return $arResult;
     }
     if ($arLog["ENTITY_TYPE"] == SONET_SUBSCRIBE_ENTITY_PROVIDER) {
         $arResult["ENTITY"] = CXDILFEventHandlers::GetEntity_Data($arLog, $bMail);
     } elseif (in_array($arLog["ENTITY_TYPE"], array(SONET_SUBSCRIBE_ENTITY_GROUP, SONET_SUBSCRIBE_ENTITY_USER))) {
         $arResult["ENTITY"] = CSocNetLogTools::FormatEvent_GetEntity($arLog, $arParams, $bMail);
     }
     if (!$bMail && $arParams["USE_COMMENT"] != "Y") {
         $arLog["ENTITY_ID"] = $arFields["ENTITY_ID"];
         $arLog["ENTITY_TYPE"] = $arFields["ENTITY_TYPE"];
     }
     if (!$bMail && array_key_exists("URL", $arLog) && strlen($arLog["URL"]) > 0) {
         $news_tmp = '<a href="' . $arLog["URL"] . '">' . $arLog["TITLE"] . '</a>';
     } else {
         $news_tmp = $arLog["TITLE"];
     }
     $title_tmp = $bMail ? GetMessage("LFP_SOCNET_LOG_DATA_COMMENT_" . $arLog["ENTITY_TYPE"] . "_TITLE_MAIL") : GetMessage("LFP_SOCNET_LOG_DATA_COMMENT_TITLE");
     $title = str_replace(array("#TITLE#", "#ENTITY#"), array($news_tmp, $bMail ? $arResult["ENTITY"]["FORMATTED"] : $arResult["ENTITY"]["FORMATTED"]["NAME"]), $title_tmp);
     $arResult["EVENT_FORMATTED"] = array("TITLE" => $bMail || $arParams["USE_COMMENT"] != "Y" ? $title : "", "MESSAGE" => $bMail ? $arFields["TEXT_MESSAGE"] : $arFields["MESSAGE"]);
     if ($bMail) {
         $url = CSocNetLogTools::FormatEvent_GetURL($arLog, true);
         if (strlen($url) > 0) {
             $arResult["EVENT_FORMATTED"]["URL"] = $url;
         }
     } else {
         static $parserLog = false;
         if (CModule::IncludeModule("forum")) {
             $arAllow = array("HTML" => "N", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "USERFIELDS" => $arFields["UF"], "USER" => $arParams["IM"] == "Y" ? "N" : "Y");
             if (!$parserLog) {
                 $parserLog = new forumTextParser(LANGUAGE_ID);
             }
             $parserLog->pathToUser = $arParams["PATH_TO_USER"];
             $parserLog->arUserfields = $arFields["UF"];
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow));
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = preg_replace("/\\[user\\s*=\\s*([^\\]]*)\\](.+?)\\[\\/user\\]/is" . BX_UTF_PCRE_MODIFIER, "\\2", $arResult["EVENT_FORMATTED"]["MESSAGE"]);
         } else {
             $arAllow = array("HTML" => "Y", "ANCHOR" => "Y", "BIU" => "Y", "IMG" => "Y", "LOG_IMG" => "N", "QUOTE" => "Y", "LOG_QUOTE" => "N", "CODE" => "Y", "LOG_CODE" => "N", "FONT" => "Y", "LOG_FONT" => "N", "LIST" => "Y", "SMILES" => "Y", "NL2BR" => "Y", "MULTIPLE_BR" => "N", "VIDEO" => "Y", "LOG_VIDEO" => "N", "USERFIELDS" => $arFields["UF"], "USER" => "Y");
             if (!$parserLog) {
                 $parserLog = new logTextParser(false, $arParams["PATH_TO_SMILE"]);
             }
             $arResult["EVENT_FORMATTED"]["MESSAGE"] = htmlspecialcharsbx($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow));
         }
         if ($arParams["MOBILE"] != "Y" && $arParams["NEW_TEMPLATE"] != "Y") {
             if (CModule::IncludeModule("forum")) {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), $arAllow), 500);
             } else {
                 $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"] = $parserLog->html_cut($parserLog->convert(htmlspecialcharsback($arResult["EVENT_FORMATTED"]["MESSAGE"]), array(), $arAllow), 500);
             }
             $arResult["EVENT_FORMATTED"]["IS_MESSAGE_SHORT"] = CSocNetLogTools::FormatEvent_IsMessageShort($arResult["EVENT_FORMATTED"]["MESSAGE"], $arResult["EVENT_FORMATTED"]["SHORT_MESSAGE"]);
         }
     }
     return $arResult;
 }
开发者ID:DarneoStudio,项目名称:bitrix,代码行数:57,代码来源:include.php


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