X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=096ea16c9b7d432b3de449008866e7c8ddd0d482;hb=4a14e51e25c58d5a81b68798f2340c6196dec8ea;hp=bdf6a6f974f4a19c0f99645c14d00ccdda14a4e5;hpb=4bff52990e5f340cf879abf7c1cdaea7ee928d74;p=friendica.git diff --git a/mod/display.php b/mod/display.php index bdf6a6f974..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,18 +219,19 @@ 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'; } } if(($item['contact-id'] == remote_user()) || ($item['uid'] == local_user())) - $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'])); + $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id'], '$delete' => t('Delete'))); else $drop = replace_macros(load_view_file('view/wall_fake_drop.tpl'), array('$id' => $item['id'])); @@ -258,7 +255,11 @@ function display_content(&$a) { $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], - '$title' => t('View $name\'s profile'), + '$linktitle' => t('View $name\'s profile'), + '$olinktitle' => t('View $owner_name\'s profile'), + '$to' => t('to'), + '$wall' => t('Wall-to-Wall'), + '$vwall' => t('via Wall-To-Wall:'), '$profile_url' => $profile_link, '$name' => $profile_name, '$sparkle' => $sparkle,