当前位置:网站首页>How to solve the problem of automatically updating the click times of weaving dream article list

How to solve the problem of automatically updating the click times of weaving dream article list

2022-06-21 21:16:00 Mimi material network

Article dynamic views <script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' language="javascript"></script>

This article introduces you how to DEDECMS In our website , When browsing articles , Automatically increase the number of clicks ; When the list of articles is displayed , Then only the hits will be displayed ( Do not increase the number of clicks ) Implementation method .

First step : open /plus/count.php file , Will be the first 36 Line default code if(!empty($maintable)) Change to the following code :

if(!empty($maintable) and $view=='yes')

The second step : Open the template article list page list_article.htm, Where you want to display the number of views , Add the following code :

<script src="/plus/count.php?view=no&aid=[field:id/]&mid=[field:mid/]" type='text/javascript' language="javascript"></script>

The third step : Open template article page article_article.htm, Where you want to display the number of views , Add the following code :

<script src="{dede:field name='phpurl'/}/count.php?view=yes&aid={dede:field name='id'/}&mid={dede:field name='mid'/}" type='text/javascript' 
language="javascript"></script>
原网站

版权声明
本文为[Mimi material network]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/172/202206211932554330.html