时间:2014-01-26所属栏目: ecshop教程 来源: 热度:
ECSHOP一向用的FCK,这个不表明,太多杯具太多纠结。
也发明许多伴侣提出怎样换一个利便的编辑器,馒头在这里就分享一下怎么换掉悲剧的FCK,要领如下
1. 官网下载最新版kindeditor-4.1.5.zip http://www.kindsoft.net/down.php
百度网盘备用下载地点:http://pan.baidu.com/share/link?shareid=471388&uk=2047702797
2.解压kindeditor 将其复制到 includes目次下 文件夹名称定名为 kindeditor
3.打开admin/includes/lib_main.php,查找 function create_html_editor(
将以下内容
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);
}
替代为
function create_html_editor($input_name, $input_value = '')
{
global $smarty;
$kindeditor="<script charset='utf-8' src='../includes/kindeditor/kindeditor-min.js'></script>
<script>
var editor;
KindEditor.ready(function(K) {
editor = K.create('textarea[name=\"$input_name\"]', {
allowFileManager : true,
width : '700px',
height: '300px',
resizeType: 0 //牢靠宽高
});
});
</script>
<textarea id=\"$input_name\" name=\"$input_name\" style='width:700px;height:300px;'>$input_value</textarea>
<input type=\"submit\" value=\"提交\" />
";
$smarty->assign('FCKeditor', $kindeditor);
}
5. 上传目次修改includes/kindeditor/php/upload_json.php如下:
//文件生涯目次路径
$save_path = $php_path . '../../../images/upload/';
//文件生涯目次URL
$save_url = $php_url . '../../../images/upload/';
6.赏识处事器路径修改includes/kindeditor/php/file_manager_json.php如下:
//根目次路径,可以指定绝对路径,好比 /var/www/attached/
$root_path = $php_path . '../../../images/upload/';
//根目次URL,可以指定绝对路径,好比 http://www.yoursite.com/attached/
$root_url = $php_url . '../../../images/upload/';
ps:此要领合用于2.7.1、2.7.2,假如要在2.7.3中行使,请将admin/templates/goods_info.htm 文件用2.7.2可能2.7.1中的包围
2.7.2版goods_info.htm :
http://pan.baidu.com/share/link?shareid=471391&uk=2047702797
好了,到这里就替代完成了,去靠山宣布商品-商品详情看看结果吧!
如下:
