home page Site building tutorial Zblog website establishment text

How zblogPHP modifies article reading

Many websites have a relatively small number of visitors, especially for new websites. Sometimes the number of articles published has not been up for a few days, and even remains in the single digits. It seems inevitable that there will be some embarrassment. How can we break this embarrassment? Can the reading of zblog PHP articles be modified? The answer is yes, and it is not too troublesome to modify it. Regular users of zblog know that the tag of the number of views of zblog PHP articles is $article ViewNums, So we just need to add a base number to this number, such as 10

Many websites have a relatively small number of visitors, especially for new websites. Sometimes the number of articles published has not been up for a few days, and even remains in the single digits. It seems inevitable that there will be some embarrassment. How can we break this embarrassment? zblogphp Can the reading amount of articles be modified? The answer is yes, and it is not too troublesome to modify it.

commonly zblog 's old users know zblogPHP The tag of article views is $article ViewNums, So we only need to add a base number to this number, such as 1000, then the site front end The displayed browsing volume will become 1000+$article ViewNums (actual number of the database), for example, 1000+20 (actual number of the database)=1020. The final front page displays 1020 views, and 20 is the actual number of the database.

Two modification methods are provided here. The specific modification methods are as follows:

Multi sidebar with beautiful three columns We Media Theme For columns, open the zb_users theme umZmt template post-single.php file and find the following code:

 {$article.ViewNums} views

1. Increase the fixed base

Modify to

 {intval(1000+$article.ViewNums)} views

The above number 1000 means that 1000 views are added to the actual data. Of course, an integer like 1000 looks obvious, so you can change it to 1238666, and wait for a random number, so that it looks less obvious.

2. Randomly increase the amount of reading

 {intval(rand(300,999)+$article.ViewNums)} views

If you use randomization, it will change every time you refresh. Users will feel strange, so it is recommended not to use randomization.

Note that the above is only to modify the article details page. The whole website should be modified synchronously in terms of reading volume, such as the home page and list page. The method of modification is the same. After the modification, the cache can be cleared in the background.

Reward
poster

Statement: Some of the resources on this site are original works on the site, and some are publicly shared and collated based on the Internet. The copyright belongs to the original author.
If it infringes your rights, please contact our website, and we will deal with it as soon as possible. Thank you. Please indicate the source of the transfer

Link to this article: https://www.umtheme.com/zblog/158.html

Related recommendations

 The list of zblog custom categories is sorted by browsing volume, comments, update time, ID or author

The list of zblog custom categories is sorted by browsing volume, comments, update time, ID or author

ZBLOG provides rich interfaces to facilitate the personalized customization of webmasters, so it is easy to reorder articles. For example, it may be necessary to adjust the default sorting of the system during the development and production process (the latest one is first), so that the list of articles under a certain category on its website is based on the specified (browse volume
Zblog website establishment 2022.10.16 zero three thousand two hundred and eighty-four
Post comments

Thank you for your support