From a8e4ec7801b5ca8c986febed1f95124b412e92f9 Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Tue, 19 Oct 2010 20:52:05 -0700 Subject: use browser geolocation when desired --- mod/display.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'mod/display.php') 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']) ? '' . $item['location'] . '' : ''); + $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); + if($coord) { + if($location) + $location .= '
(' . $coord . ')'; + else + $location = '' . $coord . ''; + } $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']) ? '' . $item['location'] . '' : ''), + '$location' => $location, '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, -- cgit v1.2.3