Thanks
Great that works fine
Now is there anyway of stopping it putting these and any un needed lines
thanks Lewis
Quote:
Originally Posted by cflsystems
Actually the code I posted fixes the code you are reffering to. But you can still use the code you have just replace
Code:
if (is_array($cats[0]))
foreach($cats as $ca) {
if ($ca["clean_url"] == "")
$url = $http_location.'/home.php?cat='.$ca["categoryid"];
else
$url = $http_location.'/'.$ca["clean_url"];
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>';
}
if (is_array($mans[0]))
foreach($mans as $ma) {
if ($ca["clean_url"] == "")
$url = $http_location.'/manufacturers.php?manufacturerid='.$ma["manufacturerid"];
else
$url = $http_location.'/'.$ma["clean_url"];
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>';
}
if (is_array($prods[0]))
foreach($prods as $pr) {
if ($pr["clean_url"] == "")
$url = $http_location.'/product.php?productid='.$pr["productid"];
else
$url = $http_location.'/'.$pr["clean_url"];
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>';
}
if (is_array($pages[0]))
foreach($pages as $pa) {
if ($pa["clean_url"] == "")
$url = $http_location.'/pages.php?pageid='.$pa["pageid"];
else
$url = $http_location.'/'.$pa["clean_url"];
$xml .= '<url>
<loc>'.$url.'</loc>
<lastmod>'.$today.'</lastmod>
<changefreq>monthly</changefreq>
<priority>0.6</priority>
</url>';
}
with this
Code:
if (is_array($cats[0]))
foreach($cats as $ca) {
if ($ca["clean_url"] == "")
$url = $http_location.'/home.php?cat='.$ca["categoryid"];
else
$url = $http_location.'/'.$ca["clean_url"].$config['SEO']['clean_urls_ext_c'];
$xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
}
if (is_array($mans[0]))
foreach($mans as $ma) {
if ($ca["clean_url"] == "")
$url = $http_location.'/manufacturers.php?manufacturerid='.$ma["manufacturerid"];
else
$url = $http_location.'/'.$ma["clean_url"].$config['SEO']['clean_urls_ext_m'];
$xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
}
if (is_array($prods[0]))
foreach($prods as $pr) {
if ($pr["clean_url"] == "")
$url = $http_location.'/product.php?productid='.$pr["productid"];
else
$url = $http_location.'/'.$pr["clean_url"].$config['SEO']['clean_urls_ext_p'];
$xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
}
if (is_array($pages[0]))
foreach($pages as $pa) {
if ($pa["clean_url"] == "")
$url = $http_location.'/pages.php?pageid='.$pa["pageid"];
else
$url = $http_location.'/'.$pa["clean_url"].$config['SEO']['clean_urls_ext_s'];
$xml .= '<url><loc>'.$url.'</loc><lastmod>'.$today.'</lastmod><changefreq>weekly</changefreq><priority>0.5</priority></url>
';
}
|