搞織夢的孩子有福了,對于網上最新的織夢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/');
新聞熱點
疑難解答