Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.

sitemap für phpbb

Hier können Sie Ihre Fragen zum Thema Suchmaschinenoptimierung (SEO) / Positionierung stellen
Gerald79
PostRank 4
PostRank 4
Beiträge: 159
Registriert: 15.10.2004, 14:27

Beitrag von Gerald79 » 20.01.2005, 13:43

Hallo,

ich habe mit begeisterung diesen Artikel gelesen:
https://www.abakus-internet-marketing.d ... phpbb.html

Natürlich will ich mir auch nicht diese art der Optimierung entgehen lassen. Daher möchte auch ich mich einmal an den den Sitemaps versuchen.

Code: Alles auswählen

<html> 
<head></head> 
<body> 
<?php 
define&#40;'IN_PHPBB', true&#41;; 
$phpbb_root_path = './'; 
include&#40;$phpbb_root_path . 'extension.inc'&#41;; 
include&#40;$phpbb_root_path . 'common.'.$phpEx&#41;; 

$sql = "SELECT count&#40;t.topic_id&#41; as total_spider_topics 
        FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f 
        WHERE f.forum_id = t.forum_id 
        AND f.auth_view=0"; 
if&#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41; 
&#123; 
   message_die&#40;GENERAL_ERROR, 'Could not query count info', '', __LINE__, __FILE__, $sql&#41;; 
&#125; 
if &#40;$countrow = $db->sql_fetchrow&#40;$result&#41;&#41; 
&#123; 
    $total_spider_topics = $countrow&#91;'total_spider_topics'&#93;; 
&#125; 

        
if&#40; isset&#40;$HTTP_GET_VARS&#91;'offset'&#93;&#41; || isset&#40;$HTTP_POST_VARS&#91;'offset'&#93;&#41; &#41; 
&#123; 
   $offset = &#40; isset&#40;$HTTP_POST_VARS&#91;'offset'&#93;&#41; &#41; ? intval&#40;$HTTP_POST_VARS&#91;'offset'&#93;&#41; &#58; intval&#40;$HTTP_GET_VARS&#91;'offset'&#93;&#41;; 
&#125; 
else 
&#123; 
   $offset = 0; 
&#125; 

$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, 200"; 
if&#40; !&#40;$result = $db->sql_query&#40;$sql&#41;&#41; &#41; 
&#123; 
   message_die&#40;GENERAL_ERROR, 'Could not query topic info', '', __LINE__, __FILE__, $sql&#41;; 
&#125; 
while&#40; $topicrow = $db->sql_fetchrow&#40;$result&#41;&#41; 
&#123; 
    echo '<a href="viewtopic.' . $phpEx . '?' . POST_TOPIC_URL . '=' . $topicrow&#91;'topic_id'&#93; . '">' . $topicrow&#91;'topic_title'&#93; . '</a><br>'; 
&#125; 

$offset = $offset + 200; 
if &#40; &#40;$total_spider_topics - $offset&#41; > 0 &#41; 
&#123; 
   $new_url = '<a href="' . $_SCRIPT_NAME . '?offset=' . $offset . '">Next</a>'; 
    echo $new_url; 
&#125; 

?> 
</body> 
</html>