mirror of
https://github.com/torrentpier/torrentpier
synced 2025-08-21 22:03:49 -07:00
sitemap fix
This commit is contained in:
parent
bd905c64ad
commit
0804706fd7
2 changed files with 5 additions and 5 deletions
|
@ -253,10 +253,10 @@ define('BB_PATH', realpath(BB_ROOT) );
|
||||||
define('ADMIN_DIR', BB_PATH .'/admin/' );
|
define('ADMIN_DIR', BB_PATH .'/admin/' );
|
||||||
define('DATA_DIR', BB_PATH .'/data/' );
|
define('DATA_DIR', BB_PATH .'/data/' );
|
||||||
define('INT_DATA_DIR', BB_PATH .'/internal_data/' );
|
define('INT_DATA_DIR', BB_PATH .'/internal_data/' );
|
||||||
define('AJAX_HTML_DIR', BB_ROOT .'/internal_data/ajax_html/' );
|
define('AJAX_HTML_DIR', BB_ROOT .'internal_data/ajax_html/' );
|
||||||
define('CACHE_DIR', BB_PATH .'/internal_data/cache/' );
|
define('CACHE_DIR', BB_PATH .'/internal_data/cache/' );
|
||||||
define('LOG_DIR', BB_PATH .'/internal_data/log/' );
|
define('LOG_DIR', BB_PATH .'/internal_data/log/' );
|
||||||
define('SITEMAP_DIR', BB_PATH .'/internal_data/sitemap/' );
|
define('SITEMAP_DIR', BB_PATH .'internal_data/sitemap/' );
|
||||||
define('TRIGGERS_DIR', BB_PATH .'/internal_data/triggers/' );
|
define('TRIGGERS_DIR', BB_PATH .'/internal_data/triggers/' );
|
||||||
define('AJAX_DIR', BB_ROOT .'/library/ajax/' );
|
define('AJAX_DIR', BB_ROOT .'/library/ajax/' );
|
||||||
define('ATTACH_DIR', BB_PATH .'/library/attach_mod/' );
|
define('ATTACH_DIR', BB_PATH .'/library/attach_mod/' );
|
||||||
|
|
|
@ -13,7 +13,7 @@ class sitemap
|
||||||
|
|
||||||
function sitemap () {
|
function sitemap () {
|
||||||
global $bb_cfg;
|
global $bb_cfg;
|
||||||
$this->home = 'http://'.$bb_cfg['server_name'].'/';
|
$this->home = make_url('');
|
||||||
}
|
}
|
||||||
|
|
||||||
function build_map () {
|
function build_map () {
|
||||||
|
@ -29,10 +29,10 @@ class sitemap
|
||||||
function build_index ($count) {
|
function build_index ($count) {
|
||||||
$lm = date('c');
|
$lm = date('c');
|
||||||
$map = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<sitemapindex xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">\n";
|
$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++) {
|
for ($i = 0; $i < $count; $i++) {
|
||||||
$t = $i + 2;
|
$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>";
|
$map .= "</sitemapindex>";
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue