aboutsummaryrefslogtreecommitdiff
path: root/mod/ecml/views
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-15 15:29:12 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-15 15:29:12 +0000
commit08b4a8007503f580ebe85527124b452de5832dd3 (patch)
tree7f812d9dd62e1107d09fadddab6acdcf32ae5fb6 /mod/ecml/views
parent1743d42e12f18ee914be5095851597d7943d626e (diff)
downloadelgg-08b4a8007503f580ebe85527124b452de5832dd3.tar.gz
elgg-08b4a8007503f580ebe85527124b452de5832dd3.tar.bz2
Googlemaps support added for ECML.
git-svn-id: http://code.elgg.org/elgg/trunk@5744 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/ecml/views')
-rw-r--r--mod/ecml/views/default/ecml/keywords/googlemaps.php31
1 files changed, 31 insertions, 0 deletions
diff --git a/mod/ecml/views/default/ecml/keywords/googlemaps.php b/mod/ecml/views/default/ecml/keywords/googlemaps.php
new file mode 100644
index 000000000..c75023045
--- /dev/null
+++ b/mod/ecml/views/default/ecml/keywords/googlemaps.php
@@ -0,0 +1,31 @@
+<?php
+/**
+ * ECML Google Maps support
+ *
+ * @package ECML
+ * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2
+ * @author Curverider Ltd
+ * @copyright Curverider Ltd 2008-2010
+ * @link http://elgg.org/
+ */
+
+$src = (isset($vars['src'])) ? $vars['src'] : FALSE;
+$width = (isset($vars['width'])) ? $vars['width'] : 425;
+$height = (isset($vars['height'])) ? $vars['height'] : 350;
+
+if ($src) {
+ $embed_src = elgg_http_add_url_query_elements($src, array('output' => 'embed'));
+ $link_href = elgg_http_add_url_query_elements($src, array('source' => 'embed'));
+
+ echo "
+
+<iframe width=\"$width\" height=\"$height\" frameborder=\"0\" scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src=\"$embed_src\"></iframe>
+<br />
+<small>
+ <a href=\"$link_href\" style=\"color:#0000FF;text-align:left\">
+ " . elgg_echo('ecml:googlemaps:view_larger_map') . "
+ </a>
+</small>
+
+";
+} \ No newline at end of file