ecshop后臺編輯器替換成ueditor編輯器
1、Ueditor1.4.3下載(截止到2015-03-03最新版)
下載地址:http://ueditor.baidu.com/website/download.html
解決jquery沖突的jquery等相關(guān)文件下載
文件中已含js沖突修改文件,另外已修改php/config.json中的圖處保存路徑,用戶也可以自行修改!
因?yàn)槔蠗钣玫氖莔ac os系統(tǒng),所以文件中有一些.DS_store文件,可以忽略或自行刪除
下載地址:http://pan.baidu.com/s/1gdglb0J 密碼:fflu (老楊提供)
2、上傳到網(wǎng)站服務(wù)器
解壓并上傳目錄 uediter 到根目錄 /includes 下
解壓老楊的那個(gè)東東,把fix_jquery上傳到 ueditor 的目錄下
3、修改/admin/includes/lib_main.php
找到下面的函數(shù)
/**
* 生成編輯器
* @param string input_name 輸入框名稱
* @param string input_value 輸入框值
*/
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$editor = new FCKeditor($input_name);
$editor->BasePath = '../includes/fckeditor/';
$editor->ToolbarSet = 'Normal';
$editor->Width = '100%';
$editor->Height = '320';
$editor->Value = $input_value;
$FCKeditor = $editor->CreateHtml();
$smarty->assign('FCKeditor', $FCKeditor);
}
替換為:
/**
* 生成編輯器
* @param string input_name 輸入框名稱
* @param string input_value 輸入框值
*/
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$kindeditor="
<script id='editor' name='$input_name' type='text/plain' style='width:1024px;height:500px;'>$input_value</script>
<script charset='utf-8' src='../includes/ueditor/ueditor.config.js'></script>
<script charset='utf-8' src='../includes/ueditor/ueditor.all.min.js'></script>
<script>
var ue = UE.getEditor('editor');
</script>
";
$smarty->assign('FCKeditor', $kindeditor);
}
4、修改/admin/templates/pageheader.htm
查找:
{insert_scripts files="../js/transport.js,common.js,../js/utils.js"}
替換為:
<script src="../includes/ueditor/fix_jquery/jquery.min.js"></script>
<script src="../includes/ueditor/fix_jquery/jquery.json-1.3.js"></script>
<script src="js/common.js"></script>
<script src="../includes/ueditor/fix_jquery/transport_json.js"></script>
{insert_scripts files="../js/utils.js"}
5、解決商品編輯中編輯器被重置,uedite無法保存內(nèi)容的bug。
文件:/admin/templates/goods_info.htm
找到:
document.forms['theForm'].reset();
注釋掉:
//document.forms['theForm'].reset();
以上所述就是本文的全部內(nèi)容了,希望大家能夠喜歡。
- ecshop 訂單確認(rèn)中顯示省市地址信息的方法
- php 無限級分類學(xué)習(xí)參考之對ecshop無限級分類的解析 帶詳細(xì)注釋
- 萬網(wǎng)獨(dú)享主機(jī)Apache為Ecshop商城添加404頁面的方法詳解
- 使ecshop模板中可引用常量的實(shí)現(xiàn)方法
- ecshop 批量上傳(加入自定義屬性)
- 比較discuz和ecshop的截取字符串函數(shù)php版
- PHP實(shí)現(xiàn)的交通銀行網(wǎng)銀在線支付接口ECSHOP插件和使用例子
- ecshop實(shí)現(xiàn)smtp發(fā)送郵件
- ECSHOP在PHP5.5及高版本上報(bào)錯(cuò)的解決方法
相關(guān)文章
Win2003+apache+PHP+SqlServer2008 配置生產(chǎn)環(huán)境
因項(xiàng)目的特殊需要,需要用php鏈接sql2008數(shù)據(jù)庫,為此,光這個(gè)環(huán)境問題就折磨了我好久,現(xiàn)在記錄下來過程,分享給大家2014-07-07
使用pthreads實(shí)現(xiàn)真正的PHP多線程(需PHP5.3以上版本)
PHP 5.3 以上版本,使用pthreads PHP擴(kuò)展,可以使PHP真正地支持多線程。多線程在處理重復(fù)性的循環(huán)任務(wù),能夠大大縮短程序執(zhí)行時(shí)間2014-05-05
php實(shí)現(xiàn)圖形顯示Ip地址的代碼及注釋
這篇文章主要介紹了php實(shí)現(xiàn)圖形顯示Ip地址,有需要的朋友可以參考一下2014-01-01
Zend Framework入門知識點(diǎn)小結(jié)
這篇文章主要介紹了Zend Framework入門知識點(diǎn),總結(jié)分析了Zend Framework入門學(xué)習(xí)的知識重點(diǎn),需要的朋友可以參考下2016-03-03
PHP防止post重復(fù)提交數(shù)據(jù)的簡單例子
這篇文章主要介紹了PHP防止post重復(fù)提交數(shù)據(jù)的簡單例子,使用session記錄一個(gè)數(shù)值的方法實(shí)現(xiàn),需要的朋友可以參考下2014-06-06
詳解Laravel設(shè)置多態(tài)關(guān)系模型別名的方式
這篇文章主要介紹了Laravel 中簡單設(shè)置多態(tài)關(guān)系模型別名的方式,需要的朋友可以參考下2019-10-10

