国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

織夢更換ueditor百度編輯器(支持圖片水印和多個百度編輯器同時使用)

2024-07-12 08:59:54
字體:
來源:轉載
供稿:網友

1、直接到百度編輯器官方下載PHP對應的版本

ueditor官方地址:http://ueditor.baidu.com/website/download.html

2、dedecms 程序 include文件夾下,創建 ueditor 文件夾

把下載到的ueditor文件扔進去(index.html不要)

 

3、includeincinc_fun_funAdmin.php 增加ueditor編輯器

找到

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="http://apps.bdimg.com/libs/jquery/1.6.4/jquery.min.js"></script><!--需要jquery解決多個百度編輯器同時使用-->';	$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 .= '<script type="text/javascript" charset="utf-8" src="'.$GLOBALS['cfg_cmspath'].'/include/ueditor/lang/zh-cn/zh-cn.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">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{toolbars:[["Source","|",	"bold", "italic", "underline","|","fontsize","forecolor","emotion","Undo", "Redo"]],initialFrameHeight:100});});</script>';	}	else	{		$code .= '<script type="text/javascript">jQuery.noConflict();jQuery(function(){var ue = UE.getEditor("'.$fname.'",{initialFrameHeight:450});});</script>';	}          	if($gtype=="print")	{		echo $code;	}	else	{		return $code;	}}

4、修改ueditor上傳文件的路徑

打開 includeueditorphpconfig.json

里面的

/ueditor/php/upload/image/

/ueditor/php/upload/video/

/ueditor/php/upload/file/

修改成自己的,如:

/uploads/allimg/

/uploads/video/

/uploads/file/

5、后臺-系統-核心設置-Html編輯器,里面填上ueditor

 

完成

dedecms織夢更換ueditor后欄目內容、單頁無法保存問題的解決方法

打開

dede empletscatalog_add.htm     (dede是你的后臺目錄)

dede empletscatalog_edit.htm

把里面的 form 放置到

<td height="95" bgcolor="#FFFFFF">

內,就可以了。

 

若GBK網站替換后,中文出現亂碼,可以參考這篇《織夢整合百度編輯器ueditor編碼gbk中文亂碼解決方法》

本地上傳圖片添加水印的解決方法

打開 includeueditorphpction_upload.php 找到

include "Uploader.class.php";

 

在它下面加入

require_once("../../common.inc.php");

require_once("../../image.func.php");

 

再打開 includeueditorphpUploader.class.php 找到

$this->stateInfo = $this->stateMap[0];

大概在124行左右

在它下面加入

@WaterImg($this->filePath, 'down');

完成,這樣上傳本地圖片和批量上傳圖片就自動加水印了。


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 紫云| 安徽省| 长寿区| 安泽县| 鹰潭市| 古交市| 清苑县| 荆门市| 大田县| 琼结县| 宣化县| 新宁县| 常州市| 淮阳县| 余江县| 新营市| 屏东县| 天等县| 岢岚县| 佛冈县| 大城县| 阳春市| 邢台县| 昌平区| 苍山县| 兴隆县| 阜宁县| 榆社县| 武山县| 南涧| 博客| 洛浦县| 通山县| 十堰市| 安溪县| 屏东县| 乌海市| 夏邑县| 墨玉县| 临夏县| 潼南县|