Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of forbidding dynamic browsing of unaudited documents in Dream Weaving system

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article is about how the dream weaving system implements a method to prohibit dynamic browsing of unaudited documents. The editor thought it was very practical, so I shared it with you as a reference. Let's follow the editor and have a look.

How to realize dynamic browsing of unaudited documents in dream weaving system

Dream weaving DedeCms by default, unaudited documents published by members can be viewed dynamically (/ plus/view.php?aid=xxx), and can be dynamically browsed after contribution, and Baidu will be included normally.

The default method of dream weaving Dedecms system will undoubtedly bring a lot of minor problems, such as:

1. Users contribute a large number of junk documents, resulting in a decline in the permissions of the site.

2. there is great inconvenience to the daily management and maintenance of webmaster / administrator

3. Bring bad access experience to the front desk users.

4. Other unimaginable situations, etc.

We can modify the code to achieve the following effect: when the user's contribution document is in the status of waiting for review, only the user or administrator can view it, and no other users can view it.

1) modify the method

Edit the open / plus/view.php file (note: this file is a dynamic browsing file for the document) and find the following code:

/ / check the reading permissions $needMoney = $arc- > Fields ['money']; $needRank = $arc- > Fields [' arcrank']

Add the following code on the following line:

$mid = $arc- > Fields ['mid']; if ($cfg_ml- > M_Rank

< 1 || $mid $cfg_ml->

M_ID) & & $needRank = =-1) {showMsg ("you don't have permission to view",-1); exit ();}

Just save and close.

2) Preview the effect

Thank you for reading! On the dream weaving system to achieve unaudited documents to prohibit dynamic browsing methods to share here, I hope the above content can be of some help to you, so that you can learn more knowledge. If you think the article is good, you can share it and let more people see it.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report