При генерации Google Sitemap ссылки имели старый вид
http://sait/2008/01/01/news.html
Данный фикс исправляет их вид на
http://sait/(ID новости)-news.html
откройте файл engine/classes/google.class.php
И найдите
$result = $db->query("SELECT id, date, alt_name FROM " . PREFIX . "_post WHERE approve=1 ORDER BY fixed DESC, date DESC".$this->limit);
while($row = $db->get_row($result))
{
$row['date'] = strtotime($row['date']);
if ($this->allow_url == "yes")
$loc = $this->home.date('Y/m/d/', $row['date']).$row['alt_name'].".html";
else
$loc = $this->home."index.php?newsid=".$row['id'];
$xml .= $this->get_xml($loc, date("Y-m-d", $row['date']));
}
замените на
И найдите
$result = $db->query("SELECT id, date, alt_name FROM " . PREFIX . "_post WHERE approve=1 ORDER BY fixed DESC, date DESC".$this->limit);
while($row = $db->get_row($result))
{
$row['date'] = strtotime($row['date']);
if ($this->allow_url == "yes")
$loc = $this->home.date('Y/m/d/', $row['date']).$row['alt_name'].".html";
else
$loc = $this->home."index.php?newsid=".$row['id'];
$xml .= $this->get_xml($loc, date("Y-m-d", $row['date']));
}
замените на
$result = $db->query("SELECT id, date, alt_name, category, flag FROM " . PREFIX . "_post WHERE approve=1 ORDER BY fixed DESC, date DESC".$this->limit);
while($row = $db->get_row($result))
{
$row['date'] = strtotime($row['date']);
$row['category'] = intval($row['category']);
if ($this->allow_url == "yes") {
if ($row['flag']) {
if ($row['category']) {
$loc = $this->home.get_url($row['category'])."/".$row['id']."-".$row['alt_name'].".html";
} else {
$loc = $this->home.$row['id']."-".$row['alt_name'].".html";
}
} else {
$loc = $this->home.date('Y/m/d/', $row['date']).$row['alt_name'].".html";
}
} else {
$loc = $this->home."index.php?newsid=".$row['id'];
}
$xml .= $this->get_xml($loc, date("Y-m-d", $row['date']));
}
while($row = $db->get_row($result))
{
$row['date'] = strtotime($row['date']);
$row['category'] = intval($row['category']);
if ($this->allow_url == "yes") {
if ($row['flag']) {
if ($row['category']) {
$loc = $this->home.get_url($row['category'])."/".$row['id']."-".$row['alt_name'].".html";
} else {
$loc = $this->home.$row['id']."-".$row['alt_name'].".html";
}
} else {
$loc = $this->home.date('Y/m/d/', $row['date']).$row['alt_name'].".html";
}
} else {
$loc = $this->home."index.php?newsid=".$row['id'];
}
$xml .= $this->get_xml($loc, date("Y-m-d", $row['date']));
}