From fd0dfe4100498bea3c429afb28a367ba33d23ea2 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 30 Sep 2012 15:50:47 +0300 Subject: [PATCH] Sitemap Plugin: basic search engine optimization --- plugins/box/sitemap/sitemap.plugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/box/sitemap/sitemap.plugin.php b/plugins/box/sitemap/sitemap.plugin.php index 6b1f9e3..468c237 100644 --- a/plugins/box/sitemap/sitemap.plugin.php +++ b/plugins/box/sitemap/sitemap.plugin.php @@ -120,8 +120,8 @@ $map = ''."\n"; $map .= ''."\n"; foreach ($pages_list as $page) { - if ($page['parent'] != '') { $parent = $page['parent'].'/'; } else { $parent = ''; } - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').$parent.$page['slug'].''."\n\t\t".''.date("Y-m-d", (int)$page['date']).''."\n\t\t".'weekly'."\n\t\t".'1.0'."\n\t".''."\n"; + if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '2'; } else { $parent = ''; $priority = '1'; } + $map .= "\t".''."\n\t\t".''.Option::get('siteurl').$parent.$page['slug'].''."\n\t\t".''.date("Y-m-d", (int)$page['date']).''."\n\t\t".'weekly'."\n\t\t".''.$priority.''."\n\t".''."\n"; } // Get list of components @@ -130,7 +130,7 @@ // Add components to sitemap if (count($components) > 0) { foreach ($components as $component) { - $map .= "\t".''."\n\t\t".''.Option::get('siteurl').Text::lowercase($component).''."\n\t\t".''.date("Y-m-d", time()).''."\n\t\t".'weekly'."\n\t\t".'1.0'."\n\t".''."\n"; + $map .= "\t".''."\n\t\t".''.Option::get('siteurl').Text::lowercase($component).''."\n\t\t".''.date("Y-m-d", time()).''."\n\t\t".'weekly'."\n\t\t".'1'."\n\t".''."\n"; } }