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

View: 14354|Reply: 0

[Program beautification] Discuz is simply set up to keep your personal space out of visitor and spider access

[Copy link]
Posted on 1/3/2018 2:22:38 PM | | |
1. Why should personal spaces be prohibited from being visited by tourists and spiders?


Discuz's personal space feature usage is very low, and it doesn't remove these dross features and allows users to focus on the forum itself. In addition, each user of the discuz forum will generate a corresponding personal space, because the utilization rate of the space is extremely low, so there will be a large number of duplicate low-quality pages, which is also not conducive to SEO, and some users will fill in some URLs or advertising content in their personal information, many webmasters do not have the energy to review these contents, and many tools that collect user data will also use this page.


2. Difficulties


I found some information on the Internet, and although the website background - > global> space settings-> privacy settings can be set, it is found that it is actually useless, and tourists can still access it.


Click on the [Theme] of the personal space, but find that it prompts you to log in to browse, so I analyzed the source code and found that I only need to modify the permissions of the space homepage in the file to achieve it, and directly upload the code.


Since the PHP file has been modified, it will affect future upgrades, please think twice before setting it.


3. Modify the document


Find /source/module/home/home_space.php


Will:


Replace with:

In this way, the space needs to be logged in before it can be viewed.





Previous:The newcomer arrives, please take care of it
Next:Beyond Compare 4 Unlimited 30-day trial
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