mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 13:54:02 -07:00
sitemap fix
This commit is contained in:
parent
bd905c64ad
commit
0804706fd7
2 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ class sitemap
|
|||
|
||||
function sitemap () {
|
||||
global $bb_cfg;
|
||||
$this->home = 'http://'.$bb_cfg['server_name'].'/';
|
||||
$this->home = make_url('');
|
||||
}
|
||||
|
||||
function build_map () {
|
||||
|
@ -29,10 +29,10 @@ class sitemap
|
|||
function build_index ($count) {
|
||||
$lm = date('c');
|
||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap1.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
$map .= "<sitemap>\n<loc>".make_url(substr(SITEMAP_DIR, 2))."/sitemap1.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$t = $i + 2;
|
||||
$map .= "<sitemap>\n<loc>{$this->home}sitemap/sitemap{$t}.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
$map .= "<sitemap>\n<loc>".make_url(substr(SITEMAP_DIR, 2))."/sitemap{$t}.xml</loc>\n<lastmod>{$lm}</lastmod>\n</sitemap>\n";
|
||||
}
|
||||
$map .= "</sitemapindex>";
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue