插件特色
插件支持gbk和utf8编码织梦程序
支持指定生成目录
支持发布文档后自动更新手机静态HTML
使用说明
使用二级域名做手机站,例如 m.xxx.com
确保【系统基本参数】【核心设置】【启用绝对网址】【否】
手机站模板里所有标签都与电脑站标签一致使用,不可再使用
index.php list.php?tid= view.php?aid=
应该使用
[field:arcurl/] {dede:field.typeurl/} [field:typelink/]
例如
css、js、images 改成绝对路径
例如 assets/css/ 改成 /assets/css/
或者带手机站域名的
{dede:global.mobile_domain/}/assets/css/
index.php
改成
{dede:global.mobile_domain/}
list.php?tid=[field:id/]
改成
[field:typelink/]
list.php?tid=~id~
改成
~typelink~
list.php?tid={dede:field name=’id’/}
改成
{dede:field.typeurl/}
view.php?aid=[field:id/]
改成
[field:arcurl/]
[field:litpic/]或者[field:picname]
改成
[field:global.cfg_basehost/][field:litpic/]
[field:image/]
改成
<img src=”[field:global.cfg_basehost/][field:litpic/]”>
图片集的[field:imgsrc/]
[field:global.cfg_basehost/][field:imgsrc/]
{dede:field.body/}
改成
{dede:field.body runphp=yes}global $cfg_basehost;$str = @me;$search = ‘/(<img.*?)width=([“\’])?.*?(?(2)\2|\s)([^>]+>)/is’;$search1 = ‘/(<img.*?)height=([“\’])?.*?(?(2)\2|\s)([^>]+>)/is’;$search2 = ‘#(<img.*?style=”.*?)width:\s{0,}\d+px;([^”]*?.*?>)#i’;$search3 = ‘#(<img.*?style=”.*?)height:\s{0,}\d+px;([^”]*?.*?>)#i’;$content = preg_replace($search,’$1$3′,$str);$content = preg_replace($search1,’$1$3′,$content);$content = preg_replace($search2,’$1$2′,$content);$content = preg_replace($search3,’$1$2′,$content);@me = str_replace(‘/uploads/’, $cfg_basehost.’/uploads/’, $content);{/dede:field.body}
栏目内容标签
{dede:field.content/}
改成
{dede:field.content runphp=yes}global $cfg_basehost;$str = @me;$search = ‘/(<img.*?)width=([“\’])?.*?(?(2)\2|\s)([^>]+>)/is’;$search1 = ‘/(<img.*?)height=([“\’])?.*?(?(2)\2|\s)([^>]+>)/is’;$search2 = ‘#(<img.*?style=”.*?)width:\s{0,}\d+px;([^”]*?.*?>)#i’;$search3 = ‘#(<img.*?style=”.*?)height:\s{0,}\d+px;([^”]*?.*?>)#i’;$content = preg_replace($search,’$1$3′,$str);$content = preg_replace($search1,’$1$3′,$content);$content = preg_replace($search2,’$1$2′,$content);$content = preg_replace($search3,’$1$2′,$content);@me = str_replace(‘/uploads/’, $cfg_basehost.’/uploads/’, $content);{/dede:field.content}
电脑站模板跳转代码
<meta http-equiv=”mobile-agent” content=”format=xhtml;url={dede:global.mobile_domain/}”><script type=”text/javascript”>if(window.location.toString().indexOf(‘pref=padindex’) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf(“?mobile”)<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href=”{dede:global.mobile_domain/}”;}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
电脑站列表页模板
<meta http-equiv=”mobile-agent” content=”format=xhtml;url={dede:global.mobile_domain/}{dede:type}[field:typeurl/]{/dede:type}”><script type=”text/javascript”>if(window.location.toString().indexOf(‘pref=padindex’) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf(“?mobile”)<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href=”{dede:global.mobile_domain/}{dede:type}[field:typeurl/]{/dede:type}”;}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
电脑站内容页模板
<meta http-equiv=”mobile-agent” content=”format=xhtml;url={dede:global.mobile_domain/}{dede:field.id runphp=’yes’}$result=GetOneArchive(@me);@me=$result[‘arcurl’];{/dede:field.id}”><script type=”text/javascript”>if(window.location.toString().indexOf(‘pref=padindex’) != -1){}else{if(/AppleWebKit.*Mobile/i.test(navigator.userAgent) || (/MIDP|SymbianOS|NOKIA|SAMSUNG|LG|NEC|TCL|Alcatel|BIRD|DBTEL|Dopod|PHILIPS|HAIER|LENOVO|MOT-|Nokia|SonyEricsson|SIE-|Amoi|ZTE/.test(navigator.userAgent))){if(window.location.href.indexOf(“?mobile”)<0){try{if(/Android|Windows Phone|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)){window.location.href=”{dede:global.mobile_domain/}{dede:field.id runphp=’yes’}$result=GetOneArchive(@me);@me=$result[‘arcurl’];{/dede:field.id}”;}else if(/iPad/i.test(navigator.userAgent)){}else{}}catch(e){}}}}</script>
文件下载地址:
评论解锁
当前隐藏内容需要评论才能查看
立即评论
已有0人评论查看此内容



