ecshop后臺(tái)編輯器替換成ueditor編輯器_PHP教程
推薦:laravel容器延遲加載以及auth擴(kuò)展詳解昨天按照手冊(cè)教程,動(dòng)手寫一個(gè)Auth擴(kuò)展,按照包獨(dú)立性的原則,我不希望將Auth::extend()這種方法寫在 start.php 中,毫無疑問,我選擇了在服務(wù)提供器register()方法中注冊(cè)擴(kuò)展驅(qū)動(dòng)。然而,事與愿違 發(fā)現(xiàn)問題 當(dāng)我在 LoauthServiceProvider 中這樣寫的時(shí)候: 代碼如下: p
這篇文章主要介紹了ecshop后臺(tái)編輯器替換成ueditor編輯器的詳細(xì)過程,這里推薦給有相同需求的小伙伴們。
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();
以上所述就是本文的全部?jī)?nèi)容了,希望大家能夠喜歡。
分享:laravel安裝zend opcache加速器教程以文章頁(yè)為例,通過chrome抓包,waiting的時(shí)間達(dá)到147ms,實(shí)際上未作緩存優(yōu)化前,這個(gè)頁(yè)面大概有4條sql語句,速度也只是152ms左右,差別不大,所以我決定安裝zend opcache加速php。 當(dāng)我在服務(wù)器上安裝了zend opcache后,再測(cè)試,waiting已經(jīng)下降到68ms,效果明顯。 so
- laravel容器延遲加載以及auth擴(kuò)展詳解
- laravel安裝zend opcache加速器教程
- 分享一個(gè)Laravel好用的Cache宏
- php解析http獲取的json字符串變量總是空白null
- laravel 5 實(shí)現(xiàn)模板主題功能(續(xù))
- laravel 5 實(shí)現(xiàn)模板主題功能
- Opcache導(dǎo)致php-fpm崩潰nginx返回502
- 使用GDB調(diào)試PHP代碼,解決PHP代碼死循環(huán)問題
- Laravel5中contracts詳解
- php打印一個(gè)邊長(zhǎng)為N的實(shí)心和空心菱型的方法
- 初識(shí)laravel5
- 避免Smarty與CSS語法沖突的方法
PHP教程Rss訂閱編程教程搜索
PHP教程推薦
- 用PHP與XML聯(lián)手進(jìn)行網(wǎng)站開發(fā)
- 實(shí)現(xiàn)dedecms圖集單擊圖片翻頁(yè)的功能
- 關(guān)于php 接口問題(php接口主要也就是運(yùn)用curl,curl函數(shù))
- 解答網(wǎng)頁(yè)中PHP腳本中include文件報(bào)錯(cuò)的方法
- php 中序列化和json使用介紹
- vim下高亮顯示php代碼
- php中瀏覽器關(guān)閉后,能繼續(xù)執(zhí)行的函數(shù)
- php變量作用域的深入解析
- 詳細(xì)講解PHP的Jmai組件及發(fā)送郵件實(shí)例
- PHP仿博客園個(gè)人博客數(shù)據(jù)庫(kù)與界面設(shè)計(jì)
- 相關(guān)鏈接:
- 教程說明:
PHP教程-ecshop后臺(tái)編輯器替換成ueditor編輯器
。