帝国CMS访问电脑端自动跳转到手机端动态页和静态页的代码
Empire CMS 7.2版本引入了全面的多接入终端功能,使网站更方便地制作多个移动接入终端。版本7.5中的多访问者升级:支持主端的后台刷新以生成每个访问端的静态页面,并且多访问端在静态模式下使用更方便。在首页模板页面头……
Empire CMS 7.2版本引入了全面的多接入终端功能,使网站更方便地制作多个移动接入终端。版本7.5中的多访问者升级:支持主端的后台刷新以生成每个访问端的静态页面,并且多访问端在静态模式下使用更方便。
在首页模板页面头部,JS代码在body前面加上以下HTML源代码
<script type="text/javascript">try {var urlhash = window.location.hash;if (!urlhash.match("fromapp")){if ((navigator.userAgent.match(/(ipod|iphone|android|coolpad|mmp|smartphone|midp|wap|xoom|symbian|j2me|blackberry|wince)/i))){window.location="https://m.daixiao360.cn/";}}}catch(err){}</script><meta name="mobile-agent" content="format=xhtml;url=https://m.daixiao360.cn/">
列表页
动态页:https://m.daixiao360.cn/e/action/ListInfo/?classid=[!--self.classid--]静态页:https://m.daixiao360.cn<?$r['classid']=$GLOBALS[navclassid];$classurl=sys_ReturnBqClassname($r,9);echo $classurl;?>
内容页
动态页:https://m.daixiao360.cn/e/action/ListInfo/?classid=[!--self.classid--]静态页:https://m.daixiao360.cn<?$r['classid']=$GLOBALS[navclassid];$classurl=sys_ReturnBqClassname($r,9);echo $classurl;?>
分成动态与静态页面,可自行选择更换ppqq.net为自己的子域名。
- 上一篇
帝国CMS广告标签phomead生成的HTML代码在哪个文件里修改
帝国cms生成广告标签如下:[phomead]1[/phomead]1就是广告的id,那么生成广告标签的代码是在哪里修改呢,是在 /e/class/t_functions.php 文件里面的 function sys_GetAd 函数里修改。
- 下一篇
phome_enewsvote 数据表字段解释(投票表)
字段名类型解释附加说明voteidint(10)投票IDtitlevarchar(120)投票标题votenumint(10)总投票数voteipmediumtext投票IP记录votetexttext投票项目格式:(每个项目用回车隔开)项目名称1::::::投票数1项目名称2::::::投票