搞织梦的孩子有福了,对于网上最新的织梦V5.7SP1和最新的ueditor1.2.6.1,有些孩童不知道怎么整合,我也去各大论坛看了下,找了相关资料,发现好多资料缺胳膊断腿的,不全,于是,我就自己搞了下,不错意外,一定是可以的,相关步骤如下:
织梦V5.7SP1整合ueditor1.2.6.1教程
第一步:进入织梦后台,系统—核心设置,将编辑器改成:ueditor
第二步:下载最新版程序,我下的是utf-8版,解压上传至include目录下
第三步:打开织梦目录include/inc/inc_fun_funAdmin.php文件,在第226行与227行之间插入下列代码:
- else if($GLOBALS['cfg_html_editor']=='ueditor'){
- $fvalue = $fvalue=="" ? "<p>请在这里添加内容</p>" : $fvalue;
- $code ="";
- $code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS["cfg_cmspath"].'/include/ueditor/ueditor.config.js"></script>';
- $code .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS["cfg_cmspath"].'/include/ueditor/ueditor.all.js"></script>';
- $code .='<textarea name="'.$fname.'" id="'.$fname.'" style="width:100%;">'.$fvalue.'</textarea>';
- $code .='<script type="text/javascript">var ue = new baidu.editor.ui.Editor();ue.render("'.$fname.'");</script>';
- //开源软件:Vevb.com
- if($gtype=="print")
- {
- echo $code;
- }
- else
- {
- return $code;
- }
- }
第四步:开始修改图片上传的路径
1,打开include/ueditor/ueditor.config.js
01,改:
window.UEDITOR_HOME_URL = "/DedeCMS57/include/ueditor/";
02 ,imagePath:URL + "php/"改,imagePath:"http://cms.local/DedeCMS57/"
03 ,imageManagerPath:URL + "php/" 改,imageManagerPath:"http://cms.local/DedeCMS57/"
2,打开include/ueditor/php/imageUp.php
04 "savePath" => ($path == "1" ? "upload/" : "upload1/"), 改:
"savePath" => ($path == "1" ? "../../../upload/img/" : "upload1/"),
05 echo "{'url':'" . $info["url"] . "','title':'" . $title . "','original':'" . $info["originalName"] . "','state':'" . $info["state"] . "'}"; 改:
echo "{'url':'" . str_replace('../','',$info[ "url" ]) . "','title':'" . $title . "','original':'" . $info["originalName"] . "','state':'" . $info["state"] . "'}";
3,打开include/ueditor/php/imageUp.php
06 $paths = array('upload/','upload1/'); 改
$paths = array('../../../upload/img/','upload1/');
新闻热点
疑难解答