*** wiki.pl	2004-05-25 18:26:38.000000000 +0200
--- larpwiki-robots-nofollow.pl	2004-05-25 18:28:26.000000000 +0200
***************
*** 26,31 ****
--- 26,33 ----
  #    59 Temple Place, Suite 330
  #    Boston, MA 02111-1307 USA
  
+ # applied patch: larpwiki-robots-nofollow.diff
+ 
  package UseModWiki;
  use strict;
  local $| = 1;  # Do not buffer output (localized for mod_perl)
***************
*** 1291,1297 ****
    if ($FreeLinks) {
      $title =~ s/_/ /g;   # Display as spaces
    }
!   $result .= &GetHtmlHeader("$SiteName: $title");
    return $result  if ($embed);
  
    $result .= '<div class=wikiheader>';
--- 1293,1299 ----
    if ($FreeLinks) {
      $title =~ s/_/ /g;   # Display as spaces
    }
!   $result .= &GetHtmlHeader("$SiteName: $title", $id);
    return $result  if ($embed);
  
    $result .= '<div class=wikiheader>';
***************
*** 1342,1348 ****
  }
  
  sub GetHtmlHeader {
!   my ($title) = @_;
    my ($dtd, $html, $bodyExtra, $stylesheet);
  
    $html = '';
--- 1344,1350 ----
  }
  
  sub GetHtmlHeader {
!   my ($title, $id) = @_;
    my ($dtd, $html, $bodyExtra, $stylesheet);
  
    $html = '';
***************
*** 1367,1372 ****
--- 1369,1388 ----
    if ($stylesheet ne '') {
      $html .= qq(<LINK REL="stylesheet" HREF="$stylesheet">\n);
    }
+   # INDEX,NOFOLLOW tag for wiki pages only so that the robot doesn't index
+   # history pages.  INDEX,FOLLOW tag for RecentChanges and the index of all
+   # pages.  We need the INDEX here so that the spider comes back to these
+   # pages, since links from ordinary pages to RecentChanges or the index will
+   # not be followed.
+   if (($id eq $RCName) or (T($RCName) eq $id) or (T($id) eq $RCName)
+       or (lc (GetParam('action', '')) eq 'index')) {
+     $html .= '<meta name="robots" content="INDEX,FOLLOW">';
+   } elsif ($id eq '') {
+     $html .= '<meta name="robots" content="NOINDEX,NOFOLLOW">';
+   } else {
+     $html .= '<meta name="robots" content="INDEX,NOFOLLOW">';
+   }
+   #finish
    $html .= $UserHeader;
    $bodyExtra = '';
    if ($UserBody ne '') {
