var zbpConfig = { bloghost: "https://www.8zszy.com/", blogversion: "173295", ajaxurl: "https://www.8zszy.com/zb_system/cmd.php?act=ajax&src=", cookiepath: "/", lang: { error: { 72: "名称不能为空或格式不正确", 29: "邮箱格式不正确,可能过长或为空", 46: "评论内容不能为空或过长" } }, comment: { useDefaultEvents: true, inputs: { action: { getter: function () { return $("#inpId").parent("form").attr("action"); } }, name: { selector: '#inpName', saveLocally: true, required: true, validateRule: /^[^\s ]+$/ig, validateFailedErrorCode: 72, }, email: { selector: '#inpEmail', saveLocally: true, validateRule: /^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/ig, validateFailedErrorCode: 29, }, homepage: { selector: '#inpHomePage', getter: function () { var t = $('#inpHomePage').val(); return (!/^(.+)\:\/\//.test(t) && t !== "") ? 'http://' + t : t; }, saveLocally: true }, postid: { selector: '#inpId', required: true }, verify: { selector: '#inpVerify' }, content: { selector: '#txaArticle', required: true, validateRule: /./ig, validateFailedErrorCode: 46, }, replyid: { selector: '#inpRevID' }, format: { getter: function () {return 'json';} } } } }; var zbp = new ZBP(zbpConfig); var bloghost = zbp.options.bloghost; var cookiespath = zbp.options.cookiepath; var ajaxurl = zbp.options.ajaxurl; var lang_comment_name_error = zbp.options.lang.error[72]; var lang_comment_email_error = zbp.options.lang.error[29]; var lang_comment_content_error = zbp.options.lang.error[46]; $(function () { zbp.cookie.set("timezone", (new Date().getTimezoneOffset()/60)*(-1)); var $cpLogin = $(".cp-login").find("a"); var $cpVrs = $(".cp-vrs").find("a"); var $addinfo = zbp.cookie.get("addinfo"); if (!$addinfo){ return ; } $addinfo = JSON.parse($addinfo); if ($addinfo.chkadmin){ $(".cp-hello").html("欢迎 " + $addinfo.useralias + " (" + $addinfo.levelname + ")"); $cpLogin.html("后台管理"); } if($addinfo.chkarticle){ $cpVrs.html("新建文章"); $cpVrs.attr("href", zbp.options.bloghost + "zb_system/cmd.php?act=ArticleEdt"); } }); $(function(){ let inpNameVal = $(zbpConfig.comment.inputs.name.selector).val(); if (typeof inpNameVal === "undefined") { return; } if (inpNameVal.trim() === "" || inpNameVal === "访客"){ zbp.userinfo.output(); } }); var TinyMCE_UploadUrl = ajaxurl + "TinyMCE&action=TinyMCE_Upload",TinyMce_toolbar = ["code| undo redo | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist checklist | hr","bold italic underline strikethrough | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | importword | emoticons axupimgs image media pageembed bdmap template link anchor codesample"],TinyMce_upload_filt_type = "jpg|gif|png|jpeg|bmp|webp|psd|wmf|ico|rpm|deb|tar|gz|xz|sit|7z|bz2|zip|rar|xml|xsl|svg|svgz|rtf|doc|docx|ppt|pptx|xls|xlsx|wps|chm|txt|md|pdf|mp3|flac|ape|mp4|mkv|avi|mpg|rm|ra|rmvb|mov|wmv|wma|torrent|apk|json|zba|gzba",TinyMce_plugins = "axupimgs autoresize print preview powerpaste casechange importcss searchreplace autolink autosave save directionality advcode visualblocks bdmap importword visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists checklist wordcount imagetools textpattern noneditable formatpainter permanentpen pageembed charmap quickbars emoticons advtable",TinyMce_mobile_toolbar = ["code| undo redo | fontselect fontsizeselect formatselect | alignleft aligncenter alignright alignjustify | outdent indent | numlist bullist checklist | hr","bold italic underline strikethrough | forecolor backcolor casechange permanentpen formatpainter removeformat | pagebreak | importword | emoticons axupimgs image media pageembed bdmap template link anchor codesample"],TinyMce_mobile_plugins = "axupimgs autoresize print preview powerpaste casechange importcss searchreplace autolink autosave save directionality advcode visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists checklist wordcount imagetools textpattern noneditable formatpainter permanentpen pageembed charmap quickbars emoticons advtable",TinyMce_content_css = ["img{max-width:100%}"]