原有手机站有dede模板:
1后台,系统设置添加手机站网址 命名:cfg_mhost。
2将模板名称后面加_m,放入templets/default,手机站css,js等文件放入m目录下。
2替换 {dede:global.cfg_templets_skin/} 换为 {dede:global.cfg_mhost/}。
3文章列表页连接 {dede:field name='typeurl'/} 换为 list.php?tid=[field:id/]。
4文章页[field:arcurl/]换为view.php?aid=[field:id/]。
5列表图片不显示,路径前面加上原pc站的网址{dede:global.cfg_basehost/}。
6文章页图片不显示,{dede:field.body function='replaceurl(@me)'/}。
7replaceurl方法:在dede的include/extend.func.php中添加以下:
function replaceurl($body,$web_url){
global $cfg_basehost;
$body_replace=str_replace('src="/uploads/','src="'.$cfg_basehost.'/uploads/',$body);
return $body_replace;
}php
8图片大小自适应jscss
$(".arcmain img").css("height","auto") $(".arcmain img").css("width","100%")
9完成。web
若是手机站是从新建,则按上面步骤添加便可。curl