您的位置 首页 CMS系统

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’,arcrank=’0′ where aid=’$aid’ “);
}
else
{
$dsql->ExecuteNoneQuery(“Update `$maintable` set pubdate=’$newdate’,arcrank=’0′ where id=’$aid’ “);
}
$pageurl = MakeArt($aid,false);

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

关于作者: dawei

【声明】:金华站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

热门文章