Home > Article > CMS Tutorial > How to modify click volume in dedecms
Dedecms method to modify clicks: 1. Run the "UPDATE dede_archives SET click..." statement in the database; 2. Open the "\plus\count.php" file and modify the content to "UPDATE `{ $maintable}` SET click=click $rand_num WHERE {$idtype}='$aid'".
The operating environment of this tutorial: Windows 10 system, DedeCMS version 5.7, Dell G3 computer.
dedecmsHow to modify the click volume?
Dreamweaver cms batches modify the clicks of articles
The clicks of Dreamweaver cms documents are maintained in batches. For example, the clicks of collected articles are all 0 and need to be modified in batches. The following methods can be used.
1. Just run the following code in the database. The number of clicks on the article will randomly increase from 500 to 1000.
UPDATE dede_archives SET click=FLOOR(500 + (RAND() * 1000)) WHERE click=0 AND id BETWEEN 1 AND 9999
2. Of course, you can also randomly increase the number of clicks when browsing the article.
Every time the dedecms website is refreshed, the number of clicks (views) increases by 1. So how can it be randomly increased by 1-50 times by refreshing it once?
Modify: \plus\count.php file
Found:
if(!empty($maintable)) { $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+1 WHERE {$idtype}='$aid' "); }
Modify to:
if(!empty($maintable)) { $rand_num = rand(1,50); $dsql->ExecuteNoneQuery(" UPDATE `{$maintable}` SET click=click+$rand_num WHERE {$idtype}='$aid' "); }
Recommended learning: dedecms tutorial
The above is the detailed content of How to modify click volume in dedecms. For more information, please follow other related articles on the PHP Chinese website!