Ihr müsst nur noch die URLs anpassen. Ich bin ja nur gespannt, wie lange es dauert bis der Kollege vom erotikforum69.de diese sitemap auch bei sich drin hat, da er ja nicht lange braucht, um unsere Neuerungen zu kopieren.
htaccess:
RewriteCond %{REQUEST_FILENAME} /erotikforum/sitemap.html
RewriteRule (.*) /erotikforum/sitemap.php [L]
RewriteCond %{REQUEST_FILENAME} /erotikforum/sitemap-([0-9]*).html
RewriteRule (.*) /erotikforum/sitemap.php\?offset=%1 [L]
sitemap.php:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$sql = "SELECT count(t.topic_id) as total_spider_topics
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE f.forum_id = t.forum_id
AND f.auth_view=0";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query count info', '', __LINE__, __FILE__, $sql);
}
if ($countrow = $db->sql_fetchrow($result))
{
$total_spider_topics = $countrow['total_spider_topics'];
}
if( isset($HTTP_GET_VARS['offset']) || isset($HTTP_POST_VARS['offset']) )
{
$offset = ( isset($HTTP_POST_VARS['offset']) ) ? intval($HTTP_POST_VARS['offset']) : intval($HTTP_GET_VARS['offset']);
}
else
{
$offset = 0;
}
$sql = "SELECT t.topic_id, t.topic_title
FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f
WHERE f.forum_id = t.forum_id
AND f.auth_view=0
ORDER BY t.topic_last_post_id DESC
LIMIT $offset, 70";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query topic info', '', __LINE__, __FILE__, $sql);
}
while( $topicrow = $db->sql_fetchrow($result))
{
echo '<a href="
https://www.erotikversand69.de/erotikforum/ftopic' . $topicrow['topic_id'] . '.html">' . $topicrow['topic_title'] . '</a><br>'. $topicrow['topic_title'] .'<hr>';
}
$offset = $offset + 70;
if ( ($total_spider_topics - $offset) > 0 )
{
$new_url = '<a href="' . $_SCRIPT_NAME . 'sitemap-' . $offset . '.html">zur nächsten Seite</a>';
echo $new_url;
}
?>