вопрос
Почему не работает такая же функция, но с другим именем?
$onload_scripts[] = <<<HTML
$('#dle-comments-form').submit(function() {
doAddComments();
return false;
});
$('#form2').submit(function() {
doAddComments2();
return false;
});
HTML;
function doAddComments(){var a=document.getElementById("dle-comments-form");if("1"==dle_wysiwyg||"2"==dle_wysiwyg){"2"==dle_wysiwyg&&tinyMCE.triggerSave();var b="wysiwyg"}else b="";if(""==a.comments.value||""==a.name.value)return DLEalert(dle_req_field,dle_info),!1;var c=a.question_answer?a.question_answer.value:"",d=a.sec_code?a.sec_code.value:"",e="undefined"!=typeof grecaptcha?grecaptcha.getResponse():"",g=a.allow_subscribe?1==a.allow_subscribe.checked?"1":"0":"0",f=a.mail?a.mail.value:"";ShowLoading("");
$.post(dle_root+"engine/ajax/addcomments.php",{post_id:a.post_id.value,comments:a.comments.value,name:a.name.value,mail:f,editor_mode:b,skin:dle_skin,sec_code:d,question_answer:c,g_recaptcha_response:e,allow_subscribe:g},function(b){a.sec_code&&(a.sec_code.value="",reload());HideLoading("");$("#dle-ajax-comments").html(b);"error"!=b&&document.getElementById("blind-animation")&&($("html,body").stop().animate({scrollTop:$("#dle-ajax-comments").offset().top-70},1100),setTimeout(function(){$("#blind-animation").show("blind",
{},1500)},1100))},"html");return!1}
function doAddComments2(){var a=document.getElementById("dle-comments-form");if("1"==dle_wysiwyg||"2"==dle_wysiwyg){"2"==dle_wysiwyg&&tinyMCE.triggerSave();var b="wysiwyg"}else b="";if(""==a.comments.value||""==a.name.value)return DLEalert(dle_req_field,dle_info),!1;var c=a.question_answer?a.question_answer.value:"",d=a.sec_code?a.sec_code.value:"",e="undefined"!=typeof grecaptcha?grecaptcha.getResponse():"",g=a.allow_subscribe?1==a.allow_subscribe.checked?"1":"0":"0",f=a.mail?a.mail.value:"";ShowLoading("");
$.post(dle_root+"engine/ajax/addcomments.php",{post_id:a.post_id.value,comments:a.comments.value,name:a.name.value,mail:f,editor_mode:b,skin:dle_skin,sec_code:d,question_answer:c,g_recaptcha_response:e,allow_subscribe:g},function(b){a.sec_code&&(a.sec_code.value="",reload());HideLoading("");$("#dle-ajax-comments").html(b);"error"!=b&&document.getElementById("blind-animation")&&($("html,body").stop().animate({scrollTop:$("#dle-ajax-comments").offset().top-70},1100),setTimeout(function(){$("#blind-animation").show("blind",
{},1500)},1100))},"html");return!1}
Научиться первым делом проверять подключен ли файл вообще. xD