Tekil Mesaj gösterimi
  #1 (permalink)   iTrader 
Alt 2006-07-26, 20:47
diyadinnet.com - ait Kullanıcı Resmi (Avatar)
diyadinnet.com diyadinnet.com isimli üyemiz çevrimdışıdır. (Offline)
Junior Member
 
Üyelik tarihi: Apr 2005
Nerden: Ağrı
Mesajlar: 56
Tecrübe Puanı: 0
iTrader: %0/0
diyadinnet.com is on a distinguished road
Standart phpBB Forumlar için otomatik sitemap

PHP- Kodu:
<?php  
/***************************************************************************  
 *                              googlesitemapgenerator.php  
 *                            -------------------  
 *   Copyright/Support          http://www.pentapenguin.com  
 *   Last Modified: 06/05/05  
 *  
 ***************************************************************************/  
   
/***************************************************************************  
 *  
 *   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.  
 *  
 ***************************************************************************/  

define('IN_PHPBB'true);  
$phpbb_root_path './';  
include(
$phpbb_root_path 'extension.inc');  
include(
$phpbb_root_path "common.$phpEx");  

// Begin Configuration Section  
$included_forum_ids = array();  
$excluded_forum_ids = array();  
// End Configuration Section  

if ( count($included_forum_ids) > )  
{  
   
$included_forum_ids_sql 'forum_id IN (' implode(', '$included_forum_ids) . ')';  
}  

if ( 
count($excluded_forum_ids) > )  
{  
   
$excluded_forum_ids_sql 'forum_id NOT IN (' implode(', '$excluded_forum_ids) . ')';  
}  

if ( ( 
count($included_forum_ids) > ) && ( count($excluded_forum_ids) > ) )  
{  
   
$and 'AND';  
}  

if ( ( 
count($included_forum_ids) > ) || ( count($excluded_forum_ids) > ) )  
{  
   
$where 'WHERE';  
}  

$sql "SELECT topic_id, forum_id, topic_time, topic_type FROM " TOPICS_TABLE " $where $included_forum_ids_sql $and $excluded_forum_ids_sql ORDER BY topic_time DESC";  

if ( !
$result $db->sql_query($sql) )  
{  
   
message_die(GENERAL_ERROR'Error: could not retrive topic IDs'''__LINE____FILE__$sql);  
}  

$protocol = ( $board_config['cookie_secure'] == ) ? 'http://' 'https://';  
$servername $board_config['server_name'];  
$port = ( $board_config['server_port'] == '80' ) ? '' ':' $board_config['server_port'];  
$path $board_config['script_path'];  

$output '<' '?xml version="1.0" encoding="UTF-8"?' '>' "\n";  
$output .= '<urlset xmlns="http://www.google.com/schemas/sitemap/0.84">' "\n";  

while ( 
$row $db->sql_fetchrow($result) )  
{  
   
$topic_id $row['topic_id'];  
   
$forum_id $row['forum_id'];  
   
$lastmodified date('Y-m-d\TG:i:s+00:00'$row['topic_time']);  
   
$viewtopic "viewtopic.$phpEx?" POST_TOPIC_URL "=$topic_id";  
   
$priority = ( $row['topic_type'] == POST_STICKY || $row['topic_type'] == POST_ANNOUNCE ) ? '1.0' '0.5';  
     
   
$output .= "<url>\n";  
   
$output .= "\t<loc>$protocol$servername$port$path$viewtopic"  "</loc>\n";  
   
$output .= "\t<lastmod>$lastmodified</lastmod>\n";  
   
$output .= "\t<changefreq>daily</changefreq>\n";  
   
$output .= "\t<priority>$priority</priority>\n";  
   
$output .= "</url>\n\n";  
}  
$output .= "</urlset>\n";  

header('Content-type: application/xml');  
echo 
$output;  
?>

Konu diyadinnet.com tarafından (2006-07-26 Saat 20:55 ) değiştirilmiştir..
Alıntı ile Cevapla