你参考审核那个按钮吧。要改源文件的。arcrank=-1这是代表未审核,
dede/templets/content_list.htm中有个审核按钮调用的是
function checkArc(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=checkArchives&qstr="+qstr;
}
下面加个函数
function checkArcb(aid){
var qstr=getCheckboxItem();
if(aid==0) aid = getOneItem();
location="archives_do.php?aid="+aid+"&dopost=checkArchivesb&qstr="+qstr;
}
//上下文菜单
function ShowMenu(obj,aid,atitle)
{
var eobj,popupoptions
popupoptions = [
new ContextItem("浏览文档",function(){ viewArc(aid); }),
new ContextItem("编辑文档",function(){ editArc(aid); }),
new ContextSeperator(),
new ContextItem("更新HTML",function(){ updateArc(aid); }),
new ContextItem("审核文档",function(){ checkArc(aid); }),
new ContextItem("取消审核",function(){ checkArcb(aid);}),
new ContextItem("推荐文档",function(){ adArc(aid); }),
new ContextSeperator(),
new ContextItem("删除文档",function(){ delArc(aid); }),
new ContextSeperator(),
new ContextItem("全部选择",function(){ selAll(); }),
new ContextItem("取消选择",function(){ noSelAll(); }),
new ContextSeperator(),
new ContextItem("频道管理",function(){ location="catalog_main.php"; })
]
ContextMenu.display(popupoptions)
}
再根据这个地址找源头了,
接着改
dede/archives_do.php
/*--------------------------
//审核文档
function checkArchives();
---------------------------*/
else if($dopost=="checkArchives")
{
CheckPurview('a_Check,a_AccCheck,sys_ArcBatch');
require_once(dirname(__FILE__)."/inc/inc_archives_functions.php");
if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
if($qstr==""){
ShowMsg("参数无效!",$ENV_GOBACK_URL);
exit();
}
$qstrs = explode("`",$qstr);
foreach($qstrs as $aid)
{
$aid = ereg_replace("[^0-9]","",$aid);
if($aid=="") continue;
$dsql = new DedeSql(false);
$dsql->SetQuery("Update [email=#@__archives]#@__archives[/email] set arcrank='0',adminID='".$cuserLogin->getUserID()."' where ID='$aid' And arcrank<'0'");
$dsql->ExecuteNoneQuery();
$pageurl = MakeArt($aid,true);
$dsql->Close();
}
ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
exit();
}
下照着加一个
/*--------------------------
//审核文档
function checkArchivesb();
---------------------------*/
else if($dopost=="checkArchivesb")
{
CheckPurview('a_Check,a_AccCheck,sys_ArcBatch');
require_once(dirname(__FILE__)."/inc/inc_archives_functions.php");
if( $aid!="" && !ereg("(".$aid."`|`".$aid.")",$qstr) ) $qstr .= "`".$aid;
if($qstr==""){
ShowMsg("参数无效!",$ENV_GOBACK_URL);
exit();
}
$qstrs = explode("`",$qstr);
foreach($qstrs as $aid)
{
$aid = ereg_replace("[^0-9]","",$aid);
if($aid=="") continue;
$dsql = new DedeSql(false);
$dsql->SetQuery("Update [email=#@__archives]#@__archives[/email] set arcrank='-1',adminID='".$cuserLogin->getUserID()."' where ID='$aid' And arcrank>'-1'");
$dsql->ExecuteNoneQuery();
$pageurl = MakeArt($aid,true);
$dsql->Close();
}
ShowMsg("成功审核指定的文档!",$ENV_GOBACK_URL);
exit();
}