V9 Switch Ueditor after the image upload path problem changed to absolute path

Source: Internet
Author: User

After switching to the Ueditor editor using V9, the image upload path shows a relative path, which synchronizes the path of the first picture of the content field to the Thumb field of the thumbnail. If the Thumb field is a relative path, the front end cannot be clipped, and the app or other app cannot be called.

Then modify.

I'm using 1.4.3 version

Locate the/php/uploader.class.php file under the editor directory.

Find the GetFileInfo () method and modify it to the following code

    public function getfileinfo ()     {$dangqian _host =   ' http://' $_server[' Http_host '];        return array (              "state"  =>  $this->stateinfo,              "url"  =>  $dangqian _host.$ this->fullname,             "title"  =>   $this->filename,             "original"  =>  $this->oriname,             " Type " =>  $this->filetype,              "Size"  =>  $this->filesize        );     }


is to obtain the file information, the URL is added to the domain name + file path. This becomes the absolute path.

The Thumb function in the new PHPCMS has already supported scaling thumbnails. {Thumb ($r [thumb],300,0)} set either width or height to 0 as required.


Switch editors can refer to this tutorial: http://bbs.phpcms.cn/thread-882637-1-1.html

V9 Switch Ueditor after the image upload path problem changed to absolute path

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.