當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CSocNetLogTools::FormatEvent_FillTooltip方法代碼示例

本文整理匯總了PHP中CSocNetLogTools::FormatEvent_FillTooltip方法的典型用法代碼示例。如果您正苦於以下問題:PHP CSocNetLogTools::FormatEvent_FillTooltip方法的具體用法?PHP CSocNetLogTools::FormatEvent_FillTooltip怎麽用?PHP CSocNetLogTools::FormatEvent_FillTooltip使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CSocNetLogTools的用法示例。


在下文中一共展示了CSocNetLogTools::FormatEvent_FillTooltip方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: FormatEvent_FillTooltip

	public static function FormatEvent_FillTooltip($arFields, $arParams)
	{
		return CSocNetLogTools::FormatEvent_FillTooltip($arFields, $arParams);
	}
開發者ID:ASDAFF,項目名稱:bxApiDocs,代碼行數:4,代碼來源:log.php

示例2: FormatEvent_System

 function FormatEvent_System($arFields, $arParams, $bMail = false)
 {
     if ($bMail && strlen($arFields["MAIL_LANGUAGE_ID"]) > 0) {
         IncludeModuleLangFile(__FILE__, $arFields["MAIL_LANGUAGE_ID"]);
     }
     $arResult = array("EVENT" => $arFields, "CREATED_BY" => array(), "ENTITY" => array(), "EVENT_FORMATTED" => array());
     if (intval($arFields["ENTITY_ID"]) > 0) {
         $suffix = is_array($GLOBALS["arExtranetGroupID"]) && in_array($arFields["ENTITY_ID"], $GLOBALS["arExtranetGroupID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
         if ($bMail) {
             $arResult["ENTITY"]["FORMATTED"] = $arFields["GROUP_NAME"] . $suffix;
             $arResult["ENTITY"]["TYPE_MAIL"] = GetMessage("SONET_GL_EVENT_ENTITY_G");
         } elseif (strpos($arFields["MESSAGE"], ",") > 0) {
             $arResult["ENTITY"] = CSocNetLogTools::FormatEvent_GetEntity($arFields, $arParams, false);
         }
     }
     if (in_array($arFields["TITLE"], array("moderate", "unmoderate", "join", "unjoin"))) {
         if (strpos($arFields["MESSAGE"], ",") !== false) {
             $arResult["CREATED_BY"] = false;
             $arGroup = array("IMAGE_ID" => $arFields["GROUP_IMAGE_ID"]);
             $arResult["AVATAR_SRC"] = CSocNetLogTools::FormatEvent_CreateAvatarGroup($arGroup, $arParams);
             // group avatar
         } else {
             $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arFields["MESSAGE"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
             $dbUser = CUser::GetByID($arFields["MESSAGE"]);
             if ($arUser = $dbUser->Fetch()) {
                 $arFieldsTooltip = array("ID" => $arUser["ID"], "NAME" => $arUser["NAME"], "LAST_NAME" => $arUser["LAST_NAME"], "SECOND_NAME" => $arUser["SECOND_NAME"], "LOGIN" => $arUser["LOGIN"]);
                 $oldNameTemplate = $arParams["NAME_TEMPLATE"];
                 $arParams["NAME_TEMPLATE"] .= $suffix;
                 $arResult["CREATED_BY"]["TOOLTIP_FIELDS"] = CSocNetLogTools::FormatEvent_FillTooltip($arFieldsTooltip, $arParams);
                 $arParams["NAME_TEMPLATE"] = $oldNameTemplate;
                 if (!$bMail) {
                     $arResult["AVATAR_SRC"] = CSocNetLogTools::FormatEvent_CreateAvatar($arUser, $arParams, "");
                 }
             }
         }
     } else {
         $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arFields["USER_ID"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
         $arFieldsTooltip = array("ID" => $arFields["USER_ID"], "NAME" => $arFields["~CREATED_BY_NAME"], "LAST_NAME" => $arFields["~CREATED_BY_LAST_NAME"], "SECOND_NAME" => $arFields["~CREATED_BY_SECOND_NAME"], "LOGIN" => $arFields["~CREATED_BY_LOGIN"]);
         $oldNameTemplate = $arParams["NAME_TEMPLATE"];
         $arParams["NAME_TEMPLATE"] .= $suffix;
         $arResult["CREATED_BY"]["TOOLTIP_FIELDS"] = CSocNetLogTools::FormatEvent_FillTooltip($arFieldsTooltip, $arParams);
         $arParams["NAME_TEMPLATE"] = $oldNameTemplate;
         if (!$bMail) {
             $arResult["AVATAR_SRC"] = CSocNetLogTools::FormatEvent_CreateAvatar($arFields, $arParams, "CREATED_BY_");
         }
     }
     if (strlen($arFields["MESSAGE"]) > 0) {
         $arUsersID = explode(",", $arFields["MESSAGE"]);
         $bFirst = true;
         $count = 0;
         $user_tmp = "";
         if ($bMail) {
             $dbUser = CUser::GetList($by = "last_name", $order = "asc", array("ID" => implode(" | ", $arUsersID)));
             while ($arUser = $dbUser->Fetch()) {
                 $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arUser["ID"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
                 $count++;
                 if (!$bFirst) {
                     $user_tmp .= ", ";
                 }
                 if (strlen($arUser["NAME"]) > 0 || strlen($arUser["LAST_NAME"]) > 0) {
                     $user_tmp .= $arUser["NAME"] . " " . $arUser["LAST_NAME"] . $suffix;
                 } else {
                     $user_tmp .= $arUser["LOGIN"] . $suffix;
                 }
                 $bFirst = false;
             }
         } else {
             $ajax_page = $GLOBALS["APPLICATION"]->GetCurPageParam("", array("bxajaxid", "logout"));
             $dbUser = CUser::GetList($by = "last_name", $order = "asc", array("ID" => implode(" | ", $arUsersID)), array("FIELDS" => array("ID", "NAME", "LAST_NAME", "SECOND_NAME", "LOGIN", "PERSONAL_GENDER")));
             while ($arUser = $dbUser->Fetch()) {
                 if (defined("BX_COMP_MANAGED_CACHE")) {
                     $GLOBALS["CACHE_MANAGER"]->RegisterTag("USER_NAME_" . intval($arUser["ID"]));
                 }
                 $suffix = is_array($GLOBALS["arExtranetUserID"]) && in_array($arUser["ID"], $GLOBALS["arExtranetUserID"]) ? GetMessage("SONET_LOG_EXTRANET_SUFFIX") : "";
                 $count++;
                 if (!$bFirst) {
                     $user_tmp .= ", ";
                 }
                 $oldNameTemplate = $arParams["NAME_TEMPLATE"];
                 $arParams["NAME_TEMPLATE"] .= $suffix;
                 $anchor_id = RandString(8);
                 if ($arParams["MOBILE"] == "Y") {
                     $user_tmp .= '<a href="' . str_replace(array("#user_id#", "#USER_ID#", "#id#", "#ID#"), $arUser["ID"], $arParams["~PATH_TO_USER"]) . '">' . CUser::FormatName($arParams["NAME_TEMPLATE"], $arUser, $arParams["SHOW_LOGIN"] != "N" ? true : false) . '</a>';
                 } else {
                     $user_tmp .= '<a class="" id="anchor_' . $anchor_id . '" href="' . str_replace(array("#user_id#", "#USER_ID#", "#id#", "#ID#"), $arUser["ID"], $arParams["~PATH_TO_USER"]) . '">' . CUser::FormatName($arParams["NAME_TEMPLATE"], $arUser, $arParams["SHOW_LOGIN"] != "N" ? true : false) . '</a>';
                     $user_tmp .= '<script type="text/javascript">';
                     $user_tmp .= 'BX.tooltip(' . $arUser["ID"] . ', "anchor_' . $anchor_id . '", "' . CUtil::JSEscape($ajax_page) . '");';
                     $user_tmp .= '</script>';
                 }
                 $arParams["NAME_TEMPLATE"] = $oldNameTemplate;
                 $bFirst = false;
                 $arLastUser = $arUser;
             }
         }
     }
     if ($bMail) {
         $title_tmp = GetMessage("SONET_GL_EVENT_TITLE_SYSTEM_" . strtoupper($arFields["TITLE"]) . "_" . ($count > 1 ? "2" : "1") . "_MAIL");
     } else {
         if (in_array($arFields["TITLE"], array("moderate", "unmoderate", "join", "unjoin"))) {
             if ($count == 1 && $arLastUser) {
//.........這裏部分代碼省略.........
開發者ID:Satariall,項目名稱:izurit,代碼行數:101,代碼來源:log_tools.php


注:本文中的CSocNetLogTools::FormatEvent_FillTooltip方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。