Home > CMS Tutorial > DEDECMS > How does the Dream Weaver system prohibit dynamic browsing of unaudited documents?

How does the Dream Weaver system prohibit dynamic browsing of unaudited documents?

angryTom
Release: 2019-11-09 13:54:39
Original
1923 people have browsed it

How does the Dream Weaver system prohibit dynamic browsing of unaudited documents?

How does the Dreamweaver system prohibit dynamic browsing of unaudited documents

Dreamweaver DedeCms is released by members by default Unreviewed documents can be browsed dynamically (/plus/view.php?aid=xxx). After submission, you can browse dynamically, and Baidu will also include it normally.

The default method of the Dedecms system will undoubtedly bring about many minor problems, such as:

1. Users submit a large number of junk documents and are included, resulting in a decrease in site authority;

2. It brings great inconvenience to the daily management and maintenance of the webmaster/administrator;

3. It brings a bad access experience to front-end users;

4 , other unimaginable situations, etc.;

We can modify the code to achieve the following effects: When a user-submitted document is in a pending review state, only the submitting user or administrator can view it, and other users None can be viewed.

1) Modification method

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

//检查阅读权限  
$needMoney = $arc->Fields['money'];
$needRank = $arc->Fields['arcrank'];
Copy after login

Add the following code to the next line:

$mid = $arc->Fields['mid'];  
if(($cfg_ml->M_Rank < 1 || $mid <> $cfg_ml->M_ID) && $needRank == -1){
    showMsg("你无查看权限",-1);  
    exit();
}
Copy after login

Save and close.

2) Effect preview

How does the Dream Weaver system prohibit dynamic browsing of unaudited documents?

Recommended tutorial: dedecms tutorial

The above is the detailed content of How does the Dream Weaver system prohibit dynamic browsing of unaudited documents?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template