Ecshop integrated Baidu Ueditor editor upload images to the server or pat the Cloud (seven Qiniu)

Source: Internet
Author: User

1. Open admin/includes/lib_main.php File
Found: (about 306-323 rows or so)

/** * Generate editor * @param string input_name input Box name * @param string input_value input box value*/functionCreate_html_editor ($input _name,$input _value= ' '){Global $smarty;$editor=NewFCKeditor ($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);}

Modify this code to:

/** * Generate editor * @param string input_name input Box name * @param string input_value input box value*/functionCreate_html_editor ($input _name,$input _value= ' '){Global $smarty;/*MoD by Wengwenjin Baidu Editor begin*/$HTML=<script type= "Text/javascript" charset= "Utf-8" src= ". /includes/ueditor/ueditor.config.js "></script><script type=" Text/javascript "charset=" Utf-8 "src=" ... /includes/ueditor/ueditor.all.js "></script><textarea name="‘.$input _name. ' "Id=".$input _name. ' "style=" width:100%; " > '.$input _value.‘</textarea><script type= "Text/javascript" >ue.geteditor ("‘.$input _name.‘", {theme:" Default ",//Skin lang:" ZH-CN ",//Language initialframewidth:680,//Initialize editor width, default 650initialframeheight:180// Initialize editor height, default;</script>})‘;$smarty->assign (' FCKeditor ',$HTML);/*MoD by Wengwenjin Baidu Editor End*/}

2. Copy the admin/js/jquery.js,admin/js/jquery.json.js,admin/js/selectzone_bd.js,admin/js/transport_bd.js to the corresponding directory of your website

3. Copy an admin/templates/pageheader.htm, name it pageheader_bd.htm file, and open the file
Found it:

{insert_scripts files= ". /js/transport.js,common.js "}

Modify this code to:

<!--mod by Wengwenjin Baidu Editor Begin-and{insert_scripts files= "Jquery.js,jquery.json.js,transport_bd.js, Common.js "}end --

4. Open admin/templates/article_info.htm File
Found it:

{includefile= "pageheader.htm"}{insert_scripts files= ". /js/utils.js,selectzone.js,validator.js "}

Modify this code to:

<!--mod by Wengwenjin Baidu Editor Begin--{includefile= "pageheader_bd.htm"}{insert_ Scripts Files= ".. /js/utils.js,selectzone_bd.js,validator.js "}end --

5. Open admin/templates/goods_info.htm File
Found it:

{includefile= "pageheader.htm"}{insert_scripts files= ". /js/utils.js,selectzone.js,colorselector.js "}

Modify this code to:

<!--mod by Wengwenjin Baidu Editor Begin--{includefile= "pageheader_bd.htm"}{insert_ Scripts Files= ".. /js/utils.js,selectzone_bd.js,colorselector.js "}end --

6. Open admin/templates/topic_edit.htm File
Found it:

{includefile= "pageheader.htm"}{insert_scripts files= ". /js/utils.js,selectzone.js,colorselector_topic.js "}


Modify this code to:

<!--mod by Wengwenjin Baidu Editor Begin--{includefile= "pageheader_bd.htm"}{insert_ Scripts Files= ".. /js/utils.js,selectzone_bd.js,colorselector_topic.js "}end --

7. Open admin/article.php File
(1) Find: (about 20 rows or so)

require_once (Root_path. "includes/fckeditor/fckeditor.php");

This code is modified to:

/**//require_once (Root_path. "includes/fckeditor/fckeditor.php"); /* */

(2) Find: (about 207 rows or so)

Create_html_editor (' FCKeditor1 ',$article[' content ']);

Modify this code to:

Create_html_editor (' FCKeditor1 ',htmlspecialchars($article*/**

8. Open admin/goods.php File
(1) Find: (about 107 rows or so)

include_once // contains the HTML editor class file

Modify this code to:

/**//include_once (Root_path. ' includes/fckeditor/fckeditor.php '); Contains the HTML editor class file / ** *

(2) Find: (about 414 rows or so)

$goods [' Goods_desc ']);


Modify this code to:

Htmlspecialchars ($goods/** *

9. Open admin/magazine_list.php File
(1) Find: (about 61 rows or so, the first occurrence of the place)

include_once // contains the HTML editor class file

Modify this code to:

/**//include_once (Root_path. ') Includes/fckeditor/fckeditor.php '); Contains the HTML editor class file / ** *

(2) Find: (about 83 rows or so, the second occurrence of the place)

include_once // contains the HTML editor class file


Modify this code to:

/**//include_once (Root_path. ') Includes/fckeditor/fckeditor.php '); Contains the HTML editor class file / ** *

(3) Find: (about 91 rows or so)

$rt [' template_content ']);


Modify this code to:

Htmlspecialchars ($rt/** *

10. Open admin/topic.php File
(1) Find: (about 75 rows or so)

include_once // contains the HTML editor class file


Modify this code to:

/**//include_once (Root_path. ') Includes/fckeditor/fckeditor.php '); Contains the HTML editor class file / ** *

(2) Find: (about 102 rows or so)

$topic [' intro ']);


Modify this code to:

Htmlspecialchars ($topic/** *

11. Copy the entire Ueditor folder to the includes folder in the root directory of your website

Link: http://pan.baidu.com/s/1kt7j3tx Password: nu4i

Ecshop integrated Baidu Ueditor editor upload images to the server or pat the Cloud (seven Qiniu)

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.