X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=096ea16c9b7d432b3de449008866e7c8ddd0d482;hb=8c245a5d2f4e6882211ac17561f86537a7089c73;hp=7cefc42e6ceaf90eca21960321b39fa98a94cae5;hpb=56415329368d3c93b64ad6490d56a2f0ff82ab68;p=friendica.git diff --git a/mod/display.php b/mod/display.php index 7cefc42e6c..096ea16c9b 100644 --- a/mod/display.php +++ b/mod/display.php @@ -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'; } }