分析了一下, DEDE的文章有沒有審核發(fā)布主要是arcrank這個參數(shù)的值決定的. 所以要把DEDE自動審核發(fā)布文章也很容易實現(xiàn)了.
代碼如下:
<?php
//自動生成HTML版
if(isset($_GET['pub']))
{
require_once (dirname(__FILE__) . “/include/common.inc.php”);
require_once DEDEINC.”/arc.partview.class.php”;
//發(fā)布審核稿件
require_once(DEDEINC.”/arc.archives.class.php”);
for ($i=1; $i<=1; $i++) {
$row = $dsql->GetOne(“select * from `dede_arctiny` where arcrank = -1 order by id limit 1″);
$id = $row['id'];
$iquery = “update `dede_arctiny` set arcrank = 0 where id=’$id’”;
$dsql->ExecuteNoneQuery($iquery);
$iquery2 = “update `dede_archives` set arcrank = 0, ismake = 1 where id=’$id’”;
$dsql->ExecuteNoneQuery($iquery2);
$dsql->ExecuteNoneQuery(“Update `dede_taglist` set `arcrank` = 0 where aid=’$id’”);
$ac = new Archives($id);
$rurl = $ac->MakeHtml();
}
//更新首頁
$GLOBALS['_arclistEnv'] = ‘index’;
$row = $dsql->GetOne(“Select * From `dede_homepageset`”);
$row
更多信息請查看IT技術(shù)專欄