Spyder Mod
Verfasst: 30.08.2005 22:00
hallo,
ich habe mir eine art suchmaschinen (sitemap) mod eingebaut. leider werden auch beiträge von privaten foren angezeigt.
kann mir jemand helfen, wie die privaten und adminforen nicht ausgelesen werden ? vielen dank.
ich habe mir eine art suchmaschinen (sitemap) mod eingebaut. leider werden auch beiträge von privaten foren angezeigt.
Code: Alles auswählen
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
include($phpbb_root_path . 'includes/page_header.'.$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 <= " . AUTH_REG;
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 c.cat_id, c.cat_title, f.forum_id, f.forum_name, f.forum_desc, f.auth_view, t.topic_id, t.topic_title, t.topic_last_post_id, t.topic_replies, p.bbcode_uid, p.post_text
FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t, " . POSTS_TEXT_TABLE . " p
WHERE c.cat_id = f.cat_id
AND f.forum_id = t.forum_id
AND p.post_id = t.topic_first_post_id
AND f.auth_view <= " . AUTH_REG . "
ORDER BY t.topic_last_post_id DESC
LIMIT $offset, 25";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query topic info', '', __LINE__, __FILE__, $sql);