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.

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('bigupload');"> 大文件上传 </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
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"





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!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

Dreamweaver CS6
Visual web development tools

Atom editor mac version download
The most popular open source editor

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





