'Content-type: text/xml; charset="$Charset"', '_start' => ' '."\n", '_end' => "\n")); SDVA($FeedFmt['georssdc']['item'], array( '_start' => "\n", 'dc:title' => '{$Title}', 'dc:identifier' => '{$PageUrl}', 'dc:date' => '$ItemISOTime', 'dc:type' => 'Text', 'dc:format' => 'text/html', 'dc:description' => '{$Description}', 'dc:subject' => "\$Category\n", 'dc:publisher' => '$WikiTitle', 'dc:author' => '{$LastModifiedBy}', # 'geo:lat' => '{$Latitude}', # 'geo:long' => '{$Longitude}', 'georss:point' => '{$LatLongPoint}', '_end' => "\n")); ## RSS 2.0 settings for ?action=georss ## Note we add two forms of GeoRSS output SDVA($FeedFmt['georss']['feed'], array( '_header' => 'Content-type: text/xml; charset="$Charset"', '_start' => ' '."\n", '_end' => "\n\n", 'title' => '$WikiTitle | {$Group} / {$Title}', 'link' => '{$PageUrl}?action=georss', 'description' => '{$Group}.{$Title}', # 'geo:lat' => '{$Latitude}', # 'geo:long' => '{$Longitude}', 'georss:point' => '{$LatLongPoint}', 'lastBuildDate' => '$FeedRSSTime')); SDVA($FeedFmt['georss']['item'], array( '_start' => "\n", '_end' => "\n", 'title' => '{$Group} / {$Title}', 'link' => '{$PageUrl}', 'description' => '{$Description}', # 'geo:lat' => '{$Latitude}', # 'geo:long' => '{$Longitude}', 'georss:point' => '{$LatLongPoint}', 'dc:contributor' => '{$LastModifiedBy}', 'dc:date' => '$ItemISOTime', 'pubDate' => '$ItemRSSTime', 'enclosure' => 'RSSEnclosure')); ## KML settings for ?action=kml when using pagelists SDVA($FeedFmt['kml']['feed'], array( '_header' => 'Content-type: application/vnd.google-earth.kml+xml', '_start' => ' '."\n", '_end' => "\n\n")); SDVA($FeedFmt['kml']['item'], array( '_start' => "\n", '_end' => "\n", 'name' => '{$Group} / {$Title}', 'descripstart' => 'Link Back,
'.']]>{$Description}', 'descripend' => '
'."\n", 'pointstart' => ''."\n", 'coordinates' => '{$LongCommaLatPoint}', 'pointend' => ''."\n")); ## KML settings for ?action=kml when using single page SDVA($FeedFmt['pagekml']['feed'], array( '_header' => 'Content-type: application/vnd.google-earth.kml+xml', '_start' => ' '."\n", 'placestart' => "\n", 'name' => '{$Group} / {$Title}', 'descripstart' => 'Link Back,
'.']]>{$Description}', 'descripend' => '
'."\n", 'pointstart' => ''."\n", 'coordinates' => '{$LongCommaLatPoint}', 'pointend' => ''."\n", 'placeend' => "
\n", '_end' => "
\n
\n")); SDVA($FeedFmt['pagekml']['item'], array()); if ($action == 'georss') include_once("scripts/feeds.php"); # RSS 2.0 if ($action == 'georssdc') include_once("scripts/feeds.php"); # Dublin Core if ($action == 'kml') include_once("$FarmD/cookbook/georssfeeds.php"); if ($action == 'pagekml') include_once("$FarmD/cookbook/georssfeeds.php"); $FmtPV['$Latitude'] = '@$page["latitude"]'; $SaveProperties[] = 'latitude'; $FmtPV['$Longitude'] = '@$page["longitude"]'; $SaveProperties[] = 'longitude'; Markup('coord', 'directives', "/\\(:coord\\s+(.*?)\\s+(.*?)\\s*:\\)/ei", "PZZ(SetCoord(\$pagename, PSS('$1'), PSS('$2')))"); function SetCoord($pagename, $lat, $long) { foreach (array($lat,$long) as $k => $v) { if (strstr($v,'=')) { $arg = explode('=', $v); if ($arg[0]=='lat') $latitude = $arg[1]; elseif ($arg[0]=='lon') $longitude = $arg[1]; } else { $latitude = $lat; $longitude = $long; } } SetProperty($pagename, 'latitude', $latitude, ', '); SetProperty($pagename, 'longitude', $longitude, ', '); } $HTMLHeaderFmt['georssicbmmeta'] = 'function:GeoRssPrintMetaTags'; function GeoRssPrintMetaTags($pagename, $args) { global $PCache; $x = str_replace("'", ''', @$PCache[$pagename]["=p_latitude"]); $y = str_replace("'", ''', @$PCache[$pagename]["=p_longitude"]); print "\n"; print "\n"; }