]> git.mxchange.org Git - friendica.git/commitdiff
add render_location hook to both sets of conversations
authorfriendica <info@friendica.com>
Fri, 10 Feb 2012 02:09:28 +0000 (18:09 -0800)
committerfriendica <info@friendica.com>
Fri, 10 Feb 2012 02:09:28 +0000 (18:09 -0800)
include/conversation.php

index 9df7b20e934049ec9eda0b26ed1f81ecb0836951..35abb29ca58e216a25fadf846f19997ed284ec4f 100755 (executable)
@@ -262,7 +262,7 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                else
                                        $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
 
-                               $locate = array('location' => $item_location, 'coord' => $item['coord'], 'html' => '');
+                               $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
                                call_hooks('render_location',$locate);
 
                                $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
@@ -589,16 +589,10 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
                                $like    = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
                                $dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
 
-                               $location = (($item['location']) ? '<a target="map" title="' . $item['location'] 
-                                       . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
-                               $coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] 
-                                       . '" 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>';
-                               }
+                               $locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
+                               call_hooks('render_location',$locate);
+
+                               $location = ((strlen($locate['html'])) ? $locate['html'] : render_location_google($locate));
 
                                $indent = (($toplevelpost) ? '' : ' comment');