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

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

概述织梦网站自定义模型及商品模型里的CKeditor编辑器不支持多图上传发布功能截图: 织梦默认编辑器不支持多图发布功能解决方法 1、打开 /dede/templets/archives_add.htm 找到 js/main.js 在它下面一行加入 script type=text/javascriptsrc=js/handlers.js/scri

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

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

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

Js/main.Js

在它下面一行加入

<script type="text/JavaScript"src="Js/handlers.Js"></script><script type="text/JavaScript" src="../images/swfupload/swfupload.Js"></script><script language="JavaScript" src="../include/Js/jquery/jquery.Js"></script><script language="JavaScript" src="../include/Js/jquery/ui.core.Js"></script><script language="JavaScript" src="../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 Settingsupload_url: "swfupload.PHP",post_params: {"PHPSESSID": "<?PHP echo session_ID(); ?>","dopost" : "","arctype" : arctype},// file Upload Settingsfile_size_limit : "2 MB",// 2MBfile_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 >上传图片(可多选)</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 Settingsflash_url : "../images/swfupload/swfupload.swf",custom_settings : {upload_target : "divfileProgressContainer"},// DeBUG SettingsdeBUG: 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" ><div><div ><span ID="spanbuttonPlaceholder"></span></div><div ID="divfileProgressContainer"></div><div ID="thumbnails" ></div></div></td>

如图

 

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

Js/main.Js

在它下面一行加入

<script type="text/JavaScript"src="Js/handlers.Js"></script><script type="text/JavaScript" src="../images/swfupload/swfupload.Js"></script><script language="JavaScript" src="../include/Js/jquery/jquery.Js"></script><script language="JavaScript" src="../include/Js/jquery/ui.core.Js"></script><script language="JavaScript" src="../include/Js/jquery/ui.draggable.Js"></script><script language='JavaScript' src='Js/tb-Box.Js'></script><script language="JavaScript"><!--var swfu = null;var arctype = 'article';window.onload = function (){swfu = new SWFUpload({// Backend Settingsupload_url: "swfupload.PHP","arctype" : arctype,"arcID":<?PHP echo $arcRow['ID']?>},// DeBUG SettingsdeBUG: false});};function addtoEditold(picurl,pID){var picTitle = jquery('input[name="picinfook'+pID+'"]').val();var picHTML = '<img src="'+picurl+'" 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 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 delAlbPicold(picfile,pID){var iptbody = CKEDITOR.instances.body.getData();jquery("#__tmpbody").HTML(iptbody);jquery("#__tmpbody").find('img').each(function(){if(jquery(this).attr('src') == picfile){//alert(data);jquery(this).remove();}});CKEDITOR.instances.body.setData(jquery("#__tmpbody").HTML()); jquery("#__tmpbody").HTML();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        PrintautoFIEldsEdit($cInfos['fIEldset'],$addRow);      ?>    </td>

在它下面一行加入

<td <div><div > <span ID="spanbuttonPlaceholder"></span> </div><div ID="divfileProgressContainer"></div><div ID="thumbnailsEdit" ><?PHP//var_dump("SELECT * FROM `dede_uploads` WHERE arcID = {$addRow['aID']}");$dsql->Setquery("SELECT * FROM `dede_uploads` WHERE arcID = {$addRow['aID']}");$dsql->Execute();while($trow = $dsql->GetArray()){?><div ID="albold<?PHP echo $trow['aID'];?>"><img wIDth="120" onclick="addtoEditold('<?PHP echo $trow['url'];?>',<?PHP echo $trow['aID'];?>)" src="<?PHP echo $trow['url'];?>" ><a href="JavaScript:delAlbPicold('<?PHP echo $trow['url'];?>',<?PHP echo $trow['aID'];?>)">[删除]</a><div >注释:<input type="text"  value="<?PHP echo $trow['Title'];?>" name="picinfook<?PHP echo $trow['aID'];?>"></div></div><?PHP}?><div ID="thumbnails"></div></div></div></td>

完成

上一篇:织梦友情链接去掉li标签的方法

下一篇:织梦后台栏目名称及栏目文件保存目录长度修改

总结

以上是内存溢出为你收集整理的织梦自定义模型及商品模型编辑器不支持多图发布功能解决方法全部内容,希望文章能够帮你解决织梦自定义模型及商品模型编辑器不支持多图发布功能解决方法所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zz/1038023.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存