国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > CMS > 織夢DEDE > 正文

3.1lit一級欄目為最終列表欄目,列表顯示其下級欄目的文章的修改_DedeCms教程

2024-08-30 19:09:34
字體:
來源:轉載
供稿:網友

3.1lit最新版當一級欄目為最終列表欄目時,使列表顯示其下級欄目的文章的修改 (方法借鑒)

include/inc_arclist_view.php
80行:
$addSql .= " And (typeid='".$this->TypeID."' or typeid2='".$this->TypeID."') ";

更改為:
//增加的,用來解決上級列表調用不出下級列表的問題
$ssid = TypeGetSunID($this->TypeID,$this->dsql);
$ssid2 = str_replace('typeid','typeid2',$ssid);
//結束增加的
$addSql .= " And (typeid='".$this->TypeID."' or ".$ssid." or typeid2='".$this->TypeID."' or ".$ssid2.") ";//本句也已修改
上面這部分用來解決分頁問題

include/inc/inc_fun_SpGetArcList.php
70行開始:
if($ridnum>1){
$tpsql = "";
for($i=0;$i<$ridnum;$i ){
if($tpsql=="") $tpsql .= " And (".TypeGetSunID($reids[$i],$dsql,'arc');
else $tpsql .= " Or ".TypeGetSunID($reids[$i],$dsql,'arc');
}
$tpsql .= ") ";
$orwhere .= $tpsql;
unset($tpsql);
}
else{
$orwhere .= " And ".TypeGetSunID($typeid,$dsql,'arc');
}


更改為:
if($ridnum>1){
$tpsql = "";
for($i=0;$i<$ridnum;$i ){
if($tpsql=="") {
//開始修改文章第二欄目調用問題
$ssid = TypeGetSunID($reids[$i],$dsql,'arc');
$ssid2 = str_replace('typeid','typeid2',$ssid);
$tpsql .= " And (".$ssid." or ".$ssid2;}
else {
$tpsql .= " Or ".TypeGetSunID($reids[$i],$dsql,'arc');
$tpsql .= str_replace('typeid','typeid2',$tpsql);}
}
$tpsql .= ") ";
$orwhere .= $tpsql;
unset($tpsql);
}
else{
$ssid = TypeGetSunID($typeid,$dsql,'arc');
$ssid2 = str_replace('typeid','typeid2',$ssid);
$orwhere .= " And (".$ssid." or ".$ssid2.") ";//結束修改文章第二欄目調用問題
}

此部分用來解決調用下級欄目文章列表問題

替換的代碼我寫的很粗糙,可以暫時先用著,等官方的解決方案出來后再替換

在 include/inc_arclist_view.php還要改一處:

//獲得一個單列的文檔列表


//類別ID的條件
$orwhere .= " And (dede_archives.typeid='".$this->TypeID."' or dede_archives.typeid2='".$this->TypeID."') ";

改為:

//類別ID的條件
$ssid = TypeGetSunID($this->TypeID,$this->dsql);

$orwhere .= " And (dede_archives.typeid='".$this->TypeID."' or ".$ssid." or dede_archives.typeid2='".$this->TypeID."') ";

否則有頁面沒有列表內容,因為80行是Select count(*).....

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 漳浦县| 麻栗坡县| 湘西| 宁德市| 古田县| 通榆县| 平泉县| 沙田区| 东辽县| 滨海县| 临汾市| 新河县| 青铜峡市| 杂多县| 巴彦县| 甘南县| 武乡县| 汉源县| 溧水县| 太白县| 固安县| 新竹县| 洞口县| 武清区| 金乡县| 元氏县| 淄博市| 青州市| 卢氏县| 康保县| 宜兰市| 桑日县| 禹州市| 临湘市| 广元市| 藁城市| 班戈县| 兴山县| 瑞安市| 吉首市| 凌云县|