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