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

首頁 > CMS > 織夢(mèng)DEDE > 正文

織夢(mèng)生成多個(gè)pubdate,click等排序欄目列表頁教程

2024-07-12 09:02:17
字體:
供稿:網(wǎng)友

dedecms生成欄目列表頁排序多樣化pubdate,click等排序格式

如下圖顯示:

織夢(mèng)生成多個(gè)pubdate,click等排序欄目列表頁教程

 

修改教程如下:

第1步:

在   dede/inc_menu.php  中找到“更新主頁HTML“ 在這一部分中增加若干行必要的代碼:

    例如 <m:item name='更新Click排序列表' link='makehtml_list_click.php' rank='sys_MakeHtml' target='main' />

 

第2步:

在   dede目錄中找到 makehtml_list.php、makehtml_list_action.php,分別復(fù)制一份重命名為makehtml_list_click.php、makehtml_list_click_action.php。

在   makehtml_list_click.php 中將“makehtml_list.htm” 改為“makehtml_list_click.htm”;

在   makehtml_list_click_action.php  中 將“arc.listview.class.php” 替換為 “arc.list.click.view.class.php”;接著在大概文件末尾,找到 “makehtml_list_action.php” 改為“makehtml_list_click_action.php”;

 

第3步:

在   dede/templets目錄中找到 makehtml_list.htm,復(fù)制一份重命名為 makehtml_list_click.htm;然后打開新建的文件找到action="makehtml_list_action.php",替換為 action="makehtml_list_click_action.php"

 

第4步:

這一步需要改的比較多點(diǎn)了

在   include目錄中找到 arc.listview.class.php 復(fù)制一份重命名為 arc.list.click.view.class.php;

接著打開您新建的這個(gè)文件arc.list.click.view.class.php:

①:找到

   $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$this->TypeLink->TypeInfos['templist']; // CUOxin.com

   $tempfile = str_replace("{tid}", $this->TypeID, $tempfile);

   $tempfile = str_replace("{cid}", $this->ChannelUnit->ChannelInfos['nid'], $tempfile);

   if(!file_exists($tempfile))

   {

    $tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default.htm";

   }

   if(!file_exists($tempfile)||!is_file($tempfile))

   {

    echo "模板文件不存在,無法解析文檔!";

    exit();

   }

 

全部替換為   

$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_click_article.htm"; // list_click_article.htm是你自己制作的按click排序的模板,官方默認(rèn)的模板是按pudate排序,這個(gè)看您自己的喜好了,O(∩_∩)O~

 

②、找到

     $onlyrule = $this->GetMakeFileRule($this->Fields['id'],"list",$this->Fields['typedir'],'',$this->Fields['namerule2']);

     $onlyrule = str_replace("{page}","1",$onlyrule);

     $list_1 = $this->GetTruePath().$onlyrule;

     $murl = MfTypedir($this->Fields['typedir']).'/'.$this->Fields['defaultname'];

全部刪掉或者注釋掉即可。

 

③、找到

     $namerule2 = str_replace('{tid}',$typeid,$namerule2);

替換為

     $namerule2 = str_replace('{tid}',$typeid.'_click',$namerule2); // CUOxin.com

      其中_click,按自己喜好命名。


發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 沙河市| 松桃| 东宁县| 额尔古纳市| 霍山县| 安乡县| 海城市| 交城县| 呼图壁县| 林州市| 洪洞县| 合水县| 昭觉县| 静乐县| 长兴县| 东丽区| 博湖县| 炉霍县| 大庆市| 霍山县| 随州市| 曲麻莱县| 和静县| 岳普湖县| 和田县| 焉耆| 抚宁县| 上饶市| 东丽区| 文成县| 商水县| 泊头市| 保亭| 和静县| 本溪市| 永安市| 新龙县| 民勤县| 神池县| 固原市| 景德镇市|