Ma stai parlando della tua sitemap! :smile:
Io ti stavo chiedendo di guardare la mia, che mi sembra dia ancora problemi anche se l'ho modificata.
Codice:
<?php
//righe qui sotto da modificare in base al tipo di nuke usato...
//quelle che ci sono sono per i nuke patched di chatserv
//if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
// die ("You can't access this file directly...");
//}
define('IN_PHPBB', true);
$phpbb_root_path = 'modules/Forums/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . "common.$phpEx");
// Begin Configuration Section (qua metti gli id che non vuoi fare indicizzare)
$included_forum_ids = array();
$excluded_forum_ids = array(0,1);
// End Configuration Section
if ( count($included_forum_ids) > 0 )
{
$included_forum_ids_sql = 'forum_id IN (' . implode(', ', $included_forum_ids) . ')';
}
if ( count($excluded_forum_ids) > 0 )
{
$excluded_forum_ids_sql = 'forum_id NOT IN (' . implode(', ', $excluded_forum_ids) . ')';
}
if ( ( count($included_forum_ids) > 0 ) && ( count($excluded_forum_ids) > 0 ) )
{
$and = 'AND';
}
if ( ( count($included_forum_ids) > 0 ) || ( count($excluded_forum_ids) > 0 ) )
{
$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";
$sql = "SELECT topic_id, 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'] == 0 ) ? '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";
$viewtopic = "modules.php?name=Forums&file=viewtopic&t=".$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<loc>http://syst3mcrash3r.altervista.org/php-nuke/html/$viewtopic". "</loc>\n";
//$output .= "\t<lastmod>$lastmodified</lastmod>\n";
$output .= "\t<changefreq>always</changefreq>\n";
$output .= "\t<priority>$priority</priority>\n";
$output .= "</url>\n\n";
}
$output .= "</urlset>\n";
//header("Content-Type: application/xml\nContent-Encoding: //x-gzip");
/*function gzip_PrintFourChars($Val)
{
for ($i = 0; $i < 4; $i ++)
{
echo chr($Val % 256);
$Val = floor($Val / 256);
}
}
$Size = strlen($output);
$Crc = crc32($output);
$output = "\x1f\x8b\x08\x00\x00\x00\x00\x00".gzcompress($output, 9);
$len_output = strlen($output);
echo substr($output, 0, $len_output - 4);
gzip_PrintFourChars($Crc);
gzip_PrintFourChars($Size);*/
echo $output;
?>
Google continua a dirmi laconicamente "Compression Error"...
Potrebbe centrare qualcosa il fatto che ho il modulo Error Pages attivo?