该楼层疑似违规已被系统折叠 隐藏此楼查看此楼
3.\m\index.php 修改成永远是动态,不生成index.html
把里面的
$row['showmod'] = isset($row['showmod'])? $row['showmod'] : 0;
if ($row['showmod'] == 1)
{
$pv->SaveToHtml(dirname(__FILE__).'/index.html');
include(dirname(__FILE__).'/index.html');
exit();
} else {
$pv->Display();
exit();
}
改成
$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);
$pv->Display();
exit();
4.\m\list.php 增加伪静态判断
把里面的
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
改成
if($cfg_rewritem == 'Y')
{
$typedir = parse_url($tid, PHP_URL_PATH);
$PageNo = stripos(GetCurUrl(), '.html') ? intval(str_replace('.html', '', end(explode("_", GetCurUrl())))) : 1;
$tinfos = $dsql->GetOne("SELECT * FROM `dede_arctype` WHERE typedir='/$typedir' or typedir='{cmspath}/$typedir'");
if(is_array($tinfos))
{
$tid = $tinfos['id'];
$typeid = GetSonIds($tid);
$row = $dsql->GetOne("Select count(id) as total From `dede_archives` where typeid in({$typeid})");
$TotalResult = is_array($row) ? $row['total'] : 0;
}
else
{
$tid = 0;
}
}
else
{
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
}
5.\m\view.php 增加伪静态判断
在
$t1 = ExecTime();
下面加入
if($cfg_rewritem == 'Y')
{
$aid = stripos(GetCurUrl(), '.html') ? intval(str_replace('.html', '', end(explode("/", GetCurUrl())))) : 0;
}
6.\include\arc.listview.class.php 增加移动版伪静态分页功能,找到
global $cfg_rewrite;
改成
global $cfg_rewrite,$cfg_rewritem;
继续找到
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$purl .= '?'.$geturl;
改成
if($cfg_rewritem == 'Y')
{
$purl = "";
}
else
{
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&";
$purl .= '?'.$geturl;
}
继续找到下面的
return $plist;
在它的上面加入
if($cfg_rewritem == 'Y')
{
$plist = preg_replace("/PageNo=(\d+)/i",'list_'.$this->TypeID.'_\\1.html',$plist);
}