易优cms—安全好用,商用授权只需要188元,网址:https://www.eyoucms.com
打开文件 /dede/inc/inc_archives_functions.php
1、在最后R U ^ M增加方法
/*火车头采集自动更新主页*/
function MakeInL s t *dex()
{
global $dsql,$cfg_bO k Q @ x tasedir,$cfg_templets_dir,$cfg_df_style;
require_once(DEDEINC.'/arc.partview.class.php');
$envs = $_sys_globals =- ^ [ / M G & X array();
$envs['aid'] = 0;
$pv = new PartView();
$row = $pv->dsql->GetOne('SELECT * FROM `dede_homepageset`% G `');
$templet = str_replace("{style}", $cfg_df_r h u ` \ l ustyle, $row['templet']);
$homeC \ # * gFile = dirname(__FILE__).'/../'.$row['position'];
$homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile));
$fp = fopen($homeFile, 'w')! : I , y or die("无法更新网站主页到:$homeFile 位置");
fclose($fp);
$tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet;
if(!file_exists($tpl& % M Y _ 4 M U))
{
$tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm';
if(v s .!file_exists($tpl)) exit("无法找到主页模板:$tpl ");
}
$GLOBALS['_arclistEnv'] = 'index';
$pv->SetTemplet($t8 - Q _ ; Rpl);
$pv->SaveToHtml($homeFile);
$pv->X r * S ZClof p b %se();
}
/*火车头采集自动更新栏目*/= : v 9 , r w
function MakeParentType($B / 4 b v 7 Ftypeid)
{
global $dsql;
$typedR ` Diarr = array();
array_push($typediarr,$typeid);
$row3 = $dsql->GetOne("Select reid,topid From `dede_arctype` where id=".$tyG $ w K ; Jpeid);
if(!in_array($rowo q M m3['reid'],$typediarrE L Z b k T ^ G) and $row3['reid']!=0) array_push($s _ C ( 3 0 j Gtypediarr,$row3['reid']);
if(!in) c P _ c b 4 W_arrg - n _ yay($roa R 3 m @ f Xw3['topid'],S ) B 2$typediarr) anH G o r 6 = cd $row3['topid']!=0) array_push($typediarr,$row3['topid']);
require_once(DEDEDATA."/cache/inc_catalog_base.inc");
re| ? uquire_J ( f n wonce(DEDEINC."/channelunit.func.php");
require_once(DEDEINC."/arc.listview.class.php");
foreach($typediarr as $typeid)
{
$lv = new ListView($typeid);
$lv->MakeHtml(1,$maxpagesize);
}
}
/*火车头采集自动更新上下篇*/
function MakePreNext($aid,$typeid)
{
global $dsql;
require_once(DEDEINC.'/arc.archives.class.php');
$aid = intval($aid)* \ M C;
$preRow = $dsql->GetOne("SELECT id FROM `dede_arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeidb l 0 a @ B B' ORDh A $ S 9 X d o PER BY id DESC");
$nextRow = $dsql-&N a w w # Y C bgt;GetOne("SELECT id FROM `dede_arctiny` WHERE id>$aid AND arcrank>-1 AN- R j T P 8 zD typeid='$t` ] % $ ? \ 0 ; iypeid' ORDER BY id ASC");
if(is_array($preRow))
{
$envs['aid'] = $preRow['id'];
$arc = new Archives($preRow['id']);
$arc->MakeHtml();
}
ih 9 _ k W ( Rf(is_array($nextRow))
{
$envs['aid'] = $nextRow['id'];
$arc = newP F x G ` Ar} @ _ h 1 , _chives($nextRow['id']);
$arc-&H T = 6 L & H kgt;MakeHtml();
}
}
2、找到function GetUpdateTest6 x w L t =() 方法,在 return $revalue;前调用上面新增方法。
MakePr1 u | % R / | C =eNext($arcID,$typeid);
MakeIndex();
MakePa0 4 . TrentType($typeid);u j X
return $revalue;