本文整理汇总了PHP中ForumAddPageParams函数的典型用法代码示例。如果您正苦于以下问题:PHP ForumAddPageParams函数的具体用法?PHP ForumAddPageParams怎么用?PHP ForumAddPageParams使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ForumAddPageParams函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: MakeTimeStamp
// data
$res["POST_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["POST_DATE"], CSite::GetDateFormat()));
$res["EDIT_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["EDIT_DATE"], CSite::GetDateFormat()));
// text
$res["ALLOW"] = array_merge($arAllow + array("SMILES" => ($res["USE_SMILES"] == "Y" ? $arResult["FORUM"]["ALLOW_SMILES"] : "N")));
$res["~POST_MESSAGE_TEXT"] = (COption::GetOptionString("forum", "FILTER", "Y")=="Y" ? $res["~POST_MESSAGE_FILTER"] : $res["~POST_MESSAGE"]);
// attach
$res["ATTACH_IMG"] = ""; $res["FILES"] = array();
$res["~ATTACH_FILE"] = array(); $res["ATTACH_FILE"] = array();
// links
if ($arResult["SHOW_PANEL"] == "Y")
{
$res["URL"]["REVIEWS"] = $APPLICATION->GetCurPageParam();
$res["URL"]["MODERATE"] = ForumAddPageParams($res["URL"]["REVIEWS"],
array("MID" => $res["ID"], "REVIEW_ACTION" => $res["APPROVED"]=="Y" ? "HIDE" : "SHOW"))."&".bitrix_sessid_get();
$res["URL"]["DELETE"] = ForumAddPageParams($res["URL"]["REVIEWS"],
array("MID" => $res["ID"], "REVIEW_ACTION" => "DEL"))."&".bitrix_sessid_get();
}
/************** Message info/***************************************/
/************** Author info ****************************************/
$res["AUTHOR_ID"] = intVal($res["AUTHOR_ID"]);
$res["AUTHOR_URL"] = "";
if (!empty($arParams["URL_TEMPLATES_PROFILE_VIEW"]))
{
$res["AUTHOR_URL"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array(
"UID" => $res["AUTHOR_ID"],
"USER_ID" => $res["AUTHOR_ID"],
"ID" => $res["AUTHOR_ID"]
));
}
// avatar
if ($arParams['SHOW_AVATAR'] == 'Y')
示例2: str_replace
}
$path = str_replace("//", "/", $componentRelativePath . "/user" . $res["RECIPIENT_ID"]);
if ($arComponentDescription["CACHE_PATH"] == "Y") {
$path = "/" . SITE_ID . $path;
}
if (!empty($path)) {
BXClearCache(true, $path);
}
}
}
}
if (empty($arError)) {
if ($action == "save") {
LocalRedirect(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_PM_READ"], array("FID" => $arParams["FID"], "MID" => $arParams["MID"])));
} elseif ($action == "send") {
LocalRedirect(ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_PM_LIST"], array("FID" => "2")), array("result" => "sent")));
}
} else {
$e = new CAdminException(array_reverse($arError));
$GLOBALS["APPLICATION"]->ThrowException($e);
$err = $GLOBALS['APPLICATION']->GetException();
$arResult["ERROR_MESSAGE"] = $err->GetString();
$bVarsFromForm = true;
}
}
/********************************************************************
Action
********************************************************************/
/********************************************************************
Data
********************************************************************/
示例3: array
case "HIDE_TOPIC":
case "SHOW_TOPIC":
$arFields = array("TID" => $arParams["TID"]);
$url = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "TITLE_SEO" => $arResult["TOPIC"]["TITLE_SEO"], "MID" => $arParams["MID"] > 0 ? $arParams["MID"] : "s"));
break;
case "DEL_TOPIC":
$arFields = array("TID" => $arParams["TID"]);
$url = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_LIST"], array("FID" => $arParams["FID"]));
break;
case "FORUM_UNSUBSCRIBE":
case "TOPIC_UNSUBSCRIBE":
case "FORUM_SUBSCRIBE":
case "TOPIC_SUBSCRIBE":
case "FORUM_SUBSCRIBE_TOPICS":
$arFields = array("FID" => $arParams["FID"], "TID" => $action == "FORUM_SUBSCRIBE" ? 0 : $arParams["TID"], "TITLE_SEO" => $arResult["TOPIC"]["TITLE_SEO"], "NEW_TOPIC_ONLY" => $action == "FORUM_SUBSCRIBE_TOPICS" ? "Y" : "N");
$url = ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_SUBSCR_LIST"], array()), array("FID" => $arParams["FID"], "TID" => $arParams["TID"]));
break;
case "MOVE":
$tmp_message = ForumDataToArray($message);
$url = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_MESSAGE_MOVE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "MID" => implode(",", $tmp_message)));
break;
case "MOVE_TOPIC":
$url = CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_TOPIC_MOVE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"]));
break;
}
if ($action != "MOVE" && $action != "MOVE_TOPIC") {
$result = ForumActions($action, $arFields, $strErrorMessage, $strOKMessage);
if (($action == "REPLY" || $action == "EDIT_TOPIC") && $arParams["AUTOSAVE"]) {
$arParams["AUTOSAVE"]->Reset();
}
if ($action == "DEL") {
示例4: GetMessage
if ($arParams["TYPE"] == "ICQ") {
$body = "From " . $userSend["FULL_NAME"] . " (UIN " . $userSend["E-MAIL"] . ")\n";
$body .= ($USER->IsAuthorized() ? GetMessage("F_MESS_AUTH") : GetMessage("F_MESS_NOAUTH")) . "\n";
$body .= "<br>-----<br>\n";
$body .= $_POST["SUBJECT"] . "\n";
$body .= "<br>-----<br>\n";
$body .= $_POST["MESSAGE"] . "\n";
$headers = "Content-Type: text/plain; charset=windows-1254\n";
$headers .= "From: " . $userSend["FULL_NAME"] . "\nX-Mailer: System33r";
// @mail($x_PERSONAL_ICQ."@pager.mirabilis.com", $_POST["SUBJECT"], $body, $headers);
} else {
$event = new CEvent();
$arFields = array("FROM_NAME" => $userSend["FULL_NAME"], "FROM_EMAIL" => $userSend["E-MAIL"], "TO_NAME" => $userRec["FULL_NAME"], "TO_EMAIL" => $userRec["EMAIL"], "SUBJECT" => $_POST["SUBJECT"], "MESSAGE" => $_POST["MESSAGE"], "MESSAGE_DATE" => date("d.m.Y H:i:s"), "AUTH" => $USER->IsAuthorized() ? GetMessage("F_MESS_AUTH") : GetMessage("F_MESS_NOAUTH"));
$event->Send("NEW_FORUM_PRIV", SITE_ID, $arFields);
}
LocalRedirect(ForumAddPageParams($arResult["URL"]["MESSAGE_SEND"], array("result" => "message_send")));
} else {
$bVarsFromForm = true;
}
}
/********************************************************************
/Action
********************************************************************/
/********************************************************************
Data
********************************************************************/
$arResult["IsAuthorized"] = $USER->IsAuthorized() ? "Y" : "N";
$arResult["ShowName"] = $userRec["FULL_NAME"];
if ($USER->IsAuthorized()) {
$arResult["ShowMyName"] = $userSend["FULL_NAME"];
$arResult["AuthorContacts"] = $arParams["TYPE"] == "ICQ" ? $userSend["PERSONAL_ICQ"] : $USER->GetEmail();
示例5: MakeTimeStamp
$res["POST_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["POST_DATE"], CSite::GetDateFormat()));
$res["EDIT_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["EDIT_DATE"], CSite::GetDateFormat()));
// text
$res["ALLOW"] = array_merge($arAllow + array("SMILES" => ($res["USE_SMILES"] == "Y" ? $arResult["FORUM"]["ALLOW_SMILES"] : "N")));
$res["~POST_MESSAGE_TEXT"] = (COption::GetOptionString("forum", "FILTER", "Y")=="Y" ? $res["~POST_MESSAGE_FILTER"] : $res["~POST_MESSAGE"]);
// attach
$res["ATTACH_IMG"] = ""; $res["FILES"] = array();
$res["~ATTACH_FILE"] = array(); $res["ATTACH_FILE"] = array();
// links
if ($arResult["SHOW_PANEL"] == "Y")
{
$res["URL"]["REVIEWS"] = $APPLICATION->GetCurPageParam();
$res["URL"]["~MODERATE"] = ForumAddPageParams($res["URL"]["REVIEWS"],
array("MID" => $res["ID"], "REVIEW_ACTION" => $res["APPROVED"]=="Y" ? "HIDE" : "SHOW"), true, false);
$res["URL"]["MODERATE"] = htmlspecialcharsbx($res["URL"]["~MODERATE"])."&".bitrix_sessid_get();
$res["URL"]["~DELETE"] = ForumAddPageParams($res["URL"]["REVIEWS"],
array("MID" => $res["ID"], "REVIEW_ACTION" => "DEL"), true, false);
$res["URL"]["DELETE"] = htmlspecialcharsbx($res["URL"]["~DELETE"])."&".bitrix_sessid_get();
}
/************** Message info/***************************************/
/************** Author info ****************************************/
$res["AUTHOR_ID"] = intval($res["AUTHOR_ID"]);
$res["AUTHOR_URL"] = "";
if ($res["AUTHOR_ID"] > 0)
{
if (!empty($arParams["URL_TEMPLATES_PROFILE_VIEW"]))
{
$res["AUTHOR_URL"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array(
"UID" => $res["AUTHOR_ID"],
"USER_ID" => $res["AUTHOR_ID"],
"ID" => $res["AUTHOR_ID"]
));
示例6: onAfterCommentAdd
public static function onAfterCommentAdd($entityType, $entityId, $arData)
{
global $USER;
// 'TK' is our entity type
if ($entityType !== 'TK' || intval($entityId) <= 0 || !CModule::IncludeModule('tasks') || !CModule::IncludeModule('socialnetwork')) {
return;
}
$taskId = (int) $entityId;
$messageId = $arData['MESSAGE_ID'];
$parser = new CTextParser();
$messageAuthorId = null;
if (array_key_exists('AUTHOR_ID', $arData['PARAMS']) && array_key_exists('EDIT_DATE', $arData['PARAMS']) && array_key_exists('POST_DATE', $arData['PARAMS'])) {
$messageAuthorId = $arData['PARAMS']['AUTHOR_ID'];
} else {
$arMessage = CForumMessage::GetByID($messageId);
$messageAuthorId = $arMessage['AUTHOR_ID'];
}
$occurAsUserId = CTasksTools::getOccurAsUserId();
if (!$occurAsUserId) {
$occurAsUserId = $messageAuthorId ? $messageAuthorId : 1;
}
$rsTask = CTasks::GetList(false, array('ID' => $taskId), array('UF_CRM_TASK'));
$arTask = $rsTask->GetNext();
if (!isset($arTask) || !isset($arTask['UF_CRM_TASK']) || is_array($arTask['UF_CRM_TASK']) && (!isset($arTask['UF_CRM_TASK'][0]) || strlen($arTask['UF_CRM_TASK'][0]) <= 0) || !is_array($arTask['UF_CRM_TASK']) && strlen($arTask['UF_CRM_TASK']) <= 0) {
return;
}
$dbCrmActivity = CCrmActivity::GetList(array(), array('TYPE_ID' => CCrmActivityType::Task, 'ASSOCIATED_ENTITY_ID' => $taskId, 'CHECK_PERMISSIONS' => 'N'), false, false, array('ID'));
$arCrmActivity = $dbCrmActivity->Fetch();
if (!$arCrmActivity) {
return;
}
$crmActivityId = $arCrmActivity['ID'];
// sonet log
$dbLog = CSocNetLog::GetList(array(), array("EVENT_ID" => "crm_activity_add", "ENTITY_ID" => $crmActivityId), false, false, array("ID", "ENTITY_TYPE", "ENTITY_ID"));
if ($arLog = $dbLog->Fetch()) {
$log_id = $arLog["ID"];
$entity_type = $arLog["ENTITY_TYPE"];
$entity_id = $arLog["ENTITY_ID"];
$strURL = $GLOBALS['APPLICATION']->GetCurPageParam("", array("IFRAME", "MID", "SEF_APPLICATION_CUR_PAGE_URL", BX_AJAX_PARAM_ID, "result"));
$strURL = ForumAddPageParams($strURL, array("MID" => $messageId, "result" => "reply"), false, false);
$sText = COption::GetOptionString("forum", "FILTER", "Y") == "Y" ? $arMessage["POST_MESSAGE_FILTER"] : $arMessage["POST_MESSAGE"];
$arFieldsForSocnet = array("ENTITY_TYPE" => $entity_type, "ENTITY_ID" => $entity_id, "EVENT_ID" => "crm_activity_add_comment", "MESSAGE" => $sText, "TEXT_MESSAGE" => $parser->convert4mail($sText), "URL" => str_replace("?IFRAME=Y", "", str_replace("&IFRAME=Y", "", str_replace("IFRAME=Y&", "", $strURL))), "MODULE_ID" => "crm", "SOURCE_ID" => $messageId, "LOG_ID" => $log_id, "RATING_TYPE_ID" => "FORUM_POST", "RATING_ENTITY_ID" => $messageId);
$arFieldsForSocnet["USER_ID"] = $occurAsUserId;
$arFieldsForSocnet["=LOG_DATE"] = $GLOBALS['DB']->CurrentTimeFunction();
$ufFileID = array();
$dbAddedMessageFiles = CForumFiles::GetList(array("ID" => "ASC"), array("MESSAGE_ID" => $messageId));
while ($arAddedMessageFiles = $dbAddedMessageFiles->Fetch()) {
$ufFileID[] = $arAddedMessageFiles["FILE_ID"];
}
if (count($ufFileID) > 0) {
$arFieldsForSocnet["UF_SONET_COM_FILE"] = $ufFileID;
}
$ufDocID = $GLOBALS["USER_FIELD_MANAGER"]->GetUserFieldValue("FORUM_MESSAGE", "UF_FORUM_MESSAGE_DOC", $messageId, LANGUAGE_ID);
if ($ufDocID) {
$arFieldsForSocnet["UF_SONET_COM_DOC"] = $ufDocID;
}
$comment_id = CSocNetLogComments::Add($arFieldsForSocnet, false, false);
CSocNetLog::CounterIncrement($comment_id, false, false, "LC");
}
}
示例7: MakeTimeStamp
// number in topic
$res["NUMBER"] = $number++;
// data
$res["POST_TIMESTAMP"] = MakeTimeStamp($res["POST_DATE"], CSite::GetDateFormat());
$res["POST_TIME"] = FormatDate($FormatDate, $res["POST_TIMESTAMP"]);
$res["POST_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], $res["POST_TIMESTAMP"]);
$res["EDIT_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["EDIT_DATE"], CSite::GetDateFormat()));
// text
$res["ALLOW"] = array_merge($arAllow, array("SMILES" => $res["USE_SMILES"] == "Y" ? $arParams["ALLOW_SMILES"] : "N"));
$res["~POST_MESSAGE_TEXT"] = COption::GetOptionString("forum", "FILTER", "Y") == "Y" ? $res["~POST_MESSAGE_FILTER"] : $res["~POST_MESSAGE"];
// links
$res["PANELS"] = $arResult["PANELS"];
$res["URL"] = array("LINK" => $APPLICATION->GetCurPageParam("MID=" . $res["ID"], array("MID", "sessid", "AJAX_POST", "ENTITY_XML_ID", "ENTITY_TYPE", "ENTITY_ID", "REVIEW_ACTION", "MODE", "FILTER", "result")));
$res["URL"]["MODERATE"] = ForumAddPageParams($res["URL"]["LINK"], array("REVIEW_ACTION" => $res["APPROVED"] == "Y" ? "HIDE" : "SHOW"));
$res["URL"]["EDIT"] = ForumAddPageParams($res["URL"]["LINK"], array("REVIEW_ACTION" => "GET"));
$res["URL"]["DELETE"] = ForumAddPageParams($res["URL"]["LINK"], array("REVIEW_ACTION" => "DEL"));
if ($res["PANELS"]["EDIT"] == "Y" || $arParams["ALLOW_EDIT_OWN_MESSAGE"] === "LAST" && $res["ID"] == $arResult["TOPIC"]["ABS_LAST_MESSAGE_ID"] && $res["AUTHOR_ID"] > 0 && $res["AUTHOR_ID"] == $GLOBALS["USER"]->GetId() || $arParams["ALLOW_EDIT_OWN_MESSAGE"] === "ALL" && $res["AUTHOR_ID"] > 0 && $res["AUTHOR_ID"] == $GLOBALS["USER"]->GetId()) {
$res["PANELS"]["EDIT"] = "Y";
$res["PANELS"]["DELETE"] = "Y";
}
/************** Message info/***************************************/
/************** Author info ****************************************/
if (!empty($arParams["NAME_TEMPLATE"]) && $res["SHOW_NAME"] != "Y") {
$name = CUser::FormatName($arParams["NAME_TEMPLATE"], array("NAME" => $res["NAME"], "LAST_NAME" => $res["LAST_NAME"], "SECOND_NAME" => $res["SECOND_NAME"], "LOGIN" => $res["LOGIN"]), true, false);
if (!!$name) {
$res["~AUTHOR_NAME"] = $name;
$res["AUTHOR_NAME"] = htmlspecialcharsbx($name);
}
}
$res["AUTHOR_ID"] = intVal($res["AUTHOR_ID"]);
$res["AUTHOR_URL"] = "";
示例8: GetMessage
$arResult["NAV_STRING"] = $db_res->GetPageNavStringEx($navComponentObject, GetMessage("F_SUBSCRIBE"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
if ($db_res && ($res = $db_res->GetNext())) {
$arResult["SHOW_SUBSCRIBE_LIST"] = "Y";
do {
$arResult["~FORUMS"][] = $res["FORUM_ID"];
$arResult["~TOPICS"][] = $res["TOPIC_ID"];
$res["START_DATE"] = trim($res["START_DATE"]);
if (strLen($res["START_DATE"]) > 0) {
$res["START_DATE"] = CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], MakeTimeStamp($res["START_DATE"], CSite::GetDateFormat()));
}
$res["SUBSCRIBE_TYPE"] = intVal($res["TOPIC_ID"]) > 0 ? "TOPIC" : ($res["NEW_TOPIC_ONLY"] == "Y" ? "NEW_TOPIC_ONLY" : "ALL_MESSAGES");
$res["LAST_SEND"] = intVal($res["LAST_SEND"]);
$res["read"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_READ"], array("FID" => $res["FORUM_ID"], "TID" => $res["TOPIC_ID"], "TITLE_SEO" => $res["TITLE_SEO"], "MID" => "s"));
$res["list"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_LIST"], array("FID" => $res["FORUM_ID"]));
$res["read_last_send"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $res["FORUM_ID"], "TID" => $res["TOPIC_ID"], "TITLE_SEO" => $res["TITLE_SEO"], "MID" => intVal($res["LAST_SEND"]))) . "#message" . intVal($res["LAST_SEND"]);
$res["subscr_delete"] = ForumAddPageParams($arResult["CURRENT_PAGE"], array("SID" => $res["ID"], "ACTION" => "DEL")) . "&" . bitrix_sessid_get();
$res["URL"] = array("TOPIC" => $res["read"], "FORUM" => $res["list"], "LAST_MESSAGE" => $res["read_last_send"], "DELETE" => $res["subscr_delete"]);
$arResult["SUBSCRIBE_LIST"][] = $res;
} while ($res = $db_res->GetNext());
}
if (!empty($arResult["~FORUMS"])) {
$arResult["~FORUMS"] = array_unique($arResult["~FORUMS"]);
$db_res = CForumNew::GetListEx(array("SORT" => "ASC"), array("@ID" => $arResult["~FORUMS"]));
if ($db_res && ($res = $db_res->GetNext())) {
do {
$arResult["FORUMS"][$res["ID"]] = $res;
} while ($res = $db_res->GetNext());
}
}
if (!empty($arResult["~TOPICS"])) {
$arResult["~TOPICS"] = array_unique(array_diff($arResult["~TOPICS"], array(0, "")));
示例9: preg_match
$res["PANELS"]["EDIT"] = "Y";
} else {
// get last message in topic
// $arResult["TOPIC"]["iLAST_TOPIC_MESSAGE"] == intVal($res["ID"])
}
}
if ($arResult["USER"]["PERMISSION"] >= "Q") {
$bIP = preg_match("/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\$/", $res["~AUTHOR_IP"]) ? true : false;
$res["AUTHOR_IP"] = $bIP ? GetWhoisLink($res["~AUTHOR_IP"], "") : $res["AUTHOR_IP"];
$bIP = preg_match("/^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\$/", $res["~AUTHOR_REAL_IP"]) ? true : false;
$res["AUTHOR_REAL_IP"] = $bIP ? GetWhoisLink($res["~AUTHOR_REAL_IP"], "") : $res["AUTHOR_REAL_IP"];
$res["IP_IS_DIFFER"] = $res["AUTHOR_IP"] != $res["AUTHOR_REAL_IP"] ? "Y" : "N";
}
/************** Panels/*********************************************/
/************** Urls ***********************************************/
$res["URL"] = array("MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $res["TOPIC_ID"], "TITLE_SEO" => $res["TOPIC_ID"], "MID" => $res["ID"])), "EDITOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["EDITOR_ID"])), "AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["AUTHOR_ID"])), "AUTHOR_EMAIL" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "email")), "AUTHOR_ICQ" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "icq")), "AUTHOR_PM" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_EDIT"], array("FID" => 0, "MID" => 0, "UID" => $res["AUTHOR_ID"], "mode" => "new")), "~MODERATE" => ForumAddPageParams($arResult["URL"]["~MODERATE_MESSAGE"], array("MID" => $res["ID"], "ACTION" => "SHOW"), false, false), "MODERATE" => ForumAddPageParams($arResult["URL"]["~MODERATE_MESSAGE"], array("MID" => $res["ID"], "ACTION" => "SHOW")) . "&" . bitrix_sessid_get(), "~DELETE" => ForumAddPageParams($arResult["URL"]["~MODERATE_MESSAGE"], array("MID" => $res["ID"], "ACTION" => "DEL"), false, false), "DELETE" => ForumAddPageParams($arResult["URL"]["~MODERATE_MESSAGE"], array("MID" => $res["ID"], "ACTION" => "DEL")) . "&" . bitrix_sessid_get(), "~EDIT" => ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_TOPIC_NEW"], array("FID" => $arParams["FID"])), array("TID" => $res["TOPIC_ID"], "MID" => $res["ID"], "MESSAGE_TYPE" => "EDIT"), false, false), "EDIT" => ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_TOPIC_NEW"], array("FID" => $arParams["FID"])), array("TID" => $res["TOPIC_ID"], "MID" => $res["ID"], "MESSAGE_TYPE" => "EDIT")) . "&" . bitrix_sessid_get());
$res["profile_view"] = $res["URL"]["AUTHOR"];
$arResult["MESSAGE_LIST"][$res["ID"]] = $res;
} while ($res = $db_Message->GetNext());
}
/************** Attach files ***************************************/
if (!empty($arResult["MESSAGE_LIST"])) {
$arFilter = array("@FILE_MESSAGE_ID" => array_keys($arResult["MESSAGE_LIST"]));
$db_files = CForumFiles::GetList(array("MESSAGE_ID" => "ASC"), $arFilter);
if ($db_files && ($res = $db_files->Fetch())) {
do {
$res["SRC"] = CFile::GetFileSRC($res);
if ($arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["~ATTACH_IMG"] == $res["FILE_ID"]) {
// attach for custom
$arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["~ATTACH_FILE"] = $res;
$arResult["MESSAGE_LIST"][$res["MESSAGE_ID"]]["ATTACH_IMG"] = CFile::ShowFile($res["FILE_ID"], 0, $arParams["IMAGE_SIZE"], $arParams["IMAGE_SIZE"], true, "border=0", false);
示例10: GetMessage
}
if ($FORUM_TOPIC_ID > 0) {
$TID = $FORUM_TOPIC_ID;
}
}
$strOKMessage = GetMessage("COMM_COMMENT_OK");
$arResult["FORUM_TOPIC_ID"] = intVal($FORUM_TOPIC_ID);
ForumClearComponentCache($componentName);
// SUBSCRIBE
if ($_REQUEST["TOPIC_SUBSCRIBE"] == "Y") {
ForumSubscribeNewMessagesEx($arParams["FORUM_ID"], $FORUM_TOPIC_ID, "N", $strErrorMessage, $strOKMessage);
BXClearCache(true, "/bitrix/forum/user/" . $GLOBALS["USER"]->GetID() . "/subscribe/");
}
$strURL = !empty($_REQUEST["back_page"]) ? $_REQUEST["back_page"] : $APPLICATION->GetCurPageParam("", array("MID", "SEF_APPLICATION_CUR_PAGE_URL", BX_AJAX_PARAM_ID, "result"));
$bNotModerated = $arResult["FORUM"]["MODERATION"] != "Y" || CForumNew::CanUserModerateForum($arParams["FORUM_ID"], $USER->GetUserGroupArray());
$strURL = ForumAddPageParams($strURL, array("MID" => $MID, "result" => $bNotModerated ? "reply" : "not_approved"));
$strURL .= $bNotModerated ? "#message" . $MID : "#reviewnote";
if ($arParams["NO_REDIRECT_AFTER_SUBMIT"] != "Y") {
LocalRedirect($strURL);
} else {
$arResult['RESULT'] = $MID;
$strOKMessage = $bNotModerated ? GetMessage("COMM_COMMENT_OK") : GetMessage("COMM_COMMENT_OK_AND_NOT_APPROVED");
}
}
} elseif ($_REQUEST["save_product_review"] == "Y") {
$arParams['SHOW_MINIMIZED'] = 'N';
$arAllow["SMILES"] = $_POST["REVIEW_USE_SMILES"] != "Y" ? "N" : $arResult["FORUM"]["ALLOW_SMILES"];
$arResult["MESSAGE_VIEW"] = array("POST_MESSAGE_TEXT" => $_POST["REVIEW_TEXT"], "AUTHOR_NAME" => htmlspecialcharsEx($arResult["USER"]["SHOWED_NAME"]), "AUTHOR_ID" => intVal($USER->GetID()), "AUTHOR_URL" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $USER->GetID())), "POST_DATE" => CForumFormat::DateFormat($arParams["DATE_TIME_FORMAT"], time() + CTimeZone::GetOffset()), "FILES" => array());
$arFields = array("FORUM_ID" => intVal($arParams["FORUM_ID"]), "TOPIC_ID" => 0, "MESSAGE_ID" => 0, "USER_ID" => intVal($GLOBALS["USER"]->GetID()));
$arFiles = array();
$arFilesExists = array();
示例11: GetWhoisLink
$res["AUTHOR_REAL_IP"] = $bIP ? GetWhoisLink($res["~AUTHOR_REAL_IP"], "") : $res["AUTHOR_REAL_IP"];
$res["IP_IS_DIFFER"] = $res["AUTHOR_IP"] != $res["AUTHOR_REAL_IP"] ? "Y" : "N";
}
/************** Panels/*********************************************/
/************** Urls ***********************************************/
$res["URL"] = array("~MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "TITLE_SEO" => $arResult["TOPIC"]["TITLE_SEO"], "MID" => $res["ID"])), "MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $arParams["FID"], "TID" => $arParams["TID"], "TITLE_SEO" => $arResult["TOPIC"]["TITLE_SEO"], "MID" => $res["ID"])), "EDITOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["EDITOR_ID"])), "AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["AUTHOR_ID"])), "~AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["AUTHOR_ID"])), "AUTHOR_EMAIL" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "email")), "AUTHOR_ICQ" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "icq")), "AUTHOR_PM" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_EDIT"], array("FID" => 0, "MID" => 0, "UID" => $res["AUTHOR_ID"], "mode" => "new")), "AUTHOR_POSTS" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_USER_POST"], array("UID" => $res["AUTHOR_ID"], "mode" => "all")));
$res["URL"]["~AUTHOR_VOTE"] = ForumAddPageParams($res["URL"]["MESSAGE"], array("UID" => $res["AUTHOR_ID"], "MID" => $res["ID"], "VOTES" => intVal($arResult["USER"]["RANK"]["VOTES"]), "VOTES_TYPE" => $res["VOTING"] == "VOTE" ? "V" : "U", "ACTION" => "VOTE4USER"));
$res["URL"]["AUTHOR_VOTE"] = $res["URL"]["~AUTHOR_VOTE"] . "&" . bitrix_sessid_get();
if ($res["SHOW_PANEL"] == "Y") {
$res["URL"]["~MODERATE"] = ForumAddPageParams($res["URL"]["~MESSAGE"], array("MID" => $res["ID"], "ACTION" => $res["APPROVED"] == "Y" ? "HIDE" : "SHOW"), false, false);
$res["URL"]["MODERATE"] = htmlspecialcharsbx($res["URL"]["~MODERATE"]) . "&" . bitrix_sessid_get();
$res["URL"]["~DELETE"] = ForumAddPageParams($res["URL"]["~MESSAGE"], array("MID" => $res["ID"], "ACTION" => "DEL"), false, false);
$res["URL"]["DELETE"] = htmlspecialcharsbx($res["URL"]["~DELETE"]) . "&" . bitrix_sessid_get();
$res["URL"]["~SUPPORT"] = ForumAddPageParams($res["URL"]["~MESSAGE"], array("MID" => $res["ID"], "ACTION" => "FORUM_MESSAGE2SUPPORT"), false, false);
$res["URL"]["SUPPORT"] = htmlspecialcharsbx($res["URL"]["~SUPPORT"]) . "&" . bitrix_sessid_get();
$res["URL"]["~EDIT"] = ForumAddPageParams(CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_TOPIC_NEW"], array("FID" => $arParams["FID"])), array("TID" => $arParams["TID"], "MID" => $res["ID"], "MESSAGE_TYPE" => "EDIT"), false, false);
$res["URL"]["EDIT"] = htmlspecialcharsbx($res["URL"]["~EDIT"]);
}
/************** For custom templates *******************************/
if ($arParams["VERSION"] < 1) {
$res["MESSAGE_ANCHOR"] = $res["URL"]["MESSAGE"];
$res["message_link"] = $res["URL"]["MESSAGE"];
$res["profile_view"] = $res["URL"]["AUTHOR"];
$res["email"] = $res["URL"]["AUTHOR_EMAIL"];
$res["icq"] = $res["URL"]["AUTHOR_ICQ"];
$res["pm_edit"] = $res["URL"]["AUTHOR_PM"];
if ($res["SHOW_PANEL"] == "Y") {
$res["SHOW_HIDE"] = array("ACTION" => $res["PANELS"]["MODERATE"] == "Y" ? $res["APPROVED"] == "Y" ? "HIDE" : "SHOW" : "N", "link" => $res["URL"]["MODERATE"]);
$res["MESSAGE_DELETE"] = array("ACTION" => $res["PANELS"]["DELETE"] == "Y" ? "DELETE" : "N", "link" => $res["URL"]["DELETE"]);
$res["MESSAGE_SUPPORT"] = array("ACTION" => $res["PANELS"]["SUPPORT"] == "Y" ? "SUPPORT" : "N", "link" => $res["URL"]["SUPPORT"]);
$res["MESSAGE_EDIT"] = array("ACTION" => $res["PANELS"]["EDIT"] == "Y" ? "EDIT" : "N", "link" => $res["URL"]["EDIT"]);
示例12: GetPagePath
<?php
if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) {
die;
}
/**
* @var array $arParams
* @var array $arResult
* @var CMain $APPLICATION
* @var CUser $USER
* @var CBitrixComponentTemplate $this
*/
$link = GetPagePath(false, false) . "?" . http_build_query(array_diff_key($_REQUEST, array_flip(array("MID", "sessid", "AJAX_POST", "ENTITY_XML_ID", "ENTITY_TYPE", "ENTITY_ID", "REVIEW_ACTION", "MODE", "FILTER", "result", "clear_cache"))));
$arResult["OUTPUT_LIST"] = $APPLICATION->IncludeComponent("bitrix:main.post.list", "", array("TEMPLATE_ID" => $arParams["tplID"], "RATING_TYPE_ID" => $arParams["SHOW_RATING"] == "Y" ? "FORUM_POST" : "", "ENTITY_XML_ID" => $arParams["ENTITY_XML_ID"], "RECORDS" => $arResult["MESSAGES"], "NAV_STRING" => $arResult["NAV_STRING"], "NAV_RESULT" => $arResult["NAV_RESULT"], "PREORDER" => $arParams["PREORDER"], "RIGHTS" => array("MODERATE" => $arResult["PANELS"]["MODERATE"], "EDIT" => $arResult["PANELS"]["EDIT"] == "N" ? $arParams["ALLOW_EDIT_OWN_MESSAGE"] === "ALL" ? "OWN" : ($arParams["ALLOW_EDIT_OWN_MESSAGE"] === "LAST" ? "OWNLAST" : "N") : "Y", "DELETE" => $arResult["PANELS"]["EDIT"] == "N" ? $arParams["ALLOW_EDIT_OWN_MESSAGE"] === "ALL" ? "OWN" : ($arParams["ALLOW_EDIT_OWN_MESSAGE"] === "LAST" ? "OWNLAST" : "N") : "Y"), "VISIBLE_RECORDS_COUNT" => 3, "ERROR_MESSAGE" => $arResult["ERROR_MESSAGE"], "OK_MESSAGE" => $arResult["OK_MESSAGE"], "RESULT" => $arResult["RESULT"], "PUSH&PULL" => $arResult["PUSH&PULL"], "VIEW_URL" => $arParams["SHOW_LINK_TO_MESSAGE"] == "Y" ? $link : "", "EDIT_URL" => ForumAddPageParams($link, array("REVIEW_ACTION" => "GET"), false, false), "MODERATE_URL" => ForumAddPageParams($link, array("REVIEW_ACTION" => "#ACTION#"), false, false), "DELETE_URL" => ForumAddPageParams($link, array("REVIEW_ACTION" => "DEL"), false, false), "AUTHOR_URL" => $arParams["PATH_TO_USER"], "AVATAR_SIZE" => $arParams["AVATAR_SIZE_COMMENT"], "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"], "SHOW_LOGIN" => $arParams['SHOW_LOGIN'], "DATE_TIME_FORMAT" => $arParams["DATE_TIME_FORMAT"], "LAZYLOAD" => $arParams["LAZYLOAD"], "NOTIFY_TAG" => $arParams["bFromList"] ? "BLOG|COMMENT" : "", "NOTIFY_TEXT" => $arParams["bFromList"] ? TruncateText(str_replace(array("\r\n", "\n"), " ", $arParams["POST_DATA"]["~TITLE"]), 100) : "", "SHOW_MINIMIZED" => $arParams["SHOW_MINIMIZED"], "SHOW_POST_FORM" => $arResult["SHOW_POST_FORM"], "IMAGE_SIZE" => $arParams["IMAGE_SIZE"], "mfi" => $arParams["mfi"], "FORM" => array("ID" => $arParams["FORM_ID"], "URL" => $APPLICATION->GetCurPageParam("", array("sessid", "comment_post_id", "act", "post", "comment", "decode", "ENTITY_TYPE_ID", "ENTITY_ID", "empty_get_form", "empty_get_comments")), "FIELDS" => array())), $this->__component);
if ($arResult["SHOW_POST_FORM"] == "Y") {
ob_start();
include __DIR__ . "/form.php";
$arResult["OUTPUT_LIST"]["HTML"] = ob_get_clean() . $arResult["OUTPUT_LIST"]["HTML"];
}
if ($_REQUEST["empty_get_comments"] == "Y") {
$APPLICATION->RestartBuffer();
while (ob_get_clean()) {
}
echo CUtil::PhpToJSObject(array("TEXT" => $arResult["OUTPUT_LIST"]["HTML"], "POST_NUM_COMMENTS" => intval($arResult["Post"]["NUM_COMMENTS"])));
die;
}
?>
<div class="post-comments-wrap" id="post-comments-wrap">
<?php
echo $arResult["OUTPUT_LIST"]["HTML"];
?>
示例13: preg_replace
if (!empty($arResult["~search_template"])) {
$arResult["~search_template"] = preg_replace("/[%]+/", "%", "%" . str_replace("*", "%", $arResult["~search_template"]) . "%");
}
$arResult["search_template"] = htmlspecialcharsEx($_REQUEST["search_template"]);
// *****************************************************************************************
$arResult["SHOW_SEARCH_RESULT"] = "N";
$arResult["SEARCH_RESULT"] = array();
if (!empty($arResult["~search_template"]) && $arResult["~search_template"] != "%") {
$arResult["SHOW_SEARCH_RESULT"] = "Y";
$reqSearch = CForumUser::SearchUser($arResult["~search_template"], array("bDescPageNumbering" => false, "bShowAll" => false, "nPageSize" => $arParams["PM_USER_PAGE"], "sNameTemplate" => $arParams["NAME_TEMPLATE"]));
$reqSearch->NavStart($arParams["PM_USER_PAGE"], false);
$arResult["NAV_RESULT"] = $reqSearch;
$arResult["NAV_STRING"] = $reqSearch->GetPageNavStringEx($navComponentObject, GetMessage("PM_SEARCH_RESULT"), $arParams["PAGE_NAVIGATION_TEMPLATE"]);
if ($reqSearch && ($res = $reqSearch->GetNext())) {
do {
$arResult["SEARCH_RESULT"][] = array_merge(array("link" => ForumAddPageParams($arResult["CURRENT_PAGE"], array("search_insert" => "Y", "UID" => intVal($res["ID"]), "sessid" => bitrix_sessid()))), $res);
} while ($res = $reqSearch->GetNext());
}
}
$arResult["SHOW_SELF_CLOSE"] = "N";
if ($_REQUEST["search_insert"] == "Y" && intval($UID) > 0 || !empty($_REQUEST["search_by_login"])) {
if (empty($_REQUEST["search_by_login"])) {
$db_res = CForumUser::GetList(array(), array("USER_ID" => $UID, "SHOW_ABC" => ""), array("sNameTemplate" => $arParams["NAME_TEMPLATE"]));
if ($db_res && ($res = $db_res->GetNext())) {
$arResult["SHOW_SELF_CLOSE"] = "Y";
$arResult["UID"] = $UID;
$arResult["SHOW_NAME"] = $res["SHOW_ABC"];
$arResult["profile_view"] = CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $UID));
}
} else {
$arResult["SHOW_SELF_CLOSE"] = "Y";
示例14: array
do {
$arSocLog = array("=LOG_DATE" => $DB->CharToDateFunction($arComment['POST_DATE'], "FULL", SITE_ID), "MESSAGE" => $arComment['POST_MESSAGE'], "TEXT_MESSAGE" => $parser->convert4mail($arComment['POST_MESSAGE']), "SOURCE_ID" => intval($arComment["ID"]), "RATING_ENTITY_ID" => intval($arComment["ID"])) + (!!$arComment['AUTHOR_ID'] ? array("USER_ID" => $arComment["ID"]) : array());
CSocNetLogComments::Add(array_merge($arFieldsForSocnet, $arSocLog));
} while ($arComment = $dbComments->Fetch());
}
}
}
}
}
$res = $arParams["MID"];
}
if (!$res) {
$bVarsFromForm = true;
} else {
$arNote = array("code" => $action, "title" => $strOKMessage, "link" => $url);
}
$arResult['RESULT'] = $res;
if (isset($_REQUEST['AJAX_CALL']) && in_array($action, array('SHOW', 'HIDE', 'DEL'))) {
$GLOBALS['APPLICATION']->RestartBuffer();
$arRes = array('status' => !($actionResult === false), 'message' => !($actionResult === false) ? $strOKMessage : $strErrorMessage);
echo CUtil::PhpToJSObject($arRes);
die;
}
if (empty($arError) && !($arParams['AJAX_POST'] == 'Y' && $action == 'REPLY')) {
$url = str_replace("#result#", $res, $url);
LocalRedirect(ForumAddPageParams($url, array("result" => strtolower($action)), true, false) . (!empty($arParams["MID"]) ? "#message" . $arParams["MID"] : ""));
}
}
if (!empty($arError)) {
$bVarsFromForm = true;
}
示例15: array_merge
$forums[$forum_id] = array_merge($arResult["FORUMS_ALL"][$forum_id], array("NUM_POSTS_ALL" => $arForum_posts[$forum_id], "PERMISSION" => $UserPerm, "USER_PERM" => $UserPerm, "AUTHOR_STATUS" => $UserPermStr, "USER_PERM_STR" => $UserPermStr, "AUTHOR_STATUS_CODE" => $UserPermCode, "TOPICS" => array()));
}
$arTopics[$topic_id]["TITLE"] = $arResult["PARSER"]->wrap_long_words($arTopics[$topic_id]["TITLE"]);
$arTopics[$topic_id]["DESCRIPTION"] = $arResult["PARSER"]->wrap_long_words($arTopics[$topic_id]["DESCRIPTION"]);
$arTopics[$topic_id]["URL"] = array("TOPIC" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_READ"], array("FID" => $arTopics[$topic_id]["FORUM_ID"], "TID" => $arTopics[$topic_id]["TOPIC_ID"], "TITLE_SEO" => $arTopics[$topic_id]["TOPIC_ID"], "MID" => "s")), "~TOPIC" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_READ"], array("FID" => $arTopics[$topic_id]["FORUM_ID"], "TID" => $arTopics[$topic_id]["TOPIC_ID"], "TITLE_SEO" => $arTopics[$topic_id]["TOPIC_ID"], "MID" => "s")));
/************** For custom templates *******************************/
$arTopics[$topic_id]["read"] = $arTopics[$topic_id]["URL"]["TOPIC"];
/************** For custom templates *******************************/
$forums[$forum_id]["TOPICS"][$topic_id] = $topics[$topic_id] = array_merge($arTopics[$topic_id], $res);
}
/*******************************************************************/
/************** Urls ***********************************************/
foreach ($arResult["MESSAGE_LIST"] as $iID => $res) {
$topic = $arTopics[$topic_id];
$res["URL"] = array("MESSAGE" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE"], array("FID" => $res["FORUM_ID"], "TID" => $topic["ID"], "TITLE_SEO" => $topic["TITLE_SEO"], "MID" => $res["ID"])), "EDITOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["EDITOR_ID"])), "AUTHOR" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PROFILE_VIEW"], array("UID" => $res["AUTHOR_ID"])), "AUTHOR_EMAIL" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "email")), "AUTHOR_ICQ" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_MESSAGE_SEND"], array("UID" => $res["AUTHOR_ID"], "TYPE" => "icq")), "AUTHOR_PM" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_PM_EDIT"], array("FID" => 0, "MID" => 0, "UID" => $res["AUTHOR_ID"], "mode" => "new")));
$res["URL"]["~AUTHOR_VOTE"] = ForumAddPageParams($res["URL"]["MESSAGE"], array("UID" => $res["AUTHOR_ID"], "MID" => $res["ID"], "VOTES" => intVal($arResult["USER"]["RANK"]["VOTES"]), "VOTES_TYPE" => $res["VOTING"] == "VOTE" ? "V" : "U", "ACTION" => "VOTE4USER"));
$res["URL"]["AUTHOR_VOTE"] = $res["URL"]["~AUTHOR_VOTE"] . "&" . bitrix_sessid_get();
/************** For custom templates *******************************/
$topics[$res["TOPIC_ID"]]["MESSAGES"][$iID]["URL"] = $arResult["MESSAGE_LIST"][$iID]["URL"] = $res["URL"];
$topics[$res["TOPIC_ID"]]["MESSAGES"][$iID]["read"] = $arResult["MESSAGE_LIST"][$iID]["read"] = $res["URL"]["MESSAGE"];
}
}
if ($APPLICATION->GetException()) {
$err = $APPLICATION->GetException();
$arResult["ERROR_MESSAGE"] .= $err->GetString();
}
$arResult["SHOW_RESULT"] = !empty($forums) ? "Y" : "N";
$arResult["FORUMS"] = $forums;
$arResult["TOPICS"] = $topics;
$arResult["USER"]["profile_view"] = $arResult["USER"]["URL"]["PROFILE"];
$arResult["USER"]["~profile_view"] = $arResult["USER"]["URL"]["~PROFILE"];