欢迎来到欣怡建站!我们致力于提供优质的网站建站服务
注册

织梦自定义模型及商品模型编辑器不支持多图发布功能解决方法

相关案例演示

织梦网站自定义模型及商品模型里的CKeditor编辑器不支持多图上传发布功能截图

织梦默认编辑器不支持多图发布功能解决方法

1、打开 /dede/templets/archives_add.htm 找到

js/main.js

在它下面一行加入

<script type="text/javascript"src="js/handlers.js"></script> <script type="text/javascript" src=http://www.dede58.com/a/dedejq/"../images/swfupload/swfupload.js"></script> <script language="javascript" src=http://www.dede58.com/a/dedejq/"../include/js/jquery/jquery.js"></script> <script language="javascript" src=http://www.dede58.com/a/dedejq/"../include/js/jquery/ui.core.js"></script> <script language="javascript" src=http://www.dede58.com/a/dedejq/"../include/js/jquery/ui.draggable.js"></script> <script src='js/tb-box.js'></script> <script language="javascript"> <!-- var swfu = null; var arctype = 'article'; window.onload = function () { swfu = new SWFUpload( { // Backend Settings upload_url: "swfupload.php", post_params: {"PHPSESSID": "<?php echo session_id(); ?>", "dopost" : "", "arctype" : arctype}, // File Upload Settings file_size_limit : "2 MB",// 2MB file_types : "*.jpg; *.gif; *.png", file_types_description : "选择 JPEG/GIF/PNG 格式图片", file_upload_limit : "0", file_queue_error_handler : fileQueueError, file_dialog_complete_handler : fileDialogComplete, upload_progress_handler : uploadProgress, upload_error_handler : uploadError, upload_success_handler : uploadSuccess, upload_complete_handler : uploadComplete, button_image_url : "../images/SmallSpyGlassWithTransperancy_17x18.png", button_placeholder_id : "spanButtonPlaceholder", button_width: '100%', button_height: 26, button_text : '<div style="background-color:#E5F1CF; height:26px; text-align:center; line-height:26px">上传图片(可多选)</div>', button_text_style : '', button_text_top_padding: 0, button_text_left_padding: 10, button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT, button_cursor: SWFUpload.CURSOR.HAND, // Flash Settings flash_url : "../images/swfupload/swfupload.swf", custom_settings : { upload_target : "divFileProgressContainer" }, // Debug Settings debug: false }); }; function addtoEdit(pid) { jQuery.get('swfupload.php?dopost=addtoedit&id=' + pid, function(data) { var picTitle = jQuery('input[name="picinfook'+pid+'"]').val(); var picHTML = '<img src="'+data+'" alt="'+picTitle+'"/>'; CKEDITOR.instances.body.insertHtml(picHTML); }); } //删除已经上传的图片 织梦六久阁 function delAlbPic(pid){ // 同步删除编辑器中插入的图片 jQuery("#__tmpbody").html(); jQuery.get('swfupload.php?dopost=addtoedit&id=' + pid, function(data) { var iptbody = CKEDITOR.instances.body.getData(); jQuery("#__tmpbody").html(iptbody); jQuery("#__tmpbody").find('img').each(function() { if(jQuery(this).attr('src') == data) { //alert(data); jQuery(this).remove(); } }); CKEDITOR.instances.body.setData(jQuery("#__tmpbody").html()); jQuery("#__tmpbody").html(); var tgobj = $Obj('albCtok'+pid); var myajax = new DedeAjax(tgobj); myajax.SendGet2('swfupload.php?dopost=del&id='+pid); $Obj('thumbnails').removeChild(tgobj); }); } //删除已经上传的图片(编辑时用) function delAlbPicOld(picfile, pid){ var tgobj = $Obj('albold'+pid); var myajax = new DedeAjax(tgobj); myajax.SendGet2('swfupload.php?dopost=delold&picfile='+picfile); $Obj('thumbnailsEdit').removeChild(tgobj); } --> </script>  

继续找到

<td><?php PrintAutoFieldsAdd($cInfos['fieldset']); ?></td>

在它下面一行加入

<td width="255" valign="top" bgcolor="#FFFFCC" id="mPic" style="display:none"> <div> <div style="display: block;background-color:#E5F1CF; height:26px"> <span id="spanButtonPlaceholder"></span> </div> <div id="divFileProgressContainer"></div> <div id="thumbnails" style="width: 254px; height: 535px; background-color: rgb(255, 255, 255); overflow-y: scroll;"></div> </div> </td>  

如图

image.png

2、打开 /dede/templets/archives_edit.htm 找到

js/main.js

作者:欣怡建站 挑错 时间:2020-01-09 02:15
首先声明,只要是我们的vip会员所有源码均可以免费下载,不做任何限制
☉本站的源码不会像其它下载站一样植入大量的广告。为了更好的用户体验以后坚持不打水印
☉本站只提供精品源码,源码在于可用,不在多!!希望在这里找到你合适的。
☉本站提供的整站程序,均带数据及演示地址。可以在任一源码详情页查看演示地址
☉本站所有资源(包括源码、模板、素材、特效等)仅供学习与参考,请勿用于商业用途。
☉如有其他问题,请加网站客服QQ(984818011)进行交流。
相关教程
在线客服