织梦让模型里的图片字段支持本地上传效果
修改教程
1、打开 \dede\Js\main.Js 找到
function SeePicNew(f,imgdID,frname,hpos,acname)
{
中间代码...
}
把这整个函数改成
function SeePicNew(f,acname,formname,picname,picvalue){var formname = formname ? formname : 'save';var picname = picname ? picname : 'picname';var picvalue = picvalue ? picvalue : 'picname';var imgdID = imgdID ? imgdID : 'divpicvIEw';var newobj = null;if(f.value=='') return ;vimg = $Obj(imgdID);picnameObj = document.getElementByID(picname);nFrame = $Nav()=='IE' ? eval('document.frames.'+frname) : $Obj(frname);nForm = f.form;if(nForm.detachEvent) nForm.detachEvent("onsubmit",checksubmit);else nForm.removeEventListener("submit",checksubmit,false);if(picname == 'picname') var picname = 'litpic';nForm.action = 'archives_do.PHP?litpic='+picname+'&picname='+picvalue+'&divpicvIEw='+imgdID;nForm.target = frname;nForm.dopost.value = 'uploadlitpic';nForm.submit();picnameObj.value = '';newobj = $Obj('uploaDWait');if(!newobj){newobj = document.createElement("div");newobj.ID = 'uploaDWait';newobj.style.position = 'absolute';newobj.classname = 'uploaDWait';newobj.style.wIDth = 120;newobj.style.height = 20;newobj.style.top = hpos;newobj.style.left = 100;newobj.style.display = 'block';document.body.appendChild(newobj);newobj.INNERHTML = ' |
2、打开 \dede\archives_do.PHP 找到
else if($dopost=="uploadlitpic")
{
中间代码省略...
}
整个改成
else if($dopost=="uploadlitpic"){$fname = $_GET['litpic'] ? $_GET['litpic'] : 'litpic'; $upfile = adminUpload($fname,'imagelit',true ); if($upfile=='-1') { $msg = " 总结 |
评论列表(0条)