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

首頁 > CMS > 織夢DEDE > 正文

織夢手機站搜索與PC同步的方法

2024-07-12 08:28:21
字體:
來源:轉載
供稿:網友

之前介紹過織夢手機站搜索與PC站搜索結果一樣的解決方法,后來測試發現此方法僅支持織夢默認移動程序。

下面介紹織夢手機站搜索與PC同步的方法:

1、找到/plus/search.php文件,復制一份重命名為search_m.php,這里隨意命名都行。

2、找到/include/arc.searchview.class.php文件,復制一份重命名為arc.searchview.class_m.php,這里文件名也可隨意。

3、打開新的search_m.php文件,找到:

require_once(DEDEINC."/arc.searchview.class.php");

改成:

require_once(DEDEINC."/arc.searchview.class_m.php");

4、在新的arc.searchview.class_m.php文件中找打

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

改成:

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

5、在搜索模板找到相應代碼按如下所示更改:

<form action="{dede:global.cfg_cmsurl/}/plus/search_m.php" name="formsearch">    <input type="hidden" name="kwtype" value="0"/>    <input type="hidden" name="mobile" value="1" />    <input type="text" name="q" class="txt fl" placeholder="想看什么?輸入名稱試試...">    <input type="submit" name="button" class="btn fr"></form>

注意:搜索模板名稱要改成“search_m.htm”,search_m.php是PC目錄下的文件,另外css、js、images路徑需要更改。

以上操作完成,如有搜索結果頁面的分頁無法使用自帶標簽控制,可以按如下方法修改:

在新的arc.searchview.class_m.php文件中大概856行找打找到:

//獲得上一頁和下一頁的鏈接if($this->PageNo != 1)

這里可以去掉td標簽修改成自己想要的樣式。

繼續找到876行一直到906行左右:

//獲得數字鏈接$listdd="";$total_list = $list_len * 2 + 1;    if($this->PageNo >= $total_list)        {            $j = $this->PageNo - $list_len;            $total_list = $this->PageNo + $list_len;            if($total_list > $totalpage)            {                $total_list = $totalpage;            }        }     else        {            $j=1;            if($total_list > $totalpage)            {                $total_list = $totalpage;            }        }     for($j; $j<=$total_list; $j++)        {            if($j == $this->PageNo)            {                $listdd.= "<td>$j&nbsp;</td>/r/n";            }            else            {                $listdd.="<td><a href='".$purl."PageNo=$j'>[".$j."]</a>&nbsp;</td>/r/n";            }     }

這一段代碼全部注釋或者刪掉。

繼續找到916到920行直接的代碼并注釋或者刪掉。

if($totalpage>$total_list){   $plist.="<td width='38'><input type='text' name='PageNo' style='width:28px;height:14px' value='".$this->PageNo."' /></td>/r/n";   $plist.="<td width='30'><input type='submit' name='plistgo' value='GO' style='width:30px;height:22px;font-size:9pt' /></td>/r/n";}

至此,全部完成。

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 昭苏县| 沧州市| 抚宁县| 桓台县| 利辛县| 右玉县| 礼泉县| 商丘市| 黔江区| 深水埗区| 普安县| 海盐县| 合肥市| 阿拉善左旗| 秭归县| 高州市| 陆丰市| 淳化县| 上杭县| 广西| 额敏县| 阿克陶县| 双牌县| 高清| 穆棱市| 石首市| 彰化县| 循化| 开鲁县| 岳阳市| 历史| 乐安县| 迁安市| 寿宁县| 苍梧县| 安图县| 阳山县| 革吉县| 剑河县| 福建省| 兰溪市|