知识屋:更实用的电脑技术知识网站
所在位置:首页 > 站长园地  > 站长入门

Dedecms技巧:让待审核文章发布时间为审核时间

发表时间:2012-04-14来源:网络

打开DEDE后台所在目录(默认为dede)的archives_do.php文件,大概在200行开始:

$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' where id='$aid' ");
}
$pageurl = MakeArt($aid,false);
}
ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
修改为:

$maintable = ( trim($row['maintable'])=='' ? 'dede_archives' : trim($row['maintable']) );
$newdate = time();
$dsql->ExecuteNoneQuery("Update `dede_arctiny` set sortrank='$newdate',senddate='$newdate',arcrank='0' where id='$aid' ");
if($row['issystem']==-1)
{
$dsql->ExecuteNoneQuery("Update `".trim($row['addtable'])."` set sortrank='$newdate',pubdate='$newdate',senddate='$newdate',arcrank='0' where aid='$aid' ");
}
else
{
$dsql->ExecuteNoneQuery("Update `$maintable` set sortrank='$newdate',pubdate='$newdate',senddate='$newdate',arcrank='0' where id='$aid' ");
}
$pageurl = MakeArt($aid,false);
}
ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);

(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)
收藏
  • 人气文章
  • 最新文章
  • 下载排行榜
  • 热门排行榜