|
早些天把 网站地图换成了https://www.714.hk/sitemap.xml现在两个都有用了
一个方便大家看帖:https://www.714.hk/sitemap.php
一个方便搜索引擎:https://www.714.hk/sitemap.xml
今天没事做,就想起@大麦 说那样方便看帖子
我就顺便重新弄了一下,改了点地方。
红色的地方改成了伪静态的格式输出(需要配合自己的伪静态规则)
干掉了页脚。另求网页美工。。。把html代码给美化下,个人审美观略低
原来的版本:https://www.714.hk/msi-54749-1-1.html
<a href="msi-'.$threadfid['tid'].'-1-1.html'.'" target="_blank">'.$threadfid['subject'].'</a>
输出链接。自定义你要的格式,写成伪静态的也可以。
- <?php
- define('APPTYPEID', 4);
- define('CURSCRIPT', 'sitemap');
- require './source/class/class_core.php';
- $discuz = & discuz_core::instance();
- $discuz->cachelist = $cachelist;
- $discuz->init();
- $navtitle='网站地图 - 梦殇国';
- $metakeywords='梦殇国际';
- $metadescription='梦殇国际';
- include template('common/header');echo '
- <style type="text/css">
- a:link {color: #333; text-decoration: none;}
- a:visited {text-decoration: none; color: #666;}
- a:hover {text-decoration: none; color: #F90;}
- a:active {text-decoration: none; color: #F90;}
- .newtid{width:99.7%;float:left; margin-top:10px; border: 1px dotted #F90; margin-bottom:10px; }
- .newtid li{padding-left:2%;font-size: 12px;width:48%; float:left;line-height: 25px;}
- .newtid li a{color: #333;}
- .newtit strong a{position: absolute;bottom: 98765px;}
- .newtid h2{font-size: 16px;line-height: 45px;}
- </style>
- <ul class="newtid">';
- $site_num = DB::result(DB::query("SELECT COUNT(`tid`) FROM ".DB::table('forum_thread')." as a inner join ".DB::table('forum_forum')." as b on a.fid=b.fid where a.displayorder=0 ORDER BY a.tid DESC"));
- $site_num = $site_num ? $site_num :0;
- $site_listnum = 100;
- $site_page = intval($_G['gp_page']) ? intval($_G['gp_page']) :1;
- $site_max = $site_page > 0 ? $site_listnum * ($site_page-1) : 0;
- $site_max2 = $site_max2 + 100;
- $querys = DB::query("SELECT a.tid,a.subject,a.fid,b.name FROM ".DB::table('forum_thread')." as a inner join ".DB::table('forum_forum')." as b on a.fid=b.fid where a.displayorder=0 ORDER BY a.tid DESC LIMIT ".$site_max.",".$site_max2);
- $i=1;while($threadfid = DB::fetch($querys)){echo '
- <li>['.$i.'] <a href="msi-'.$threadfid['tid'].'-1-1.html'.'" target="_blank">'.$threadfid['subject'].'</a></li>';$i++;}
- $multipage = multi($site_num, $site_listnum,$site_page, "sitemap.php");
- echo $multipage;
- echo '</ul>';
- echo ' ';
- ?>
复制代码
|
|