织梦DEDECMS手机端生成静态页面方法

,一、添加后台导航栏目链接,1 打开dede/inc/inc_menu.php,在146行下面添加代码:
<m:item name='更新WAP主页' link='makehtml_homepagewap.php' rank='sys_MakeHtml' target='main' /> <m:item name='更新WAP栏目' link='makehtml_listwap.php' rank='sys_MakeHtml' target='main' /> <m:item name='更新WAP文档' link='makehtml_archiveswap.php' rank='sys_MakeHtml' target='main' />, ,二、更新WAP主页,1.复制文件dede/makehtml_homepage.php,重命名为makehtml_homepagewap.php2.打开makehtml_homepagewap.php,找到最后一行,include DedeInclude('templets/makehtml_homepage.htm');,修改为,include DedeInclude('templets/makehtml_homepagewap.htm');,3.复制文件dede/templets/makehtml_homepage.htm,重命名为makehtml_homepagewap.htm,4打开dede/templets/makehtml_homepagewap.htm 修改21行,<form action="makehtml_homepage.php" method="post" name="form1" target="stafrm">,修改为 ,<form action="makehtml_homepagewap.php" method="post" name="form1" target="stafrm">,4.修改36行,指定生成WAP主页模板,<input name="templet" type="text" id="templet" style="width:300" value="default/wap.htm">,5.修改48行,指定生成WAP主页路径 ,<td height="20" valign="top" bgcolor="#FFFFFF"><input name="position" type="text" id="position" value="../m/index.html" size="30">,6.修改69~70行,“checked”移到“不保存当前选项”,系统默认是提交保存主页模板和路径数据的,<input name="saveset" type="radio" value="0" class="np" checked>,不保存当前选项,<input name="saveset" type="radio" class="np" value="1" >,保存当前选项,END,1.复制文件dede/makehtml_list.php,重命名为makehtml_listwap.php,2.打开makehtml_listwap.php,找到最后一行,include DedeInclude('templets/makehtml_list.htm');,修改为,include DedeInclude('templets/makehtml_listwap.htm');,3.复制文件dede/templets/makehtml_list.htm 重命名为makehtml_listwap.htm ,修改第10行,<form name="form1" action="makehtml_list_action.php" method="get" target='stafrm'>,修改为,<form name="form1" action="makehtml_listwap_action.php" method="get" target='stafrm'>,4.复制dede/makehtml_list_action.php 重命名makehtml_listwap_action.php,require_once(DEDEINC."/arc.listview.class.php");,修改为,require_once(DEDEINC."/arc.listwapview.class.php");,5.复制include/arc.listview.class.php 重命名为arc.listwapview.class.php,if(!file_exists($tempfile))
{
$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_default.htm";
}
if(!file_exists($tempfile)||!is_file($tempfile))
{
echo "模板文件不存在,无法解析文档!";
exit();
}, ,替换为,为,$tempfile = $GLOBALS['cfg_basedir'].$GLOBALS['cfg_templets_dir']."/".$GLOBALS['cfg_df_style']."/list_wap.htm";,修改栏目储存目录,在658-659行后面添加代码,生成的栏目文件保存在文件夹“m”下面,$typedir = MfTypedir('/m/'.$typedir);,修改
返回顶部
跳到底部

Copyright 2011-2024 南京追名网络科技有限公司 苏ICP备2023031119号-6 乌徒帮 All Rights Reserved Powered by Z-BlogPHP Theme By open开发

请先 登录 再评论,若不是会员请先 注册