aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-16 22:06:03 -0700
committerfriendica <info@friendica.com>2015-03-16 22:06:03 -0700
commitbc22df9057198018f9cc490d0e3e013692f52b90 (patch)
treeb7a9bb4470297e85d07317135d8f6c7bd5553c0c /mod
parent7c194c37b891f122740de52d154db0af612e0074 (diff)
downloadvolse-hubzilla-bc22df9057198018f9cc490d0e3e013692f52b90.tar.gz
volse-hubzilla-bc22df9057198018f9cc490d0e3e013692f52b90.tar.bz2
volse-hubzilla-bc22df9057198018f9cc490d0e3e013692f52b90.zip
display a map for photos if allowed. Note: there is a bug in that if the map div starts with display:none one needs to reload the frame or zoom in or they end up at minimum resolution. Still trying to sort this out.
Diffstat (limited to 'mod')
-rw-r--r--mod/photos.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/photos.php b/mod/photos.php
index 58a38f3f3..503a113dc 100644
--- a/mod/photos.php
+++ b/mod/photos.php
@@ -843,6 +843,8 @@ function photos_content(&$a) {
dbesc($datum)
);
+ $map = null;
+
if($linked_items) {
xchan_query($linked_items);
@@ -882,6 +884,10 @@ function photos_content(&$a) {
intval(local_channel())
);
}
+
+ if($link_item['coord']) {
+ $map = generate_map($link_item['coord']);
+ }
}
// logger('mod_photo: link_item' . print_r($link_item,true));
@@ -1115,6 +1121,8 @@ function photos_content(&$a) {
'$tags' => $tags,
'responses' => $responses,
'$edit' => $edit,
+ '$map' => $map,
+ '$map_text' => t('Map'),
'$likebuttons' => $likebuttons,
'$like' => $like_e,
'$dislike' => $dislike_e,