From: Gavin Carr Date: Sun, 30 Dec 2007 21:12:44 +0000 (+0000) Subject: Add georss support to atomfeed. X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=18f5352338f35fa779bbb313c6266cf0567155db;hp=1c2ded0e43a7f208694862d89c38f8c83688ff61;p=matthijs%2Fupstream%2Fblosxom-plugins.git Add georss support to atomfeed. --- diff --git a/general/atomfeed b/general/atomfeed index 3085995..c8d36c1 100644 --- a/general/atomfeed +++ b/general/atomfeed @@ -4,8 +4,8 @@ # UTC and fixes for 0.3: Frank Hecker # Enclosures support: Dave Slusher and Keith Irwin # Upgrade to Atom 1.0 spec: Sam Pearson -# Replace $feed_url with $path_info_full: Gavin Carr -# Version: 2007-12-17 +# Removed static $feed_url, added georss support: Gavin Carr +# Version: 2007-12-31 # Docs: Included below: type "perldoc atomfeed", or scroll down # Blosxom Home/Docs/Licensing: http://blosxom.sourceforge.net/ @@ -101,6 +101,7 @@ use vars qw/$feed_utc_date/; $category; $links; $summary; +$georss; # ----- plugin subroutines ----- @@ -170,10 +171,17 @@ sub story { use File::stat; # set up : + $category = ''; if ( $path ) { $category = ""; } + # GeoRSS support + $georss = ''; + if ($blosxom::plugins{geo} && $geo::latitude && $geo::longitude) { + $georss = qq($geo::latitude $geo::longitude); + } + # : derive from %blosxom::files my @published_utc = gmtime($blosxom::files{"$blosxom::datadir$path/$filename.$blosxom::file_extension"}); $published_utc_date = sprintf("%4d-%02d-%02dT%02d:%02d:00Z", @@ -260,7 +268,7 @@ sub story { # Parse the post body: ($body_type, $body) = _parse_markup($$body_ref); - 1; + return 1; } sub foot { @@ -366,7 +374,16 @@ sub _load_templates { my $path_info_full = $blosxom::path_info_full || "$blosxom::path_info/index.atom"; $blosxom::template{'atom'}{'head'} =<\$atomfeed::css_url - + \$atomfeed::blog_title \$atomfeed::blog_description @@ -386,7 +403,7 @@ HEAD $atomfeed::title $atomfeed::published_utc_date $atomfeed::updated_utc_date - $atomfeed::category + $atomfeed::category$atomfeed::georss $atomfeed::author $atomfeed::author_uri$atomfeed::author_email