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


PHP forumTextParser类代码示例

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


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

示例1: forumCommentsCommentMobile

function forumCommentsCommentMobile(array $comment, array $arParams, array $arResult, ForumCommentsComponent $component)
{
    global $APPLICATION;
    $arParams["AVATAR_SIZE"] = intval($arParams["AVATAR_SIZE"]) ?: 58;
    static $parser = null;
    if ($parser == null) {
        $parser = new forumTextParser(false);
        $parser->bMobile = true;
        $parser->LAZYLOAD = $arParams["LAZYLOAD"] == "Y";
        $parser->arFiles = $arResult["FILES"];
    }
    $parser->arUserfields = $comment["PROPS"];
    $text = $parser->convert($comment["~POST_MESSAGE_TEXT"], $comment["ALLOW"]);
    $res = array("ID" => $comment["ID"], "NEW" => $comment["NEW"] == "Y" ? "Y" : "N", "APPROVED" => $comment["APPROVED"], "POST_TIMESTAMP" => $comment["POST_TIMESTAMP"], "AUTHOR" => array("ID" => $comment["AUTHOR_ID"], "NAME" => $comment["~NAME"], "LAST_NAME" => $comment["~LAST_NAME"], "SECOND_NAME" => $comment["~SECOND_NAME"], "AVATAR" => $comment["AVATAR"] && $comment["AVATAR"]["FILE"] ? $comment["AVATAR"]["FILE"]['src'] : ""), "FILES" => $comment["FILES"], "UF" => $comment["PROPS"], "POST_MESSAGE_TEXT" => $text, "~POST_MESSAGE_TEXT" => $comment["~POST_MESSAGE_TEXT"], "CLASSNAME" => "", "BEFORE_HEADER" => "", "BEFORE_ACTIONS" => "", "AFTER_ACTIONS" => "", "AFTER_HEADER" => "", "BEFORE" => "", "AFTER" => "", "BEFORE_RECORD" => "", "AFTER_RECORD" => "");
    return $res;
}
开发者ID:Satariall,项目名称:izurit,代码行数:16,代码来源:functions.php

示例2: unset

					CComponentEngine::MakePathFromTemplate(
						$arParams["~URL_TEMPLATES_SUBSCR_LIST"],
						array()
					),
					array("FID" => $arParams["FID"], "TID" => $arParams["TID"]));
			break;
		case "mid_for_move_is_empty":
			$strErrorMessage = "mid_for_move_is_empty";
			break;
	}
	unset($_GET["result"]);
	DeleteParam(array("result", "MID", "ACTION"));
	unset($_GET["MID"]); unset($GLOBALS["HTTP_GET_VARS"]["MID"]);
	unset($_GET["ACTION"]); unset($GLOBALS["HTTP_GET_VARS"]["ACTION"]);

	$parser = new forumTextParser(LANGUAGE_ID, $arParams["PATH_TO_SMILE"]);
	$parser->MaxStringLen = $arParams["WORD_LENGTH"];
	$parser->image_params["width"] = $arParams["IMAGE_SIZE"];
	$parser->image_params["height"] = $arParams["IMAGE_SIZE"];

	$arResult["GROUP_NAVIGATION"] = array();
	$arResult["GROUPS"] = CForumGroup::GetByLang(LANGUAGE_ID);

	$_REQUEST["FILES"] = is_array($_REQUEST["FILES"]) ? $_REQUEST["FILES"] : array();
	$_REQUEST["FILES_TO_UPLOAD"] = is_array($_REQUEST["FILES_TO_UPLOAD"]) ? $_REQUEST["FILES_TO_UPLOAD"] : array();
/********************************************************************
				/Default params
********************************************************************/


/********************************************************************
开发者ID:ASDAFF,项目名称:bitrix-5,代码行数:31,代码来源:component.php

示例3: array

/********************************************************************
				/Input params
********************************************************************/
/********************************************************************
				Default values
********************************************************************/
$arResult["GROUPS"] = CForumGroup::GetByLang(LANGUAGE_ID);
$arResult["GROUP"] = $arResult["GROUPS"][$arParams["GID"]];
if (empty($arResult["GROUP"])) {
    $arParams["GID"] = 0;
}
$arResult["GROUP_NAVIGATION"] = array();
$arResult["USER"] = array("CAN_MODERATE" => "N", "HIDDEN_GROUPS" => array(), "HIDDEN_FORUMS" => array());
$arResult["URL"] = array("INDEX" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_FORUMS"], array()), "~INDEX" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_FORUMS"], array()), "RSS" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_RSS"], array("TYPE" => "default", "MODE" => "forum", "IID" => "all")), "~RSS" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_RSS"], array("TYPE" => "default", "MODE" => "forum", "IID" => "all")), "~RSS_DEFAULT" => CComponentEngine::MakePathFromTemplate($arParams["~URL_TEMPLATES_RSS"], array("TYPE" => "rss2", "MODE" => "forum", "IID" => "all")), "RSS_DEFAULT" => CComponentEngine::MakePathFromTemplate($arParams["URL_TEMPLATES_RSS"], array("TYPE" => "rss2", "MODE" => "forum", "IID" => "all")));
$arGroupForum = array();
$parser = new forumTextParser(false, false, false, "light");
$parser->MaxStringLen = $arParams["WORD_LENGTH"];
$arResult["FORUMS_FOR_GUEST"] = array();
$arResult["FORUMS_LIST"] = array();
/*******************************************************************/
if ($GLOBALS["USER"]->IsAuthorized()) {
    require_once $_SERVER["DOCUMENT_ROOT"] . BX_ROOT . "/modules/main/classes/" . strToLower($GLOBALS["DB"]->type) . "/favorites.php";
    $res = CUserOptions::GetOption("forum", "user_info", "");
    $res = CheckSerializedData($res) ? @unserialize($res) : array();
    $arResult["USER"]["HIDDEN_GROUPS"] = is_array($res["groups"]) ? $res["groups"] : array();
    $arResult["USER"]["HIDDEN_FORUMS"] = is_array($res["forums"]) ? $res["forums"] : array();
}
foreach ($arParams["FID_RANGE"] as $key => $val) {
    if (intVal($val) > 0) {
        $res[] = $val;
    }
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:component.php

示例4: array

					{
						$arSmiles[] = array(
							'name' => $arSmile["NAME"],
							'path' => $arParams["PATH_TO_SMILE"].$arSmile["IMAGE"],
							'code' => array_shift(explode(" ", str_replace("\\\\","\\",$arSmile["TYPING"])))
						);
					}
				}

			$APPLICATION->IncludeComponent(
				"bitrix:main.post.form",
				"",
				Array(
					"FORM_ID" => $arParams["FORM_ID"],
					"SHOW_MORE" => "Y",
					"PARSER" => forumTextParser::GetEditorToolbar(array('forum' => $arResult['FORUM'])),

					"LHE" => array(
						'id' => 'POST_MESSAGE',
						'bSetDefaultCodeView' => ($arParams['EDITOR_CODE_DEFAULT'] == 'Y'),
						'bResizable' => true,
						'bAutoResize' => true,
						'bManualResize' => false,
						"documentCSS" => "body {color:#434343; font-size: 14px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 20px;}"
					),

					"ADDITIONAL" => array(),

					"TEXT" => Array(
						"ID" => "POST_MESSAGE",
						"NAME" => "POST_MESSAGE",
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:template.php

示例5: array

				"SECOND_NAME"	=> $USER->GetSecondName(),
				"LOGIN" 		=> $USER->GetLogin()),
			true,
			false
		);
	}
}

$arResult["PANELS"] = array(
	"MODERATE" => $arResult["USER"]["RIGHTS"]["MODERATE"],
	"DELETE" => $arResult["USER"]["RIGHTS"]["EDIT"],
);
$arResult["SHOW_PANEL"] = in_array("Y", $arResult["PANELS"]) ? "Y" : "N";

// PARSER
$parser = new forumTextParser(LANGUAGE_ID, $arParams["PATH_TO_SMILE"]);
$parser->image_params["width"] = $arParams["IMAGE_SIZE"];
$parser->image_params["height"] = $arParams["IMAGE_SIZE"];
$arResult["PARSER"] = $parser;

// FORUM
$arAllow = forumTextParser::GetFeatures($arResult["FORUM"]);

$_REQUEST["FILES"] = is_array($_REQUEST["FILES"]) ? $_REQUEST["FILES"] : array();
$_REQUEST["FILES_TO_UPLOAD"] = is_array($_REQUEST["FILES_TO_UPLOAD"]) ? $_REQUEST["FILES_TO_UPLOAD"] : array();
CPageOption::SetOptionString("main", "nav_page_in_session", "N");
$arResult["MESSAGES"] = array();
$arResult["MESSAGE_VIEW"] = array();
$arResult["MESSAGE"] = array();
$arResult["FILES"] = array();
/********************************************************************
开发者ID:akniyev,项目名称:arteva.ru,代码行数:31,代码来源:component.php

示例6: 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

示例7: GetMessage

echo GetMessage("F_HEAD_MESS");
?>
<span class="forum-required-field">*</span></div>

	<div class="forum-reply-fields">
		<div class="forum-reply-field forum-reply-field-text">
			<?php 
$arSmiles = array();
foreach ($arResult["SMILES"] as $arSmile) {
    $arSmiles[] = array('name' => $arSmile["NAME"], 'path' => $arParams["PATH_TO_SMILE"] . $arSmile["IMAGE"], 'code' => array_shift(explode(" ", str_replace("\\\\", "\\", $arSmile["TYPING"]))));
}
CModule::IncludeModule("fileman");
AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLHEForForum");
$LHE = new CLightHTMLEditor();
$arEditorParams = array('id' => "POST_MESSAGE", 'content' => isset($arResult['POST_VALUES']["~POST_MESSAGE"]) ? $arResult['POST_VALUES']["~POST_MESSAGE"] : $arResult['POST_VALUES']["POST_MESSAGE"], 'inputName' => "POST_MESSAGE", 'inputId' => "", 'width' => "100%", 'height' => "200px", 'minHeight' => "200px", 'bUseFileDialogs' => false, 'bUseMedialib' => false, 'BBCode' => true, 'bBBParseImageSize' => true, 'jsObjName' => "oLHE", 'toolbarConfig' => array(), 'smileCountInToolbar' => 3, 'arSmiles' => $arSmiles, 'bQuoteFromSelection' => true, 'ctrlEnterHandler' => 'postformCtrlEnterHandler' . $arParams["form_index"], 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'] === 'Y', 'bResizable' => true, 'bAutoResize' => true);
$arEditorParams['toolbarConfig'] = forumTextParser::GetEditorToolbar(array('mode' => 'full'));
$LHE->Show($arEditorParams);
?>
		</div>

		<div class="forum-reply-field forum-reply-field-settings">
			<div class="forum-reply-field-setting">
				<input type="checkbox" name="USE_SMILES" id="USE_SMILES" <?php 
?>
value="Y" <?php 
echo $arResult["POST_VALUES"]["USE_SMILES"] == "Y" ? "checked=\"checked\"" : "";
?>
 <?php 
?>
tabindex="<?php 
echo $tabIndex++;
开发者ID:dayAlone,项目名称:MyQube,代码行数:31,代码来源:template.php

示例8: array

    return false;
}
/********************************************************************
				/Data 1
********************************************************************/
/********************************************************************
				Default values
********************************************************************/
$arFilter = array();
$arItems = array();
$arParams["FID"] = !empty($arResult["FORUMS"][$arParams["FID"]]) ? $arParams["FID"] : 0;
$arResult["LANGUAGE_ID"] = LANGUAGE_ID;
$arResult["CHARSET"] = defined("SITE_CHARSET") && strLen(SITE_CHARSET) > 0 ? SITE_CHARSET : "windows-1251";
$arResult["NOW"] = $arParams["TYPE"] != "ATOM" ? date("r") : date("Y-m-d H:i:s") . substr(date("O"), 0, 3) . ":" . substr(date("O"), -2, 2);
$arResult["TEMPLATE_ELEMENTS"] = array("AUTHOR_NAME", "AUTHOR_LINK", "SIGNATURE", "DATE_REG", "AVATAR", "POST_MESSAGE", "POST_LINK", "POST_DATE", "ATTACH_IMG", "TITLE", "TOPIC_LINK", "TOPIC_DATE", "TOPIC_DESCRIPTION", "NAME", "FORUM_LINK", "FORUM_DESCRIPTION");
$parser = new forumTextParser(LANGUAGE_ID);
$parser->MaxStringLen = 0;
$parser->userPath = $arParams["URL_TEMPLATES_PROFILE_VIEW"];
$parser->userNameTemplate = $arParams["NAME_TEMPLATE"];
$arResult["SITE"] = array();
$db_res = CSite::GetByID(SITE_ID);
if ($db_res && ($res = $db_res->GetNext())) {
    $arResult["SITE"] = $res;
}
$arResult["~TITLE"] = $arParams["TEMPLATES_TITLE_FORUMS"];
$arResult["~DESCRIPTION"] = $arParams["TEMPLATES_DESCRIPTION_FORUMS"];
if ($arParams["MODE_DATA"] == "forum" && $arParams["IID"] > 0) {
    $arResult["~TITLE"] = $arParams["TEMPLATES_TITLE_FORUM"];
    $arResult["~DESCRIPTION"] = $arParams["TEMPLATES_DESCRIPTION_FORUM"];
} elseif ($arParams["MODE_DATA"] == "topic") {
    $arResult["~TITLE"] = $arParams["TEMPLATES_TITLE_TOPIC"];
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:component.php

示例9: array_shift

					'path' => $arParams["PATH_TO_SMILE"].$arSmile["IMAGE"],
					'code' => array_shift(explode(" ", str_replace("\\\\","\\",$arSmile["TYPING"])))
				);
			}
		}

		$APPLICATION->IncludeComponent("bitrix:main.post.form", "",
			Array(
				"FORM_ID" => $arParams["FORM_ID"],
				"SHOW_MORE" => "Y",
				"PARSER" => forumTextParser::GetEditorToolbar(array('forum' => $arParams["ALLOW"])),
				"BUTTONS" => array_unique(
					(isset($arResult["USER_FIELDS"]["UF_FORUM_MESSAGE_DOC"]) ? array("UploadFile") : array() )
					+
					array_intersect(array("UploadFile", "CreateLink", "InputVideo", "Quote", "MentionUser"),
						forumTextParser::GetEditorButtons(array('forum' => $arParams["ALLOW"]))
				)),
				"LHE" => array(
					'id' => $arParams["LheId"],
					'jsObjName' => $arParams["jsObjName"],
					'bSetDefaultCodeView' => ($arParams['EDITOR_CODE_DEFAULT'] == 'Y'),
					"documentCSS" => "body {color:#434343;}",
					"fontFamily" => "'Helvetica Neue', Helvetica, Arial, sans-serif",
					"fontSize" => "12px",
					"ctrlEnterHandler" => 'commentsCtrlEnterHandler'.$arParams["FORM_ID"],
					"bInitByJS" => ($arParams['SHOW_MINIMIZED'] == "Y")
				),
				"DESTINATION" => Array(
					"VALUE" => array(),
					"SHOW" => "N",
				),
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:31,代码来源:form.php

示例10: GetMessage

" alt="<?php 
    echo GetMessage("F_CAPTCHA_TITLE");
    ?>
" />
				</div>
			</div>
		<?php 
}
$html_after_textarea = ob_get_clean();
$arSmiles = array();
if ($arParams["ALLOW_SMILES"] == "Y") {
    foreach ($arResult["SMILES"] as $arSmile) {
        $arSmiles[] = array('name' => $arSmile["NAME"], 'path' => $arParams["PATH_TO_SMILE"] . $arSmile["IMAGE"], 'code' => array_shift(explode(" ", str_replace("\\\\", "\\", $arSmile["TYPING"]))));
    }
}
$APPLICATION->IncludeComponent("bitrix:main.post.form", "", array("FORM_ID" => $arParams["FORM_ID"], "SHOW_MORE" => "Y", "PARSER" => forumTextParser::GetEditorToolbar(array('forum' => $arParams["ALLOW"])), "BUTTONS" => array_unique((isset($arResult["USER_FIELDS"]["UF_FORUM_MESSAGE_DOC"]) ? array("UploadFile") : array()) + array_intersect(array("UploadFile", "CreateLink", "InputVideo", "Quote", "MentionUser"), forumTextParser::GetEditorButtons(array('forum' => $arParams["ALLOW"])))), "LHE" => array('id' => $arParams["LheId"], 'jsObjName' => $arParams["jsObjName"], 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'] == 'Y', "documentCSS" => "body {color:#434343;}", "fontFamily" => "'Helvetica Neue', Helvetica, Arial, sans-serif", "fontSize" => "12px", "ctrlEnterHandler" => 'commentsCtrlEnterHandler' . $arParams["FORM_ID"], "bInitByJS" => $arParams['SHOW_MINIMIZED'] == "Y", "height" => 80), "DESTINATION" => array("VALUE" => array(), "SHOW" => "N"), "TEXT" => array("ID" => "REVIEW_TEXT", "NAME" => "REVIEW_TEXT", "VALUE" => isset($arResult["REVIEW_TEXT"]) ? $arResult["REVIEW_TEXT"] : "", "HEIGHT" => "80px"), "UPLOAD_FILE" => isset($arResult["USER_FIELDS"]["UF_FORUM_MESSAGE_DOC"]) || $arParams["ALLOW_UPLOAD"] == "N" ? false : array("TAG" => "FILE ID", "INPUT_NAME" => 'FILE_NEW', "INPUT_VALUE" => array(), "MAX_FILE_SIZE" => COption::GetOptionString("forum", "file_max_size", 5242880), "MULTIPLE" => "Y", "MODULE_ID" => "forum", "ALLOW_UPLOAD" => $arParams["ALLOW_UPLOAD"] == "Y" ? "I" : $arParams["ALLOW_UPLOAD"], "ALLOW_UPLOAD_EXT" => $arParams["ALLOW_UPLOAD_EXT"]), "UPLOAD_FILE_PARAMS" => array("width" => $arParams["IMAGE_SIZE"], "height" => $arParams["IMAGE_SIZE"]), "PROPERTIES" => array($arResult["USER_FIELDS"]["UF_FORUM_MESSAGE_DOC"]), "SMILES" => array("VALUE" => $arSmiles), "HTML_BEFORE_TEXTAREA" => $APPLICATION->GetViewContent(implode('_', array($tplID, 'EDIT', 'BEFORE'))), "HTML_AFTER_TEXTAREA" => $APPLICATION->GetViewContent(implode('_', array($tplID, 'EDIT', 'AFTER'))) . $html_after_textarea), false, array("HIDE_ICONS" => "Y"));
?>
</form>
<script type="text/javascript">
BX.ready(function(){
	window["UC"]["f<?php 
echo $arParams["FORM_ID"];
?>
"] = new FCForm({
		entitiesId : {'<?php 
echo $arParams["ENTITY_XML_ID"];
?>
' : ['<?php 
echo $arParams["ENTITY_TYPE"];
?>
', <?php 
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:31,代码来源:form.php

示例11: 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

示例12: array

?>
</span><span class="forum-required-field">*</span></div>
	<div class="forum-reply-fields">
		<div class="forum-reply-field forum-reply-field-text">
			<?php 
$postMessageTabIndex = $tabIndex++;
$arSmiles = array();
if ($arResult["FORUM"]["ALLOW_SMILES"] == "Y") {
    foreach ($arResult["SMILES"] as $arSmile) {
        $arSmiles[] = array('name' => $arSmile["NAME"], 'path' => $arParams["PATH_TO_SMILE"] . $arSmile["IMAGE"], 'code' => array_shift(explode(" ", str_replace("\\\\", "\\", $arSmile["TYPING"]))));
    }
}
if (LANGUAGE_ID == 'ru') {
    AddEventHandler("fileman", "OnIncludeLightEditorScript", "CustomizeLHEForForum");
}
$APPLICATION->IncludeComponent("bitrix:main.post.form", "", array("FORM_ID" => $arParams["FORM_ID"], "SHOW_MORE" => "Y", "PARSER" => forumTextParser::GetEditorToolbar(array('forum' => $arResult['FORUM'])), "LHE" => array('id' => 'POST_MESSAGE', 'jsObjName' => $arParams["jsObjName"], 'bSetDefaultCodeView' => $arParams['EDITOR_CODE_DEFAULT'] == 'Y', 'bResizable' => true, 'bAutoResize' => true, 'bManualResize' => false, "documentCSS" => "body {color:#434343; font-size: 14px; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; line-height: 20px;}", "ctrlEnterHandler" => "__ctrl_enter_" . $arParams["FORM_ID"]), "ADDITIONAL" => array(), "TEXT" => array("ID" => "POST_MESSAGE", "NAME" => "POST_MESSAGE", "VALUE" => isset($arResult['MESSAGE']["~POST_MESSAGE"]) ? $arResult['MESSAGE']["~POST_MESSAGE"] : "", "SHOW" => "Y", "HEIGHT" => "200px"), "UPLOAD_FILE" => array('CONTROL_ID' => $fileControlId, "INPUT_NAME" => 'FILES', "INPUT_VALUE" => !empty($arResult["MESSAGE"]["FILES"]) ? array_keys($arResult["MESSAGE"]["FILES"]) : false, "MAX_FILE_SIZE" => COption::GetOptionString("forum", "file_max_size", 5242880), "MULTIPLE" => "Y", "MODULE_ID" => "forum", "ALLOW_UPLOAD" => $arParams["FORUM"]["ALLOW_UPLOAD"] == "N" ? 'N' : ($arResult["FORUM"]["ALLOW_UPLOAD"] == "Y" ? "I" : $arResult["FORUM"]["ALLOW_UPLOAD"]), "ALLOW_UPLOAD_EXT" => $arResult["FORUM"]["ALLOW_UPLOAD_EXT"]), "UPLOAD_FILE_PARAMS" => array("width" => $arParams["IMAGE_SIZE"], "height" => $arParams["IMAGE_SIZE"]), "UPLOAD_WEBDAV_ELEMENT" => $arResult["USER_FIELDS"]["UF_FORUM_MESSAGE_DOC"], "SMILES" => array("VALUE" => $arSmiles), "NAME_TEMPLATE" => $arParams["NAME_TEMPLATE"]));
?>
<a href="#" tabindex="<?php 
echo $postMessageTabIndex;
?>
" id="post_message_hidden"></a>
				</div>
<?php 
/* ATTACH FILES */
if (!empty($arResult["USER_FIELDS"])) {
    ob_start();
    foreach ($arResult["USER_FIELDS"] as $k => $v) {
        if ($k != "UF_FORUM_MESSAGE_DOC") {
            $v["VALUE"] = !empty($_REQUEST[$k]) ? $_REQUEST[$k] : $v["VALUE"];
            ?>
<dt><?php 
开发者ID:spas-viktor,项目名称:books,代码行数:31,代码来源:template.php

示例13: array

		'bUseFileDialogs' => false,
		'bUseMedialib' => false,
		'BBCode' => true,
		'bBBParseImageSize' => true,
		'jsObjName' => "oLHE",
		'toolbarConfig' => array(),
		'smileCountInToolbar' => 3,
		'arSmiles' => $arSmiles,
		'bQuoteFromSelection' => true,
		'ctrlEnterHandler' => 'reviewsCtrlEnterHandler'.$arParams["form_index"],
		'bSetDefaultCodeView' => ($arParams['EDITOR_CODE_DEFAULT'] === 'Y'),
		'bResizable' => true,
		'bAutoResize' => true
	);

	$arEditorParams['toolbarConfig'] = forumTextParser::GetEditorToolbar(array('forum' => $arResult['FORUM']));
	$LHE->Show($arEditorParams);
?>
	</div>
<?

/* CAPTHCA */
if (strLen($arResult["CAPTCHA_CODE"]) > 0):
?>
		<div class="reviews-reply-field reviews-reply-field-captcha">
			<input type="hidden" name="captcha_code" value="<?php 
echo $arResult["CAPTCHA_CODE"];
?>
"/>
			<div class="reviews-reply-field-captcha-label">
				<label for="captcha_word"><?php 
开发者ID:ASDAFF,项目名称:open_bx,代码行数:31,代码来源:template.php

示例14: array

} else {
    $arParams["CACHE_TIME"] = 0;
}
/********************************************************************
				/Input params
********************************************************************/
/********************************************************************
				Default params
********************************************************************/
$arResult["SHOW_RESULT"] = "N";
$arResult["SHOW_ICQ"] = COption::GetOptionString("forum", "SHOW_ICQ_CONTACT", "N") != "Y" ? "N" : ($arParams["SEND_ICQ"] > "A" ? "Y" : "N");
$arResult["SHOW_MAIL"] = $arParams["SHOW_MAIL"] = $arParams["SEND_MAIL"] <= "A" || $arParams["SEND_MAIL"] <= "E" && !$GLOBALS['USER']->IsAuthorized() ? "N" : "Y";
$arResult["SHOW_VOTES"] = COption::GetOptionString("forum", "SHOW_VOTES", "Y") == "Y" ? "Y" : "N";
$arResult["USERS"] = array();
/*************** Options and default settings **********************/
$parser = new forumTextParser(false, false, false, "light");
$parser->MaxStringLen = $arParams["WORD_LENGTH"];
/******************************************************************/
$strError = "";
$cache = new CPHPCache();
$cache_path_main = str_replace(array(":", "//"), "/", "/" . SITE_ID . "/" . $componentName . "/");
/********************************************************************
				/Default params
********************************************************************/
/********************************************************************
				Data
********************************************************************/
$cache_id = "forum_forums_listex_" . (($tzOffset = CTimeZone::GetOffset()) != 0 ? "_" . $tzOffset : "");
$cache_path = $cache_path_main . "forums";
if ($arParams["CACHE_TIME"] > 0 && $cache->InitCache($arParams["CACHE_TIME"], $cache_id, $cache_path)) {
    $res = $cache->GetVars();
开发者ID:Satariall,项目名称:izurit,代码行数:31,代码来源:component.php

示例15: Add

	function Add($arFields, $strUploadDir = false, $arParams = array())
	{
		global $DB;

		$strUploadDir = ($strUploadDir === false ? "forum/upload" : $strUploadDir);

		if (!CForumMessage::CheckFields("ADD", $arFields))
			return false;

		$arForum = CForumNew::GetByID($arFields["FORUM_ID"]);
		$arParams["SKIP_STATISTIC"] = ($arParams["SKIP_STATISTIC"] == "Y" ? "Y" : "N");
		$arParams["SKIP_INDEXING"] = ($arParams["SKIP_INDEXING"] == "Y" || $arForum["INDEXATION"] != "Y" ? "Y" : "N");

		$POST_MESSAGE = $arFields["POST_MESSAGE"];
		$parser = new forumTextParser(LANGUAGE_ID);
		$allow = forumTextParser::GetFeatures($arForum);
		$allow['SMILES'] = (($arFields["USE_SMILES"] != "Y") ? 'N' : $allow['SMILES']);
		if (COption::GetOptionString("forum", "FILTER", "Y") == "Y")
		{
			$POST_MESSAGE = CFilterUnquotableWords::Filter($POST_MESSAGE);
			$arFields["POST_MESSAGE_FILTER"] = (empty($POST_MESSAGE) ? "*" : $POST_MESSAGE);
		}
/***************** Attach ******************************************/
		$arFiles = array();
		if (is_array($arFields["ATTACH_IMG"]))
			$arFields["FILES"] = array($arFields["ATTACH_IMG"]);
		unset($arFields["ATTACH_IMG"]);
		if (is_array($arFields["FILES"]) && !empty($arFields["FILES"]))
		{
			$res = array("FORUM_ID" => $arFields["FORUM_ID"], "USER_ID" => $arFields["AUTHOR_ID"], "upload_dir" => $strUploadDir);
			$arFiles = CForumFiles::Save($arFields["FILES"], $res, false);
			if (!empty($arFiles))
			{
				$arFiles = array_keys($arFiles);
				sort($arFiles);
				$arFields["ATTACH_IMG"] = $arFiles[0];
				$arFields["ATTACHED_FILES"] = $arFiles;
			}
			unset($arFields["FILES"]);
		}
/***************** Attach/******************************************/
		if (COption::GetOptionString("forum", "MESSAGE_HTML", "N") == "Y")
			$POST_MESSAGE = $parser->convert($POST_MESSAGE, $allow, "html", $arFiles);
		$arFields["POST_MESSAGE_HTML"] = $POST_MESSAGE;
/***************** Event onBeforeMessageAdd ************************/
		foreach(GetModuleEvents("forum", "onBeforeMessageAdd", true) as $arEvent)
		{
			if (ExecuteModuleEventEx($arEvent, array(&$arFields, &$strUploadDir)) === false)
				return false;
		}
/***************** /Event ******************************************/
		if (empty($arFields))
			return false;
		$arInsert = $DB->PrepareInsert("b_forum_message", $arFields, $strUploadDir);

		$strDatePostField = "";
		$strDatePostValue = "";
		if (!is_set($arFields, "POST_DATE"))
		{
			$strDatePostField = ", POST_DATE";
			$strDatePostValue = ", ".$DB->GetNowFunction()."";
		}

		$strSql = "INSERT INTO b_forum_message(".$arInsert[0].$strDatePostField.") VALUES(".$arInsert[1].$strDatePostValue.")";
		$DB->Query($strSql, false, "File: ".__FILE__."<br>Line: ".__LINE__);
		$ID = intVal($DB->LastID());
/***************** Attach ******************************************/
		if (!empty($arFiles))
			CForumFiles::UpdateByID($arFiles, array("FORUM_ID" => $arFields["FORUM_ID"],
				"TOPIC_ID" => $arFields["TOPIC_ID"], "MESSAGE_ID" => $ID));
/***************** Attach/******************************************/
/***************** Quota *******************************************/
		$_SESSION["SESS_RECOUNT_DB"] = "Y";

		$GLOBALS["USER_FIELD_MANAGER"]->Update("FORUM_MESSAGE", $ID, $arFields);
		if ($arParams["SKIP_STATISTIC"] == "Y" && $arParams["SKIP_INDEXING"] == "Y")
			return $ID;
		$arMessage = CForumMessage::GetByIDEx($ID, array("GET_FORUM_INFO" => "N", "GET_TOPIC_INFO" => "Y", "FILTER" => "Y"));

		if ($arParams["SKIP_STATISTIC"] != "Y")
		{
			if (intVal($arMessage["AUTHOR_ID"]) > 0)
			{
				CForumUser::SetStat($arMessage["AUTHOR_ID"], array("MESSAGE" => $arMessage));
			}
			CForumTopic::SetStat($arMessage["TOPIC_ID"],  array("MESSAGE" => $arMessage));
			CForumNew::SetStat($arMessage["FORUM_ID"],  array("MESSAGE" => $arMessage));
		}
/***************** Events onAfterMessageAdd ************************/
		foreach(GetModuleEvents("forum", "onAfterMessageAdd", true) as $arEvent)
			ExecuteModuleEventEx($arEvent, array(&$ID, $arMessage, $arMessage["TOPIC_INFO"], $arMessage["FORUM_INFO"], $arFields));
/***************** /Events *****************************************/
		if ($arMessage["APPROVED"] == "Y")
		{
			if ($arParams["SKIP_INDEXING"] != "Y" && CModule::IncludeModule("search"))
			{
				$arMessage["POST_MESSAGE"] = (COption::GetOptionString("forum", "FILTER", "Y") == "Y" ?
					$arMessage["POST_MESSAGE_FILTER"] : $arMessage["POST_MESSAGE"]);
				$arParams = array(
					"PERMISSION" => array(),
//.........这里部分代码省略.........
开发者ID:ASDAFF,项目名称:entask.ru,代码行数:101,代码来源:message.php


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