aboutsummaryrefslogtreecommitdiffstats
path: root/mod/display.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-19 20:52:05 -0700
commita8e4ec7801b5ca8c986febed1f95124b412e92f9 (patch)
tree02dde668c26d5b932997139537c99de9ca7242ea /mod/display.php
parent81835acc36f17939b9e202cec2ff8981ca03536b (diff)
downloadvolse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.gz
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.tar.bz2
volse-hubzilla-a8e4ec7801b5ca8c986febed1f95124b412e92f9.zip
use browser geolocation when desired
Diffstat (limited to 'mod/display.php')
-rw-r--r--mod/display.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/mod/display.php b/mod/display.php
index fefef8ad6..84176d293 100644
--- a/mod/display.php
+++ b/mod/display.php
@@ -229,7 +229,14 @@ function display_content(&$a) {
$like = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
$dislike = (($dlike[$item['id']]) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
-
+ $location = (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
+ $coord = (($item['coord']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
+ if($coord) {
+ if($location)
+ $location .= '<br /><span class="smalltext">(' . $coord . ')</span>';
+ else
+ $location = '<span class="smalltext">' . $coord . '</span>';
+ }
$o .= replace_macros($template,array(
'$id' => $item['item_id'],
@@ -242,7 +249,7 @@ function display_content(&$a) {
'$body' => bbcode($item['body']),
'$ago' => relative_date($item['created']),
'$lock' => $lock,
- '$location' => (($item['location']) ? '<a target="map" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : ''),
+ '$location' => $location,
'$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''),
'$owner_url' => $owner_url,
'$owner_photo' => $owner_photo,