打开文件 /dede/inc/inc_archives_functions.php
1、在最终提升方式
/*火车采集器自动升级首页*/
function MakeIndex()
{
global $dsql,$cfg_basedir,$cfg_templets_dir,$cfg_df_style;
require_once(DEDEINC.'/arc.partview.class.php');
$envs = $_sys_globals = array();
$envs['aid'] = 0;
$pv = new PartView();
$row = $pv->dsql->GetOne('SELECT * FROM `dede_homepageset`');
$templet = str_replace("{style}", $cfg_df_style, $row['templet']);
$homeFile = dirname(__FILE__).'/../'.$row['position'];
$homeFile = str_replace("//", "/", str_replace("\\", "/", $homeFile));
$fp = fopen($homeFile, 'w') or die("没法升级网址首页到:$homeFile 部位");
fclose($fp);
$tpl = $cfg_basedir.$cfg_templets_dir.'/'.$templet;
if(!file_exists($tpl))
{
$tpl = $cfg_basedir.$cfg_templets_dir.'/default/index.htm';
if(!file_exists($tpl)) exit("无法找到主页模板:$tpl ");
}
$GLOBALS['_arclistEnv'] = 'index';
$pv->SetTemplet($tpl);
$pv->SaveToHtml($homeFile);
$pv->Close();
}
/*火车采集器自动升级频道*/
function MakeParentType($typeid)
{
global $dsql;
$typediarr = array();
array_push($typediarr,$typeid);
$row3 = $dsql->GetOne("Select reid,topid From `dede_arctype` where id=".$typeid);
if(!in_array($row3['reid'],$typediarr) and $row3['reid']!=0) array_push($typediarr,$row3['reid']);
if(!in_array($row3['topid'],$typediarr) and $row3['topid']!=0) array_push($typediarr,$row3['topid']);
require_once(DEDEDATA."/cache/inc_catalog_base.inc");
require_once(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);
$preRow = $dsql->GetOne("SELECT id FROM `dede_arctiny` WHERE id<$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id DESC");
$nextRow = $dsql->GetOne("SELECT id FROM `dede_arctiny` WHERE id>$aid AND arcrank>-1 AND typeid='$typeid' ORDER BY id ASC");
if(is_array($preRow))
{
$envs['aid'] = $preRow['id'];
$arc = new Archives($preRow['id']);
$arc->MakeHtml();
}
if(is_array($nextRow))
{
$envs['aid'] = $nextRow['id'];
$arc = new Archives($nextRow['id']);
$arc->MakeHtml();
}
}
2、寻找function GetUpdateTest() 方式,在 return $revalue;前启用上边增加方式。
MakePreNext($arcID,$typeid);
MakeIndex();
MakeParentType($typeid);
return $revalue;
1.本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:duhaomu@163.com,我们将第一时间处理!
2.资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。
3.所有资源仅限于参考和学习,版权归原作者所有,更多请阅读网站声明。