Sitemap
Verfasst: 26.08.2005 14:08
Hallo,
Kann mir jemand bitte den Code für eine Sitemap geben, die nur eine bestimmte Kategorie auflistet?
Bei der normalen Sitemaps werden alle Threads aufgelistet.
Ich will aber nur, dass alle Themen von nur "einer" bestimmten Forum-Kategorie(ID) aufgelistet werden.
Wäre super wenn mir jemand helfen könnte.
Dies ist meine bestehende sitemap.php:
Wäre toll, wenn sie jemand für mich modifizieren könnte.
danke.
Kann mir jemand bitte den Code für eine Sitemap geben, die nur eine bestimmte Kategorie auflistet?
Bei der normalen Sitemaps werden alle Threads aufgelistet.
Ich will aber nur, dass alle Themen von nur "einer" bestimmten Forum-Kategorie(ID) aufgelistet werden.
Wäre super wenn mir jemand helfen könnte.
Dies ist meine bestehende sitemap.php:
Wäre toll, wenn sie jemand für mich modifizieren könnte.
danke.
Code: Alles auswählen
<?php
/***************************************************************************
* Save this file as: site_map.php (or anything you like)
* Version: Friday, Oct 4, 2002
* Email: angus@phphacks.com
* Purpose of hack: Basically generates a list of topics and
* displays them with link to the topic. Goal
* is to provide search engines like Google
* with a static page of links to dynamic pages
* You should link to this page from your sites
* home page somewhere.
* Demo: http://www.aussiecelebs.com/forums/site_map.php
* Tested on: phpBB 2.01, 2.02
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
echo "
";
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
echo "<h2>Beiträge</h2>";
$result = mysql_query("SELECT topic_title, topic_id FROM phpbb_topics ORDER BY topic_title");
while($row= mysql_fetch_assoc($result))
{ $topicId = $row["topic_id"] ;
$result_post = mysql_query("SELECT pt.post_text FROM " . POSTS_TABLE . " p," . POSTS_TEXT_TABLE . " pt WHERE p.post_id = pt.post_id AND p.topic_id = '$topicId' LIMIT 500") ;
$row_post = mysql_fetch_assoc($result_post) ;
$post = $row_post["post_text"] ;
$post = preg_replace("/\[.*\]/"," ... ",$post); // $post = preg_replace("/\[url(.*)?\](.*)\[\/url\]/"," xxx\\2xxx ",$post);
$zufall=rand(222,360);
$post = substr($post,0,$zufall) ;
$post = preg_replace ("/ [^ ]+$/","",$post) ;
echo "<br><a href='viewtopic.php?t=$topicId'>".$row["topic_title"]."</a> " . $post . " <font size='1'><a href='viewtopic.php?t=$topicId' title='Lesen Sie hier alles zu: " . $row["topic_title"] . "'>mehr</a></font><br>";
}
echo "
<!-- Start footer here. -->
</body>
</html>
<!-- End footer -->
";
?>