Home  >  Article  >  CMS Tutorial  >  How to modify click volume in dedecms

How to modify click volume in dedecms

藏色散人
藏色散人Original
2023-02-24 09:38:522169browse

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

How to modify click volume in dedecms

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn