打开DEDE后台所在目录(默认为dede)的archives_do.php文件,大概在200行开始:
原代码:
$maintable = ( trim($row['maintable'])==” ? '2d30_archives' : trim($row['maintable']) );
$dsql->ExecuteNoneQuery("Update `2d30_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'])=='' ? 'dede58_archives' : trim($row['maintable']) ); $newdate = time(); // $dsql->ExecuteNoneQuery("UPDATE `dede58_arctiny` SET arcrank='0' WHERE id='$aid' "); $dsql->ExecuteNoneQuery("UPDATE `dede58_arctiny` SET sortrank='$newdate',senddate='$newdate',arcrank='0' WHERE id='$aid' "); if($row['issystem']==-1) { // $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET arcrank='0' WHERE aid='$aid' "); $dsql->ExecuteNoneQuery("UPDATE `".trim($row['addtable'])."` SET sortrank='$newdate',pubdate='$newdate',senddate='$newdate',arcrank='0' WHERE aid='$aid' "); } else { // $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); $dsql->ExecuteNoneQuery("UPDATE `$maintable` SET sortrank='$newdate',pubdate='$newdate',senddate='$newdate',arcrank='0', dutyadmin='".$cuserLogin->getUserID()."' WHERE id='$aid' "); } $dsql->ExecuteNoneQuery("UPDATE `dede58_taglist` SET arcrank='0' WHERE aid='$aid' "); $pageurl = MakeArt($aid,false); } ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
当使用后台“审核”按钮审核文章时,同步更新该文章的发布时间为审核的时间。
这样排序就能在前了~
新闻热点
疑难解答