本文整理匯總了PHP中forumTextParser::GetEditorToolbar方法的典型用法代碼示例。如果您正苦於以下問題:PHP forumTextParser::GetEditorToolbar方法的具體用法?PHP forumTextParser::GetEditorToolbar怎麽用?PHP forumTextParser::GetEditorToolbar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類forumTextParser
的用法示例。
在下文中一共展示了forumTextParser::GetEditorToolbar方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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",
示例2: 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++;
示例3: 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
示例4: 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"])))
);
}
}
$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")
示例5: 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
示例6: 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