織夢(mèng)模板未審核文檔的發(fā)布時(shí)間是采集時(shí)的時(shí)間,因?yàn)橛幸恍┎杉奈臋n需要編輯,所以當(dāng)前發(fā)布時(shí)的時(shí)間總是“落后、過(guò)去式”,那么如何自動(dòng)修改為當(dāng)前時(shí)間呢?現(xiàn)在就說(shuō)一下修改方法(在DEDE5.3下測(cè)試通過(guò)):
打開(kāi)DEDE后臺(tái)所在目錄(默認(rèn)為dede)的archives_do.php文件,大概在200行開(kāi)始:
$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);
|