Use Kindeditor to replace the Ecshop FCKeditor editor so ecshop can upload pictures in bulk

Source: Internet
Author: User
Tags php download

Lao Yang Original

Kindeditor This editor lets ecshop bulk upload pictures, you can insert code, you can edit in full screen, you can insert maps, videos, do more word operations, set the font.

Step One: Enter Kindeditor's official website, http://kindeditor.net/index.php download the latest editor version, upload the file to the site includes/directory, note, do not have redundant directories, to be able to access to includes/ Kindeditor/kindeditor-min.js

Step Two:

1, modify the admin/includes/lib_main.php

Will

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);
}

Replaced by

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//Fixed width high
});
});
</script>
<textarea id=\ "$input _name\" name=\ "$input _name\" style= "width:100%;height:300px; ' > $input _value</textarea>
<input type=\ "submit\" value=\ "Submit \"/>
";
$smarty->assign (' FCKeditor ', $kindeditor);
}

2. Find

includes/kindeditor/php/upload_json.php

Will
File Save directory path
$save _path = $php _path. ‘.. /attached/';
File Save Directory URL
$save _url = $php _url. ‘.. /attached/';

Replaced by
File save directory path www.lyecs.com Lao Yang Ecshop two times development $save_path = $php _path. ‘.. /.. /.. /images/upload/';//File save directory Url$save_url = $php _url. ‘.. /.. /.. /images/upload/';

3, includes/kindeditor/php/file_manager_json.php

With the//root directory path, you can specify an absolute path, such as/var/www/attached/$root _path = $php _path. ‘.. /attached/';//root directory URL, you can specify an absolute path, such as http://www.yoursite.com/attached/$root _url = $php _path. ‘.. /attached/'; Instead of the root directory path, you can specify an absolute path, such as/var/www/attached/$root _path = $php _path. ‘.. /.. /.. /images/upload/';//root directory URL, you can specify an absolute path, such as http://www.yoursite.com/attached/$root _url = $php _url. ‘.. /.. /.. /images/upload/';

3. Find admin/template/goods_info.htm


<input type= "button" value= "{$lang. Button_submit}" class= "button" onclick= "Validate (' {$goods. goods_id} ')"/>

Revision changed to


<input type= "Submit" value= "{$lang. Button_submit}" class= "button" onclick= "Validate (' {$goods. goods_id} ')"/>

You can refresh it in the background.

If the upload image found no file permissions, remember to go to the server brush 777 permissions.

Use Kindeditor to replace the Ecshop FCKeditor editor so ecshop can upload pictures in bulk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.