* (site locale and site url), then iterating over site language information fetch * the root node of the content tree (settings based) in each language and then all * child nodes in each language. Next iterating over an array of all nodes in all * locales, for each node, generate the sitemap xml representing that node. * * Finally a valid xml sitemap file is written out to disk (settings based var/ dir root by default) * * File containing the bcgooglesitemaps siteaccess sitemap generator cronjob part * */ /** * BC: In testing multi-lingual sites with single language siteaccess installations * we have found it is tipically best for the cronjob mode to be disabled. Otherwise * content in all possible languages is returned in subtree results. */ eZContentLanguage::clearCronjobMode(); /** * Get a reference to eZINI. append.php will be added automatically. */ $ini = eZINI::instance('site.ini'); $bcgooglesitemapsINI = eZINI::instance('bcgooglesitemaps.ini'); /** * BC: Testing for settings required by the script and defining other variables required by the script */ if ($bcgooglesitemapsINI->hasVariable('BCGoogleSitemapSettings', 'SitemapRootNodeID') && $bcgooglesitemapsINI->hasVariable('BCGoogleSitemapSettings', 'Path') && $bcgooglesitemapsINI->hasVariable('BCGoogleSitemapSettings', 'Filename') && $bcgooglesitemapsINI->hasVariable('BCGoogleSitemapSettings', 'Filesuffix') && $bcgooglesitemapsINI->hasVariable('BCGoogleSitemapSettings', 'Protocol') && $bcgooglesitemapsINI->hasVariable('Classes', 'ClassFilterType') && $bcgooglesitemapsINI->hasVariable('Classes', 'ClassFilterArray') && $ini->hasVariable('SiteSettings', 'SiteURL') && $ini->hasVariable('FileSettings', 'VarDir')) { /** * BC: Define root content tree node ID */ $sitemapRootNodeID = $bcgooglesitemapsINI->variable('BCGoogleSitemapSettings', 'SitemapRootNodeID'); /** * BC: Define the sitemap basename and output file suffix