導讀:織夢文章織夢文章移動版?zhèn)戊o態(tài)效果 修改以下4個文件 \m\index.php \m\list.php \m\view.php \include\arc.listview.cladede織夢模板夢織模板。

移動版?zhèn)戊o態(tài)效果

修改以下4個文件
\m\index.php
\m\list.php
\m\view.php
\include\arc.listview.class.php
電腦版靜態(tài)生成這里就不多說了,移動版?zhèn)戊o態(tài)操作教程如下:
1.移動版域名 m.123.com 解析并指向綁定目錄到網(wǎng)站目錄的m文件夾
2.后臺-系統(tǒng)配置 添加變量 (為了使用絕對路徑,使用電腦版的文章圖片,為了移動版模板css、js、images使用絕對路徑)
變量名稱:cfg_mobile
變量類型:文本
參數(shù)說明:手機版網(wǎng)址
變量值:http://m.123.com
所屬組:站點設置
變量名稱:cfg_rewritem
變量類型:布爾(Y/N)
參數(shù)說明:手機版?zhèn)戊o態(tài)
變量值:Y
所屬組:站點設置

欄目列表【文件保存目錄】可以是以下形式

3.\m\index.php 修改成永遠是動態(tài),不生成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 增加偽靜態(tài)判斷
把里面的
$tid = (isset($tid) && is_numeric($tid) ? $tid : 0);
|
改成
if($cfg_rewritem == ‘Y‘)
{
$typedir = parse_url($tid, PHP_URL_PATH);
$Pdede后臺模板ageNo = 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);
}
關鍵詞標簽: 標簽 URL 靜態(tài)
聲明: 本文由我的SEOUC技術文章主頁發(fā)布于:2023-07-17 ,文章dedecms織夢移動版?zhèn)戊o態(tài) - 實現(xiàn)與PC電腦版靜態(tài)地主要講述靜態(tài),標簽,url網(wǎng)站建設源碼以及服務器配置搭建相關技術文章。轉載請保留鏈接: http://www.bifwcx.com/article/web_28660.html
為你推薦與dedecms織夢移動版?zhèn)戊o態(tài) - 實現(xiàn)與PC電腦版靜態(tài)地相關的文章
網(wǎng)站建設技術SEOUC.COM
專注網(wǎng)站建設,SEO優(yōu)化,小程序設計制作搭建開發(fā)定制網(wǎng)站等,數(shù)千家網(wǎng)站定制開發(fā)案例,網(wǎng)站推廣技術服務。
5000+合作客服
8年從業(yè)經(jīng)驗
150+覆蓋行業(yè)
主站蜘蛛池模板:
涿鹿县|
吉隆县|
清水河县|
沭阳县|
潞西市|
吉林市|
炎陵县|
安远县|
阿克陶县|
汪清县|
天峻县|
宾川县|
合肥市|
共和县|
防城港市|
宣城市|
莱芜市|
图木舒克市|
玉田县|
讷河市|
驻马店市|
霍山县|
洛宁县|
冕宁县|
玉田县|
柯坪县|
塔河县|
逊克县|
内黄县|
乌兰察布市|
都昌县|
襄垣县|
东港市|
萨迦县|
富顺县|
广东省|
廊坊市|
静海县|
万年县|
柘荣县|
青铜峡市|
|