最近访客
百度未收录

DedeCMS采集文章的审核时间同步文章发布时间

不知道你有没有发现,当你采集了很多文章,过几天再来审核的时候,审核的文章发布时间,还是采集导入的时间。其实DedeCMS可以把审核时间同步到文章的发布时间。

打开织梦后台目录,默认为dede,找到文件archives_do.php。修改之前,请记得先备份,然后打开文件找到如下代码:

$maintable = ( trim($row['maintable'])=='' ? 'dede_archives' : trim($row['maintable']) );
$dsql->ExecuteNoneQuery("Update `dede_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' ");
}
$pageurl = MakeArt($aid,false);

将以上代码替换为:

$maintable = ( trim($row['maintable'])=='' ? 'dede_archives' : trim($row['maintable']) );
$newdate = time();
$dsql->ExecuteNoneQuery("Update `dede_arctiny` set pubdate='$newdate',sortrank='$newdate',senddate='$newdate',arcrank='0' where id='$aid' ");
if($row['issystem']==-1)

$dsql->ExecuteNoneQuery("Update `".trim($row['addtable'])."` set pubdate='$newdate',sortrank='$newdate',senddate='$newdate',arcrank='0' where aid='$aid' ");
}
else

$dsql->ExecuteNoneQuery("Update `$maintable` set pubdate='$newdate',sortrank='$newdate',senddate='$newdate',arcrank='0' where id='$aid' ");
}
$pageurl = MakeArt($aid,false);

好了,当你再次审核文章时,审核的文章发布时间就会变成当前审核时间。

温馨提示: 本文最后更新于2022/10/20 02:37:51。若文章内容或图片失效,请 留言联系站长反馈!
!
也想出现在这里? 联系我们
创意广告
© 版权声明
THE END
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容