Home>Article>CMS Tutorial> How Discuz develops mobile guest functionality
The functions implemented in this article:
Development tips There is currently no mobile page
The implementation case is the development space visitor function
discuz in The functions of the mobile terminal are really very simple, basically just a few pages. Many functions of the PC terminal are not implemented at all, especially the personal space page. There is almost no operation at all on the mobile terminal. Next, Kaka will record the implementation steps, hoping to help more developers.
We will use the visitor function as a case
When we When this PC address is accessed by the mobile terminal, the following situation will occur, prompting that there is no page on the mobile terminal
Why the same address can be accessed by the PC terminal, but cannot be accessed by the mobile terminal It cannot be accessed. With this question, we came to the project directory.
This is the personal space directory on the PC side
This is all the pages of the personal space on the mobile side. Have you come to your senses at this time? There are only a few pages on the mobile terminal!
Following the information given in the address bar, we started to find the corresponding page home.php?mod=space&uid=1&do=friend&view=visitor&mobile=2
We can know based on the information given in this address bar. The initial program is in home.php and then distributed from home.php. Here we can see mod=space
Then in the last line of the home.php file, we can see that a file is loaded, follow this prompt to continue Find relevant documents.
According to the above prompts, we will come to the file source/module/home/home_space.php. In this price inquiry, we will find the friend module
Then at the end of the file, require_once libfile('space/'.$do, 'include');
## is loaded.
#Following this prompt message, we can find source/include/space/space_friend.php Then around line 86 of the file, you You can see such information, here is the visitor data we needComing to the database
The above is how Discuz develops a guest page that prompts you that the page you are visiting does not have a mobile phone page
The above is the detailed content of How Discuz develops mobile guest functionality. For more information, please follow other related articles on the PHP Chinese website!