DEDECMS未审核文档发布时间改为当前时间的方法
|
DEDECMS未审核文档的发布时间是采集时的时间,因为有一些采集的文档需要编辑,所以当前发布时的时间总是“落后、过去式”,那么如何自动修改为当前时间呢?现在烈火网就说一下修改方法(在DEDE5.3下测试通过): 打开DEDE后台所在目录(默认为dede)的archives_do.php文件,大概在200行开始: Copy to ClipboardLiehuo.Net Codes引用的内容:[www.jb51.cc] $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); 修改为: Copy to ClipboardLiehuo.Net Codes引用的内容:[www.jb51.cc] $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',arcrank='0' where aid='$aid' "); } else { $dsql->ExecuteNoneQuery("Update `$maintable` set sortrank='$newdate',arcrank='0' where id='$aid' "); } $pageurl = MakeArt($aid,$ENV_GOBACK_URL); (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
