2 # Author(s): Gavin Carr <gavin@openfusion.com.au>
4 # Documentation: 'perldoc geo'
9 use vars qw($latitude $longitude);
13 # Return the first existing metadata item key and value given a list of keys
16 my $meta_attr = $attr;
17 $meta_attr =~ s/-/_/g;
18 my $value = $blosxom::meta{$meta_attr};
19 $value = eval "\$meta::$attr" unless defined $value;
20 return wantarray ? ( $attr, $value ) : $value if defined $value;
22 return wantarray ? () : undef;
26 $latitude = _get_meta('geolatitude', 'latitude');
27 $longitude = _get_meta('geolongitude', 'longitude');
38 geo - blosxom plugin to set $geo::latitude and $geo::longitude
39 story variables from metadata items
43 geo - blosxom plugin to set story $geo::latitude and $geo::longitude
44 story variables from metadata items.
46 =head2 REQUIRED METADATA ITEMS
50 =item Latitude (or GeoLatitude)
52 A decimal between -90.0 (South Pole) and +90.0 (North Pole), indicating
55 =item Longitude (or GeoLongitude)
57 A decimal between -180.0 (western hemisphere) and +180.0 (eastern hemisphere),
58 indicating degrees of longitude.
62 If any required metadata is missing the plugin just skips the story.
68 If using the L<metamail> plugin:
74 If using the L<meta> plugin:
77 meta-latitude: -33.717770
78 meta-longitude: 151.115886
82 geo should be loaded after your meta plugins (typically either
83 L<metamail> or L<meta>).
87 Blosxom: http://blosxom.sourceforge.net/
91 Gavin Carr <gavin@openfusion.com.au>, http://www.openfusion.net/
95 Copyright 2007, Gavin Carr.
97 This plugin is licensed under the same terms as blosxom itself i.e.
99 Permission is hereby granted, free of charge, to any person obtaining a
100 copy of this software and associated documentation files (the "Software"),
101 to deal in the Software without restriction, including without limitation
102 the rights to use, copy, modify, merge, publish, distribute, sublicense,
103 and/or sell copies of the Software, and to permit persons to whom the
104 Software is furnished to do so, subject to the following conditions:
106 The above copyright notice and this permission notice shall be included
107 in all copies or substantial portions of the Software.
109 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
110 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
111 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
112 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
113 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
114 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
115 OTHER DEALINGS IN THE SOFTWARE.