您现在的位置是:网站首页>网站制作心得网站建设教程
DedeCMS采集文章的审核时间同步文章发布时间
2019-06-28来源: 【网站建设教程】
人已围观
简介 不知道你有没有发现,当你采集了很多文章,过几天再来审核的时候,审核的文章发布时间,还是采集导入的时间。其实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);
好了,当你再次审核文章时,审核的文章发布时间就会变成当前审核时间。
很赞哦! ()
猜您喜欢
相关文章
付费说明
1、安装cms后台,费用是200,基础费用200包括后台调试以及部分页面模板修改.
2、请加我个人微信 634626966,或者扫一扫微信二维码。备注“网站”
3、系统安装只限定于帝国cms,并且支持php,虚拟主机,请选择linux系统
4、【收费说明】制作企业网站,我是这么收费的!