This article is a mirror article of machine translation, please click here to jump to the original article.

View: 11795|Reply: 1

[Webmaster Communication] Discuz(DZ) sets the post code login to be visible

[Copy link]
Posted on 5/31/2020 3:23:54 PM | | | |
This site is a website built based on discuz, a new demand function, users need to log in to see the code of the post, and tourists prompt the "log in to view the post code" function.

Non-logged-in users:



After the user logs in:


The display of the post code is the discuzcode method that calls the /source/function/function_discuzcode.php file, and the discuzcode method calls the codedisp method to convert the code into html code display, so we only need to modify the codedisp method.

Determine whether the user is logged in and whether the post topic is currently called.

The code is as follows:








Previous:Azure DevOps 2020 (1) First Introduction to Microsoft Azure DevOps (TFS)
Next:Copyright: Removing DMCA-protected content from Google search results
 Landlord| Posted on 6/3/2023 7:55:49 PM |
The code reply is visible:

Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com