Fix changefreq in new sitemaps
This commit is contained in:
@@ -31,14 +31,16 @@ while($row = mysql_fetch_row($query)) {
|
||||
if (empty ($row[0])) continue;
|
||||
$ts = ($row[2] > $row[1]) ? date(DATE_W3C, $row[2]) : date(DATE_W3C, $row[1]);
|
||||
$pages = ceil($row[3] / 30);
|
||||
$freq = 'hourly';
|
||||
for (;$pages>=0;$pages--) {
|
||||
?>
|
||||
<url>
|
||||
<loc>http://rock.ru/forum/index.php?topic=<?=$row[0]?>.<?=$pages*30?></loc>
|
||||
<lastmod><?=$ts?></lastmod>
|
||||
<changefreq><?=$pages>0 ? 'daily' : 'hourly'?></changefreq>
|
||||
<changefreq><?=$freq?></changefreq>
|
||||
</url>
|
||||
<?
|
||||
$freq = 'daily';
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user