Restore the old ROBOTS meta tag
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 8 Mar 2009 17:29:05 +0000 (17:29 +0000)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Sun, 8 Mar 2009 17:29:05 +0000 (17:29 +0000)
git-svn-id: file:///Users/dpage/pgweb/svn-repo/trunk@2430 8f5c7a92-453e-0410-a47f-ad33c8a6b003

archives/html/msgtop.php
archives/templates/html/msgheader.html

index 8fb4cec0129d50ee5080290ecd6c4ba6091aeca5..43e47c34d27adb49693d0b5e07ab00a55263dc98 100644 (file)
@@ -8,8 +8,19 @@ $tmpldir = $_SERVER['DOCUMENT_ROOT'] . "/../templates";
 
 $tpl =& new HTML_Template_Sigma($tmpldir."/html");
 
+$message_page = false;
+if (strstr($_SERVER['PHP_SELF'], "message-id") ||
+       strstr($_SERVER['PHP_SELF'], "/msg"))
+       $message_page = true;
+
 $tpl->loadTemplateFile('msgheader.html');
 $tpl->setVariable('title', $title);
+if ($message_page)
+       $robots = "nofollow, index, archive";
+else
+       $robots = "follow, noindex, noarchive";
+$tpl->setVariable('robots', $robots);
+
 if (!isset($base))
 {
        $tpl->hideBlock('baseblock');
index 65e08670e526c3e1747d436b6474e28c2c63c6a4..692a0e1329b9b893a4fd08cf8e92ab6715c6c916 100644 (file)
@@ -12,6 +12,6 @@
   <meta name="rating" content="General" />
   <meta name="distribution" content="Global" />
   <meta name="revisit-after"  content="7 days" />
-  <meta name="robots" content="follow, noindex, noarchive" />
+  <meta name="robots" content="{robots}" />
   <title>{title}</title>