search
HomeCMS TutorialDiscuzHow does Discuz support large file uploads? (Plug-in sharing)

This article will share with you the plug-in that enables Discuz to support large file uploads. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to everyone.

How does Discuz support large file uploads? (Plug-in sharing)

Related recommendations: "discuz Tutorial"

Easily let Discuz support 500M large file uploads in 5 steps

The demo version is discuz-x3.4

Before using this plug-in, please confirm that Discuz has been installed successfully, and thenback up! Back up! Back up! data/template/1_1_forum_post.tpl.php file

Start modifying

  • Step 1

Find the websitedata/template/1_1_forum_post.tpl.php file and open the file

In order to facilitate modification, it is recommended to use a text editing tool to modify, such as Notepad2,

Download address: http:// file.yiyuen.com/file/download/7235

  • Step 2

By searching for the keyword "Upload attachment", locate approximately 976 lines,

and then start a new line after the line and insert the following code

<li id="<?php echo $editorid; ?>_btn_bigupload"><a href="javascript:;" hidefocus="true" οnclick="switchAttachbutton(&#39;bigupload&#39;);">
大文件上传
</a></li>

The final result is as follows:

  • Step 3

Continue to search for the keyword "$_G['setting']['pluginhooks']['post_attach_tab_extra" and locate approximately 1064 lines

Then start a new line after the

and insert the following code

##

<p class="p_opt post_tablelist" unselectable="on" id="<?php echo $editorid; ?>_bigupload" style="display: none;">
<script id="j_yyFileUpload" src="https://www.yiyuen.com/assets/file/api/for-discuz-x3.4-v1.0.js?t=20191212" async></script>
</p>

The final effect is as follows:

  • Step 4

Save the file and complete the modification

  • Step 5

Verify whether the modification is successful

Create any post or reply operation, enter advanced mode, click the "

Attachment" button, the upload window will pop up, confirm that there is the option of "Large file upload"

Select a local file and try to upload it

After the upload is successful, the file name and link will be automatically inserted into the editing window

Save the submission, and then go to the front desk to view it

When you see the above effect, click the link and automatically jump to the Yiyun file download page

Finish.

Modified php file

http://file.yiyuen.com/file/download/17631

More For programming related knowledge, please visit: programming video! !

The above is the detailed content of How does Discuz support large file uploads? (Plug-in sharing). For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:csdn. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Will R.E.P.O. Have Crossplay?
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.