View Single Post
  #3  
Old 11-13-2007, 04:24 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,026
 

Default Re: Free Sitemap addon, works with XC SEO

Joh nice mod. Looks good too. By the way for some reason (maybe something I've changed before in other files) I had to put the 2 tpl files in skin1/customer and change the path in them to point to skin1/customer. Also when I first tried it I got a php error - "Invalid argument supplied for foreach()" for $pages. I do not have static pages defined on my site and the query for $pages returns empty string. This is a bug in php - look here http://pear.php.net/bugs/bug.php?id=1983 and here http://pear.php.net/bugs/bug.php?id=5216. I guess I'm missing some bug fixes but what I did to go around it is I changed the following code in sitemap.php and works fine.

this code
PHP Code:
if (!empty($active_modules["XC_SEO"])){
foreach(
$pages AS $k=>$page) {
$pages[$k]['seo_url'] = $seo->_pages_callback(array("pages.php?pageid=".$page['pageid'],false,'','pageid='.$page['pageid'],'',''), true$page['title']);
}


with this code
PHP Code:
if (!empty($pages)){
if (!empty(
$active_modules["XC_SEO"])){
foreach(
$pages AS $k=>$page) {
$pages[$k]['seo_url'] = $seo->_pages_callback(array("pages.php?pageid=".$page['pageid'],false,'','pageid='.$page['pageid'],'',''), true$page['title']);
}
}


Just thought maybe someone else had the same as me and this might help them. Thanks Jon.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote