Add a discuz-like batch image to Phpcms

Source: Internet
Author: User
Add a discuz-like batch upload image to Phpcms

??? First give everyone a test URL, feel the effect, http://www.qdlspf.com/admin? Account password are aaaaaa, in the content management has a batch upload column, release information, in the Picture that field has batch upload, click will pop up a page, point that upload upload picture, finish point ok, the picture upload finished, then click Load, in the editor will have some "{Picture 1}" A similar character represents a picture, which is the same as the Discuz forum, you click on the uploaded image, the editor will have a corresponding code to represent the image. I do the same, but also deepened a, upload pictures must be displayed, or upload what, simply add a load of the function, loaded at the same time, plus every 6 pairs of images inserted a page break, this feature is definitely individual, in the back I will explain how to modify.

??? After reading the demonstration, we should say the specific steps of modification.

??? First in the model to add PHPCMS default image Batch Upload field, the field named "IMG", he this batch upload is pseudo-upload, we now give him true.

??? Cover all the files below me. Explain the role of each file separately.
?
??? 1.swfupload folder, I do not actually what batch upload, with the people have developed a component, as far as I know, it seems that the world is using this thing in bulk upload pictures or large attachments. The essence of this thing is flash, interested friends can learn under. The files inside are barely moving, just say upload.php. I do not need to know this swfupload the entire operating principle, just need to know the use of a few of the most important files can be. Upload.php is uploaded after the completion, how to deal with the picture, is to rename the picture, put in what directory, such as the operation, in the inside I brought a water-seal class, is now commented out, you can use the comments removed.

??? 2.form.inc.php, this is covered in include/fileds/images/, this is to modify Phpcms original batch upload the field of the image, the corresponding text changed

??? 3.more_pic_up.inc.php, this spread in admin/, this is our point batch upload bounce out of the page, interested friends can beautify.

??? 4.fckeditor.js, this overlay under the fckeditor/, in this file added loading features, search "Image batch loading editor" will see the function I added, there is a number 6, which represents the number of images inserted into a page break
?
??? 5.show.txt, copy the contents, open your Show template, search for "{content}", replace this {content} with that piece of code

??? 6.admin.js, covered under images/js/

??? 7. Refresh the page, update the cache, close the browser, and then update the cache, then you can enjoy the effect of uploading pictures in bulk.

??? There is also a place to add, that is, the location of the paging, although we set the automatic page break, but if the following paging method is selected by default is not paging, it is not the effect of paging, so there is a file, FORM.INC.PHP1, you remove the last 1 characters, cover the include/fileds/pages/, remove the non-pagination and automatic paging, leaving only a manual paging

??? Attachment Download: Image Batch Upload

??? Source: Night near Central web technology

  • 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.