summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-05 05:41:19 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-05 05:41:19 +0000
commitfd3e21e2fda37b65b393e26d0e07f94847efb284 (patch)
tree6c5a404030fcef9fa0c37ecbb643675b6e49e33e
parent8e880b4c4124db457244b5a75975c4f6e4531378 (diff)
Move Google Maps block off into its own gmaps module.
-rw-r--r--core/config/config.php1
-rw-r--r--core/libraries/Theme.php1
-rw-r--r--modules/gmaps/helpers/gmaps.php29
-rw-r--r--modules/gmaps/views/gmaps_block.html.php6
-rw-r--r--themes/default/views/sidebar.html.php11
5 files changed, 37 insertions, 11 deletions
diff --git a/core/config/config.php b/core/config/config.php
index 3f0f24d3..13652434 100644
--- a/core/config/config.php
+++ b/core/config/config.php
@@ -126,6 +126,7 @@ $config['modules'] = array
MODPATH . 'tags',
MODPATH . 'user',
MODPATH . 'info',
+ MODPATH . 'gmaps',
THEMEPATH . 'default',
);
diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php
index bee2512f..101cbb42 100644
--- a/core/libraries/Theme.php
+++ b/core/libraries/Theme.php
@@ -44,6 +44,7 @@ class Theme_Core {
'carousel' => carousel::block($this),
'tags' => tags::block($this),
'info' => info::block($this),
+ 'gmaps' => gmaps::block($this),
);
return $blocks;
}
diff --git a/modules/gmaps/helpers/gmaps.php b/modules/gmaps/helpers/gmaps.php
new file mode 100644
index 00000000..3257e760
--- /dev/null
+++ b/modules/gmaps/helpers/gmaps.php
@@ -0,0 +1,29 @@
+<?php defined("SYSPATH") or die("No direct script access.");
+/**
+ * Gallery - a web based photo album viewer and editor
+ * Copyright (C) 2000-2008 Bharat Mediratta
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+class Gmaps_Core {
+ public static function block($theme) {
+ $block = new Block();
+ $block->id = "gMaps";
+ $block->title = _("Location");
+ $block->content = new View("gmaps_block.html");
+ return $block;
+ }
+} \ No newline at end of file
diff --git a/modules/gmaps/views/gmaps_block.html.php b/modules/gmaps/views/gmaps_block.html.php
new file mode 100644
index 00000000..8c5db146
--- /dev/null
+++ b/modules/gmaps/views/gmaps_block.html.php
@@ -0,0 +1,6 @@
+<? defined("SYSPATH") or die("No direct script access."); ?>
+<iframe width="214" height="214" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=mountain+view&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,89.648437&amp;ie=UTF8&amp;z=12&amp;g=mountain+view&amp;ll=37.433704,-122.056046&amp;output=embed&amp;s=AARTsJoyjpSOFMFEv5XZbREeW_hGGS28pQ"></iframe>
+<br />
+<small><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=mountain+view&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,89.648437&amp;ie=UTF8&amp;z=12&amp;g=mountain+view&amp;ll=37.433704,-122.056046&amp;source=embed" style="color:#0000FF;text-align:left"><?= _("View Larger Map") ?></a></small>
+
+
diff --git a/themes/default/views/sidebar.html.php b/themes/default/views/sidebar.html.php
index 472f9870..991c919f 100644
--- a/themes/default/views/sidebar.html.php
+++ b/themes/default/views/sidebar.html.php
@@ -3,15 +3,4 @@
<? foreach ($theme->blocks() as $block): ?>
<?= $block ?>
<? endforeach ?>
-
- <div class="gBlock">
- <div class="gBlockHeader">
- <h2>Location</h2>
- <a href="#" class="minimize">[-]</a>
- </div>
- <iframe class="gBlockContent" width="214" height="214" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=mountain+view&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,89.648437&amp;ie=UTF8&amp;z=12&amp;g=mountain+view&amp;ll=37.433704,-122.056046&amp;output=embed&amp;s=AARTsJoyjpSOFMFEv5XZbREeW_hGGS28pQ"></iframe>
- <br />
- <small class="gBlockContent"><a href="http://maps.google.com/maps?f=q&amp;hl=en&amp;geocode=&amp;q=mountain+view&amp;sll=37.0625,-95.677068&amp;sspn=50.823846,89.648437&amp;ie=UTF8&amp;z=12&amp;g=mountain+view&amp;ll=37.433704,-122.056046&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small>
- </div>
-
</div><!-- END #gSideBar -->