]> git.mxchange.org Git - friendica.git/blobdiff - mod/display.php
Edited view/sv/cropbody.tpl via GitHub
[friendica.git] / mod / display.php
index 7cefc42e6ceaf90eca21960321b39fa98a94cae5..096ea16c9b7d432b3de449008866e7c8ddd0d482 100644 (file)
@@ -127,6 +127,8 @@ function display_content(&$a) {
                        like_puller($a,$item,$dlike,'dislike');
                }
 
+               $author_contacts = extract_item_authors($r,$a->profile['uid']);
+
                foreach($r as $item) {
 
                        $template = $tpl;
@@ -149,7 +151,12 @@ function display_content(&$a) {
 
                        if(can_write_wall($a,$a->profile['uid'])) {
                                if($item['id'] == $item['parent']) {
-                                       $likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
+                                       $likebuttons = replace_macros($like_tpl,array(
+                                               '$id' => $item['id'],
+                                               '$likethis' => t("I like this \x28toggle\x29"),
+                                               '$nolike' => t("I don't like this \x28toggle\x29"),
+                                               '$wait' => t('Please wait') 
+                                       ));
                                }
                                if($item['last-child']) {
                                        $comment = replace_macros($cmnt_tpl,array(
@@ -172,17 +179,6 @@ function display_content(&$a) {
                        $sparkle = '';
 
 
-                       $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
-
-                       // I think this is redundant now but too chicken to remove it unless
-                       // I've had six cups of coffee and tested it completely
-
-                       if(($item['network'] === 'dfrn') && (! $item['self'] )) {
-                               $profile_url = $redirect_url;
-                               $sparkle = ' sparkle';
-                       }
-
-
                        // Top-level wall post not written by the wall owner (wall-to-wall)
                        // First figure out who owns it. 
 
@@ -223,13 +219,14 @@ function display_content(&$a) {
                        // Can we use our special contact URL for this author? 
 
                        if(strlen($item['author-link'])) {
-                               if((link_compare($item['author-link'],$item['url'])) && ($item['network'] === 'dfrn') && (! $item['self'])) {
+                               $profile_link = $item['author-link'];
+                               if(link_compare($item['author-link'],$item['url']) && ($item['network'] === 'dfrn') && (! $item['self'])) {
                                        $profile_link = $redirect_url;
                                        $sparkle = ' sparkle';
                                }
-                               else {
-                                       $profile_link = $item['author-link'];
-                                       $sparkle = '';
+                               elseif(isset($author_contacts[$item['author-link']])) {
+                                       $profile_link = $a->get_baseurl() . '/redir/' . $author_contacts[$item['author-link']];
+                                       $sparkle = ' sparkle';
                                }
                        }