if ($arResult["CanUserComment"]) { ?> <script> BX.viewElementBind( 'blg-comment-<?php echo $arParams["ID"]; ?> ', {}, function(node){ return BX.type.isElementNode(node) && (node.getAttribute('data-bx-viewer') || node.getAttribute('data-bx-image')); } ); top.postFollow<?php echo $arParams["ID"]; ?> = postFollow<?php echo $arParams["ID"]; ?> = '<?php echo $arParams["FOLLOW"]; ?> '; </script> <?php if (empty($_REQUEST["bxajaxid"]) && empty($_REQUEST["logajax"]) || $_REQUEST["RELOAD"] == "Y" && !(empty($_REQUEST["bxajaxid"]) && empty($_REQUEST["logajax"]))) { include_once $_SERVER["DOCUMENT_ROOT"] . $templateFolder . "/script.php"; } __sbpc_bind_post_to_form($arParams["ENTITY_XML_ID"], null, $arParams); } }
$arSmiles[] = array('name' => $arSmile["~LANG_NAME"], 'path' => "/bitrix/images/blog/smile/" . $arSmile["IMAGE"], 'code' => str_replace("\\\\", "\\", $arSmile["TYPE"]), 'codes' => str_replace("\\\\", "\\", $arSmile["TYPING"]), 'width' => $arSmile["IMAGE_WIDTH"], 'height' => $arSmile["IMAGE_HEIGHT"]); } } $rand = randString(4); $formParams = array("FORM_ID" => "blogCommentForm" . $rand, "SHOW_MORE" => "Y", "PARSER" => array("Bold", "Italic", "Underline", "Strike", "ForeColor", "FontList", "FontSizeList", "RemoveFormat", "Quote", "Code", !$arResult["NoCommentUrl"] ? 'CreateLink' : '', "Image", $arResult["allowImageUpload"] == "Y" ? 'UploadImage' : '', $arResult["allowVideo"] == "Y" ? "InputVideo" : "", "Table", "Justify", "InsertOrderedList", "InsertUnorderedList", "MentionUser", "SmileList", "Source"), "BUTTONS" => array(in_array("UF_BLOG_COMMENT_FILE", $arParams["COMMENT_PROPERTY"]) || in_array("UF_BLOG_COMMENT_DOC", $arParams["COMMENT_PROPERTY"]) ? "UploadFile" : "", !$arResult["NoCommentUrl"] ? 'CreateLink' : '', $arResult["allowVideo"] == "Y" ? "InputVideo" : "", "Quote", "MentionUser"), "TEXT" => array("NAME" => "comment", "VALUE" => "", "HEIGHT" => "80px"), "DESTINATION" => array("VALUE" => $arResult["FEED_DESTINATION"], "SHOW" => "N"), "UPLOAD_FILE" => !empty($arResult["COMMENT_PROPERTIES"]["DATA"]["UF_BLOG_COMMENT_FILE"]) ? false : $arResult["COMMENT_PROPERTIES"]["DATA"]["UF_BLOG_COMMENT_DOC"], "UPLOAD_WEBDAV_ELEMENT" => $arResult["COMMENT_PROPERTIES"]["DATA"]["UF_BLOG_COMMENT_FILE"], "UPLOAD_FILE_PARAMS" => array("width" => 400, "height" => 400), "FILES" => array("VALUE" => array(), "DEL_LINK" => $arResult["urlToDelImage"], "SHOW" => "N", "POSTFIX" => "file"), "SMILES" => array("VALUE" => $arSmiles), "LHE" => array("documentCSS" => "body {color:#434343;}", "ctrlEnterHandler" => "__submit" . $rand, "id" => "idLHE_blogCommentForm" . $rand, "fontFamily" => "'Helvetica Neue', Helvetica, Arial, sans-serif", "fontSize" => "12px", "bInitByJS" => true, "height" => 80), "IS_BLOG" => true); //===WebDav=== if (!array_key_exists("USER", $GLOBALS) || !$GLOBALS["USER"]->IsAuthorized()) { unset($formParams["UPLOAD_WEBDAV_ELEMENT"]); foreach ($formParams["BUTTONS"] as $keyT => $valT) { if ($valT == "UploadFile") { unset($formParams["BUTTONS"][$keyT]); } } } //===WebDav=== __sbpc_bind_post_to_form($tmp1 = null, $formParams["FORM_ID"], $tmp2 = null); ?> <div style="display:none;"> <form action="/bitrix/urlrewrite.php" <?php ?> id="<?php echo $formParams["FORM_ID"]; ?> " name="<?php echo $formParams["FORM_ID"]; ?> " <?php ?> method="POST" enctype="multipart/form-data" class="comments-form"> <input type="hidden" name="comment_post_id" id="postId" value="" /> <input type="hidden" name="log_id" id="logId" value="" />