使用kindeditor来替换ecshop的fckeditor编辑器,让ecshop可以批量上传图片
老杨原创
kindeditor此编辑器可以让ecshop批量上传图片,可以插入代码,可以全屏编辑,可以插入地图、视频,进行更多word操作,设置字体。
步骤一:进入kindeditor的官网,http://kindeditor.net/index.php下载最新的编辑器版本,将文件上传到网站includes/目录下,注意,不要有多余的目录,要可以访问到includes/kindeditor/kindeditor-min.js
步骤二:
1、修改admin/includes/lib_main.php
将
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\"]', {//www.lyecs.com
allowFileManager : true,
width : '100%',
height: '300px',
resizeType: 0 //固定宽高
});
});
</script>
<textarea id=\"$input_name\" name=\"$input_name\" style='width:100%;height:300px;'>$input_value</textarea>
<input type=\"submit\" value=\"提交\" />
";
$smarty->assign('FCKeditor', $kindeditor);
}
2、找到
includes/kindeditor/php/upload_json.php
将
//文件保存目录路径
$save_path = $php_path . '../attached/';
//文件保存目录URL
$save_url = $php_url . '../attached/';
//文件保存目录路径www.lyecs.com老杨ecshop二次开发
3、includes/kindeditor/php/file_manager_json.php
3、找到admin/template/goods_info.htm
<input type="button" value="{$lang.button_submit}" class="button" onclick="validate('{$goods.goods_id}')" />
修改为
<input type="submit" value="{$lang.button_submit}" class="button" onclick="validate('{$goods.goods_id}')" />
进后台刷新就可以了
如果上传图片发现没有文件权限,记得进服务器刷一遍777权限。
使用kindeditor来替换ecshop的fckeditor编辑器,让ecshop可以批量上传图片的更多相关文章
- ecshop编辑器FCKeditor修改成KindEditor编辑批量上传图片
ecshop一直使用的编辑器是fck,这个不用多说,相信很多朋友用的很悲剧吧,特别是图片不能批量上传图片. 今天小编就分享一下怎么换掉fck,放上实用的kindeditor,最新ecshop版 ...
- ecshop分类页把分类描述改成FCKeditor编辑器
最近放一个网站 http://www.macklin.cn/productline/35 有个产品分类页面需要添加分类缩略图和图文的描述 一.首先说下添加分类缩略图的步骤吧 1,依葫芦画瓢,参照的是e ...
- 使用Js获取和更改FCKeditor编辑器里的内容
之前在一个系统里使用了FCKeditor编辑器,由于项目需求需要在FCKeditor里添加一个自定义的按钮用于实现自己的需求 主要是在点击该按钮时删除或添加FCKeditor编辑器里的内容 其实是一个 ...
- FCKeditor编辑器第一次点击总是报错(上传图片) 之后就好了
错误: Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index. FCKeditor编辑器第一次点击总是报错(上 ...
- FCKeditor编辑器漏洞
目录 FCKeditor asp网页 aspx网页 php网页 jsp网页 FCKeditor FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的 ...
- ecshop二次开发 使用ecshop电子商务系统的100个小问题
自己从事B4C电子商务开发一段时间了,特别对ecshop深有体会,刚接触的时候不容易理解,下面将根据自己的经验,来总结100条关于操作ecshop电子商务系统的小问题. 1:如何修改网站"欢 ...
- ECSHOP去版权(删除ECSHOP所有标识)
前台部分: 1:去掉头部TITLE部分的ECSHOP演示站 Powered by ecshop前者”ECSHOP演示站”在后台商店设置 – 商店标题修改后者” Powered by ecshop”打开 ...
- 百度编辑器ueditor批量上传图片或者批量上传文件时,文件名称和内容不符合,错位问题
百度编辑器ueditor批量上传附件时,上传后的文件和实际文件名称错误,比如实际是文件名“dongcoder.xls”,上传后可能就成了“懂客.xls”.原因就是,上传文件时是异步上传,同时进行,导致 ...
- 将Ecshop后台fckeditor升级更改为kindeditor 4.1.10编辑器
ecshop在win8部分电脑上,不管用任何浏览器,都打不开,即使升级到最新版本都不行,问题应该吃在fckeditor兼容上.fckeditor 很久未升级,换掉该编辑器是最佳方法 第一步:下载kin ...
随机推荐
- mysql排序索引优化
为排序使用索引 KEY a_b_c (a,b,c) order by 能使用索引最左前缀 -order by a -order by a,b -order by a,b,c -order by a d ...
- data函数参数
date(format,timestamp); 参数 描述 format 必需.规定输出日期字符串的格式.可使用下列字符: d - 一个月中的第几天(从 01 到 31) D - 星期几的文本表示(用 ...
- usb-cam (3)摄像机标定文件-ORB-SLAM标定文件
http://www.luohanjie.com/2017-04-05/the-problem-of-calibration-data-in-orb-slam2.html ORB_SLAM2中标定数据 ...
- zabbix监控nginx连接数量
#!/bin/bash conn=`netstat -n | awk '/^tcp/ {++S[$NF]} END {for(a in S) print a,S[a]}' | grep "E ...
- Ubuntu sudo apt-get 安装下载更新软件包命令详解
sudo apt-get install package 安装软件包sudo apt-get install package - - reinstall 重新安装 ...
- ubuntu 环境下的QT程序打包
很多的时候 需要将自己写的QT 程序发布一下 所以今天教一下 怎么在ubuntu 环境下将自己的写的Qt 程序打包打包是为了不依赖 开发环境 和开发的库. 1. QtCreate使用Release版 ...
- sql实时提交事务
public void deleteByHbtlidAndDept(String class_id,String depart_id) { Session session = this.getHibe ...
- 浅析单点登录,以及不同二级域名下的SSO实现
一家公司有多个产品线,就可能要有多个子域名,下头以baidu域名为例,a.baidu.com, b.baidu.com.com 是顶级域名,baidu 就是一个二级域名,a和b就是子域名. 当用户在a ...
- Mybatis自动生成实体类
Maven自动生成实体类需要的jar包 一.pom.xml中 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns ...
- EZ 2018 05 26 NOIP2018 模拟赛(十六)
这次难道就是传说中的标准分大赛?而且这次比赛的链接不翼而飞了 一堆人153pts然后就有Rank4?看来这个Rank4不值钱了,才涨了50+的Rating. 不过还好最后5min的时候想出了T1正解, ...