From: Martin Mares Date: Mon, 3 Feb 2014 09:30:31 +0000 (+0100) Subject: GeoHack X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=59e3377a6033937206098c26cd0e0a044a5c24f1;p=gallery.git GeoHack Just experimenting... --- diff --git a/gal/UCW/Gallery.pm b/gal/UCW/Gallery.pm index 045b41f..f4baa1f 100644 --- a/gal/UCW/Gallery.pm +++ b/gal/UCW/Gallery.pm @@ -38,6 +38,9 @@ sub new($) { ParentURL => '../', BackURL => "", FwdURL => "", + + # Hacks + GeoHack => 0, }; return bless $self, $class; } diff --git a/gal/UCW/Gallery/Web/HighSlide.pm b/gal/UCW/Gallery/Web/HighSlide.pm index bf0af46..585b111 100644 --- a/gal/UCW/Gallery/Web/HighSlide.pm +++ b/gal/UCW/Gallery/Web/HighSlide.pm @@ -5,6 +5,7 @@ package UCW::Gallery::Web::HighSlide; use strict; use warnings; +use utf8; use UCW::Gallery; use UCW::Gallery::Web; @@ -65,6 +66,13 @@ sub show_thumb($) { my $photo_url = $self->get('PhotoUrlPrefix') . $self->{gal}->photo_file_name($m, $photo_id); print "
  • "; print "Photo\n"; + if ($self->get('GeoHack')) { + my ($lat, $lon) = ($m->{lat}, $m->{lon}); + if (defined $lat && defined $lon) { + my $cap = "Ukázat na mapě"; + print "
    $cap
    \n"; + } + } } sub run($$) {