sitemap theme for smart_build
This commit is contained in:
parent
61d2729a40
commit
e273111340
|
@ -105,6 +105,11 @@ function sb_recent() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function sb_sitemap() {
|
||||||
|
rebuildTheme("sitemap", "all");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
$entrypoints = array();
|
$entrypoints = array();
|
||||||
|
|
||||||
$entrypoints['/%b/'] = 'sb_board';
|
$entrypoints['/%b/'] = 'sb_board';
|
||||||
|
@ -130,6 +135,7 @@ $entrypoints['/*/'] = 'sb_ukko';
|
||||||
$entrypoints['/*/index.html'] = 'sb_ukko';
|
$entrypoints['/*/index.html'] = 'sb_ukko';
|
||||||
$entrypoints['/recent.html'] = 'sb_recent';
|
$entrypoints['/recent.html'] = 'sb_recent';
|
||||||
$entrypoints['/%b/catalog.html'] = 'sb_catalog';
|
$entrypoints['/%b/catalog.html'] = 'sb_catalog';
|
||||||
|
$entrypoints['/sitemap.xml'] = 'sb_sitemap';
|
||||||
|
|
||||||
$reached = false;
|
$reached = false;
|
||||||
|
|
||||||
|
@ -185,6 +191,9 @@ if ($reached) {
|
||||||
elseif (preg_match('/\.js$/', $request)) {
|
elseif (preg_match('/\.js$/', $request)) {
|
||||||
header("Content-Type", "text/javascript; charset=utf-8");
|
header("Content-Type", "text/javascript; charset=utf-8");
|
||||||
}
|
}
|
||||||
|
elseif (preg_match('/\.xml$/', $request)) {
|
||||||
|
header("Content-Type", "application/xml");
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
header("Content-Type", "text/html; charset=utf-8");
|
header("Content-Type", "text/html; charset=utf-8");
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
// - post (a post has been made)
|
// - post (a post has been made)
|
||||||
// - thread (a thread has been made)
|
// - thread (a thread has been made)
|
||||||
|
|
||||||
|
if ($action != 'all') {
|
||||||
if ($action != 'post-thread' && $action != 'post-delete')
|
if ($action != 'post-thread' && $action != 'post-delete')
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -20,7 +21,12 @@
|
||||||
return; // Too soon
|
return; // Too soon
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($config['smart_build']) {
|
||||||
|
file_unlink($settings['path']);
|
||||||
|
}
|
||||||
|
else {
|
||||||
$boards = explode(' ', $settings['boards']);
|
$boards = explode(' ', $settings['boards']);
|
||||||
|
|
||||||
$threads = array();
|
$threads = array();
|
||||||
|
@ -37,3 +43,4 @@
|
||||||
'boards' => $boards,
|
'boards' => $boards,
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue