修改文件位置:程序根目录/dede/makehtml_map.php
注意:dede 是dedecms默认的后台目录,如果您修改了那么请找到您相应的目录!
自定义修改,如果嫌麻烦可以直接到最后拷贝全部内容覆盖!
修改html地图:
Ctrl+F
搜索**/plus/sitemap.htm**然后修改上行(也就是26行)内容最终为一下效果,当然如果您要自定义那么就随意!
1 2
| $murl = $cfg_cmspath."/sitemap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm";
|
Ctrl+F 搜索**/plus/rssmap.htm**然后修改上行(也就是31行)内容最终为一下效果,当然如果您要自定义那么就随意!
1 2
| $murl = $cfg_cmspath."/rssmap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm";
|
修改为和洗心禅寺相似的效果代码:(请覆盖makehtml_map.php文件全部内容)
HTML演示:http://chinaxxcs.com/sitemap.html
RSS演示:http://chinaxxcs.com/rssmap.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| <?php
require_once(dirname(__FILE__)."/config.php"); require_once(DEDEINC."/sitemap.class.php"); require_once(DEDEINC."/dedetag.class.php");
if(empty($dopost)) { ShowMsg("参数错误!","-1"); exit(); } $isremote = empty($isremote)? 0 : $isremote; $serviterm=empty($serviterm)? "" : $serviterm; $sm = new SiteMap(); $maplist = $sm->GetSiteMap($dopost); if($dopost=="site") { $murl = $cfg_cmspath."/sitemap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/sitemap.htm"; } else { $murl = $cfg_cmspath."/rssmap.html"; $tmpfile = $cfg_basedir.$cfg_templets_dir."/plus/rssmap.htm"; } $dtp = new DedeTagParse(); $dtp->LoadTemplet($tmpfile); $dtp->SaveTo($cfg_basedir.$murl); if($cfg_remote_site=='Y' && $isremote == 1) { if($serviterm!="") { list($servurl, $servuser, $servpwd) = explode(',', $serviterm); $config=array( 'hostname' => $servurl, 'username' => $servuser, 'password' => $servpwd,'debug' => 'TRUE'); } else { $config=array(); } if( $ftp->connect($config) ) { $remotefile = $murl; $localfile = '..'.$remotefile; $remotedir = preg_replace('#[^\/]*\.html#', '', $remotefile); $ftp->rmkdir($remotedir); if($ftp->upload($localfile, $remotefile, 'acii')) echo "远程发布成功!"."<br />"; } } $dtp->Clear(); echo "<a href='$murl' target='_blank'>成功更新文件: $murl 浏览...</a>"; exit();
|
Relay Tips: 一极乐( https://yijile.com/log/267/ )