=====Google Sitemap Support===== >>==See also== ~-[[GoogleSitemapHandler | Google sitemap handler]] is an improved version of this plugin. >>by BarkerJr This script will generate output compatible with [[http://www.google.com/webmasters/sitemaps/ | Google Sitemap]]. It can then be submitted to the service. Copy and paste the below into a new file and name it with the ".php" extension. You may need to change the path to the [[Docs:ConfigurationOptions | wikka.config.php]] file on the second line, depending on where it's located in your webspace relative to where you place the sitemap file. %%(php) '; $pages = mysql_query('SELECT SQL_NO_CACHE tag, time FROM ' . $wakkaConfig['table_prefix'] . 'pages LEFT JOIN ' . $wakkaConfig['table_prefix'] . "acls ON page_tag = tag WHERE latest = 'Y' AND (read_acl = '*' OR read_acl IS NULL)"); while ($row = mysql_fetch_assoc($pages)) { echo " \n"; echo ' ' . $wakkaConfig['base_url'] . $row['tag'] . "\n"; /* PHP4 doesn't support ISO dates, so we get to play games here... */ $date = date('Y-m-d\TH:i:sO', strtotime($row['time'])); echo ' ' . substr($date, 0, -2) . ':' . substr($date, -2) . "\n"; echo " \n"; } echo ''; ?> %% If you add these two lines, the sitemap will priorize Category-Pages... see [[http://www.vollkornpapier.de/sitemap.php | example on vollkornpapier.de/sitemap.php]] (added by JacobLahr) %%(php) if (substr($row['tag'],0,8)=="Category") echo "1.0\n"; else echo "0.5\n"; %% As noted by StewartPlatt... If you use the ModRewrite code inside .htaccess, you will need to create an exception for this (and probably, also, your verifier) files. Such code to add to your .htaccess would look like: %%(xml) RewriteEngine off RewriteEngine off %% ---- CategoryUserContributions