老杨原创

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二次开发
$save_path = $php_path . '../../../images/upload/';
//文件保存目录URL
$save_url = $php_url . '../../../images/upload/';

3、includes/kindeditor/php/file_manager_json.php

 
//根目录路径,可以指定绝对路径,比如 /var/www/attached/
$root_path = $php_path . '../attached/';
//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/
$root_url = $php_path . '../attached/';
 
改为:
 
//根目录路径,可以指定绝对路径,比如 /var/www/attached/
$root_path = $php_path . '../../../images/upload/';
//根目录URL,可以指定绝对路径,比如 http://www.yoursite.com/attached/
$root_url = $php_url . '../../../images/upload/';

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可以批量上传图片的更多相关文章

  1. ecshop编辑器FCKeditor修改成KindEditor编辑批量上传图片

    ecshop一直使用的编辑器是fck,这个不用多说,相信很多朋友用的很悲剧吧,特别是图片不能批量上传图片.     今天小编就分享一下怎么换掉fck,放上实用的kindeditor,最新ecshop版 ...

  2. ecshop分类页把分类描述改成FCKeditor编辑器

    最近放一个网站 http://www.macklin.cn/productline/35 有个产品分类页面需要添加分类缩略图和图文的描述 一.首先说下添加分类缩略图的步骤吧 1,依葫芦画瓢,参照的是e ...

  3. 使用Js获取和更改FCKeditor编辑器里的内容

    之前在一个系统里使用了FCKeditor编辑器,由于项目需求需要在FCKeditor里添加一个自定义的按钮用于实现自己的需求 主要是在点击该按钮时删除或添加FCKeditor编辑器里的内容 其实是一个 ...

  4. FCKeditor编辑器第一次点击总是报错(上传图片) 之后就好了

    错误:   Failed to execute 'getRangeAt' on 'Selection': 0 is not a valid index. FCKeditor编辑器第一次点击总是报错(上 ...

  5. FCKeditor编辑器漏洞

    目录 FCKeditor asp网页 aspx网页 php网页 jsp网页 FCKeditor FCKeditor是一个功能强大支持所见即所得功能的文本编辑器,可以为用户提供微软office软件一样的 ...

  6. ecshop二次开发 使用ecshop电子商务系统的100个小问题

    自己从事B4C电子商务开发一段时间了,特别对ecshop深有体会,刚接触的时候不容易理解,下面将根据自己的经验,来总结100条关于操作ecshop电子商务系统的小问题. 1:如何修改网站"欢 ...

  7. ECSHOP去版权(删除ECSHOP所有标识)

    前台部分: 1:去掉头部TITLE部分的ECSHOP演示站 Powered by ecshop前者”ECSHOP演示站”在后台商店设置 – 商店标题修改后者” Powered by ecshop”打开 ...

  8. 百度编辑器ueditor批量上传图片或者批量上传文件时,文件名称和内容不符合,错位问题

    百度编辑器ueditor批量上传附件时,上传后的文件和实际文件名称错误,比如实际是文件名“dongcoder.xls”,上传后可能就成了“懂客.xls”.原因就是,上传文件时是异步上传,同时进行,导致 ...

  9. 将Ecshop后台fckeditor升级更改为kindeditor 4.1.10编辑器

    ecshop在win8部分电脑上,不管用任何浏览器,都打不开,即使升级到最新版本都不行,问题应该吃在fckeditor兼容上.fckeditor 很久未升级,换掉该编辑器是最佳方法 第一步:下载kin ...

随机推荐

  1. 1115 洛谷luogu最大子段和

    题目描述 给出一段序列,选出其中连续且非空的一段使得这段和最大. 输入输出格式 输入格式: 第一行是一个正整数NNN,表示了序列的长度. 第二行包含NNN个绝对值不大于100001000010000的 ...

  2. Windows线程的多任务处理

  3. <<linux device driver,third edition>> Chapter 4:Debugging Techniques

    Debugging by Printing printk lets you classify messages accoring to their severity by associating di ...

  4. docker被入侵后.............

    服务器上线后,怎么发现总有个 xmrig 的容器在跑,删了还出来 那么恭喜你!!你的服务器已经被入侵了!! $ docker ps IMAGE               COMMAND       ...

  5. 安装Drush工具 -Centos

    Drush可以说是Drupal的瑞士***,只要你使用过一段时间的Drush,一但没有它的话,你会觉得很不方便.可如果通过我在前面博文中所讲的方法来安装Drush的话,是不能够支持Drupal8的,所 ...

  6. php的foreach中使用取地址符,注意释放

    先来举个例子: <?php $array = array(1, 2, 3); foreach ($array as &$value) {} // unset($value); forea ...

  7. 实现Repeater控件的记录单选(二)

    前一篇<实现Repeater控件的记录单选>http://www.cnblogs.com/insus/p/7426334.html 虽然可以实现对Repeater控件的记录进行单选,但是, ...

  8. (转)PostgreSQL pg_dump&psql 数据的备份与恢复

    转自:https://www.cnblogs.com/chjbbs/p/6480687.html Usage:   pg_dump [OPTION]... [DBNAME] 数据库名放最后,不指定默认 ...

  9. 在VS2017上使用C#调用非托管C++生成的DLL文件(图文讲解)

    原文:在VS2010上使用C#调用非托管C++生成的DLL文件(图文讲解) 背景 在项目过程中,有时候你需要调用非C#编写的DLL文件,尤其在使用一些第三方通讯组件的时候,通过C#来开发应用软件时,就 ...

  10. ListView 控件和 INotifyPropertyChanged 接口

    原文:ListView 控件和 INotifyPropertyChanged 接口 ListView 控件和 DataGridView 控件 ListView 是跟 Winform 中 DataGri ...