Dream weaving changed the publication time of the article to the review time

When we publish articles with weaving dreams, we publish many articles at once. Sometimes we may need to weave dreams to review articles regularly , so that we can continuously update articles every day to facilitate seo optimization, but the publication time of articles is the same, so what should we do? How about weaving dreams and changing the publication time of the article to the review time?

Dream weaving changed the publication time of the article to the review time

1. Find the dede/archives_do.php file

2. Find the following code

/*--------------------------
//审核文档
function checkArchives() {   }
---------------------------*/
else if($dopost=="checkArchives")
{
    CheckPurview('a_Check,a_AccCheck,sys_ArcBatch');
    require_once(DEDEADMIN."/inc/inc_archives_functions.php");
    if( !empty($aid) && empty($qstr) ) $qstr = $aid;
    if($qstr=='')
    {
        ShowMsg("参数无效!",$ENV_GOBACK_URL);
        exit();
    }
    $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr));
    $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc
               LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
            LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype
            WHERE arc.id in($arcids) ";
    $dsql->SetQuery($query);
    $dsql->Execute('ckall');
    while($row = $dsql->GetArray('ckall'))
    {
        $aid = $row['id'];
        $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) );
        $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' ");
        if($row['issystem']==-1)
        {
            $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' ");
        }
        else
        {
            $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' ");
        }
        $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET arcrank='0' WHERE aid='$aid' "); 
        $pageurl = MakeArt($aid,false);
    }
    ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
    exit();
}
/*--------------------------
//删除文档
function delArchives(){ }
---------------------------*/

 

3. Replace the above code with the following code.

/*--------------------------
//审核文档
function checkArchives() {   }
---------------------------*/
else if($dopost=="checkArchives")
{
    CheckPurview('a_Check,a_AccCheck,sys_ArcBatch');
    require_once(DEDEADMIN."/inc/inc_archives_functions.php");
    if( !empty($aid) && empty($qstr) ) $qstr = $aid;
    if($qstr=='')
    {
        ShowMsg("参数无效!",$ENV_GOBACK_URL);
        exit();
    }
    $arcids = preg_replace("#[^0-9,]#", '', preg_replace("#`#", ',', $qstr));
    $query = "SELECT arc.id,arc.typeid,ch.issystem,ch.maintable,ch.addtable FROM `#@__arctiny` arc
               LEFT JOIN `#@__arctype` tp ON tp.id=arc.typeid
            LEFT JOIN `#@__channeltype` ch ON ch.id=tp.channeltype
            WHERE arc.id in($arcids) ";
    $dsql->SetQuery($query);
    $dsql->Execute('ckall');
    $uptimes=time();
    while($row = $dsql->GetArray('ckall'))
    {
        $aid = $row['id'];
        $maintable = ( trim($row['maintable'])=='' ? '#@__archives' : trim($row['maintable']) );
        $dsql->ExecuteNoneQuery("UPDATE `#@__arctiny` SET arcrank='0' WHERE id='$aid' ");
        if($row['issystem']==-1)
        {
            $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET pubdate='$uptimes',senddate='$uptimes',sortrank='$uptimes',arcrank='0' WHERE aid='$aid' ");
        }
        else
        {
            $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET pubdate='$uptimes',senddate='$uptimes',sortrank='$uptimes',arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' ");
        }
        $dsql->ExecuteNoneQuery("UPDATE `#@__taglist` SET pubdate='$uptimes',senddate='$uptimes',sortrank='$uptimes',arcrank='0' WHERE aid='$aid' "); 
        $pageurl = MakeArt($aid,false);
    }
    ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
    exit();
}
/*--------------------------
//删除文档
function delArchives(){ }
---------------------------*/

 

Guess you like

Origin blog.csdn.net/qq_39339179/article/details/113177002