标签:image 目录 targe data source 失败 lan 本地图片 技术
本站所有附件均为UTF-8版本,GBK版本的童学请自行转码;
教程最下面有解决栏目内容添加失败的解决方法和本地上传图片加水印方法。
ueditor官方地址:http://ueditor.baidu.com/website/download.html
把下载到的ueditor文件扔进去(index.html不要)
找到
else if($GLOBALS[‘cfg_html_editor‘]==‘ckeditor‘) { ...中间代码省略 }
在它们的下面增加
//百度编辑器 else if($GLOBALS[‘cfg_html_editor‘]==‘ueditor‘) { $fvalue = $fvalue==‘‘ ? ‘<p></p>‘ : $fvalue; $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.min.js"></script>‘; $code .= ‘<link rel="stylesheet" type="text/css" href="‘.$GLOBALS[‘cfg_cmspath‘].‘/include/ueditor/themes/default/css/ueditor.css"/>‘; $code .= ‘<script type="text/plain" name="‘.$fname.‘" id="‘.$fname.‘">‘.$fvalue.‘</script>‘; if($bbcode) { $code .= ‘<script type="text/javascript">UE.getEditor("‘.$fname.‘",{toolbars:[["Source","|", "bold", "italic", "underline","|","fontsize","forecolor","emotion","Undo", "Redo"]],initialFrameHeight:100});</script>‘; } else { $code .= ‘<script type="text/javascript">UE.getEditor("‘.$fname.‘",{initialFrameHeight:450});</script>‘; } if($gtype=="print") { echo $code; } else { return $code; } }
include\ueditor\php\config.json
里面的
/ueditor/php/upload/image/
/ueditor/php/upload/video/
/ueditor/php/upload/file/
修改成自己的,如:
/uploads/allimg/
/uploads/video/
/uploads/file/
dedecms织梦更换ueditor后栏目内容、单页无法保存问题的解决方法
打开
\dede\templets\catalog_add.htm (dede是你的后台目录)
\dede\templets\catalog_edit.htm
把里面的 form 放置到
<td height="95" align="center" bgcolor="#FFFFFF">
内,就可以了。
打开 \include\ueditor\php\action_upload.php 找到
include "Uploader.class.php";
在它下面加入
require_once("../../common.inc.php");
require_once("../../image.func.php");
再打开 \include\ueditor\php\Uploader.class.php 找到
$this->stateInfo = $this->stateMap[0]; 大概在124行左右
在它下面加入
@WaterImg($this->filePath, ‘down‘);
完成,这样上传本地图片和批量上传图片就自动加水印了。
dedecms织梦添加ueditor百度编辑器(支持本地图片水印)
标签:image 目录 targe data source 失败 lan 本地图片 技术
原文地址:http://www.cnblogs.com/dedediy/p/6568987.html