X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=bdf6a6f974f4a19c0f99645c14d00ccdda14a4e5;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=de11ec35d65f08836f23d4a5838507fdb604f4f5;hpb=030f6f306cba0f025d124fc7a2912a2bafb291be;p=friendica.git diff --git a/mod/display.php b/mod/display.php index de11ec35d6..bdf6a6f974 100644 --- a/mod/display.php +++ b/mod/display.php @@ -153,7 +153,8 @@ function display_content(&$a) { } if($item['last-child']) { $comment = replace_macros($cmnt_tpl,array( - '$return_path' => $_SESSION['return_url'], + '$return_path' => '', + '$jsreload' => $_SESSION['return_url'], '$type' => 'wall-comment', '$id' => $item['item_id'], '$parent' => $item['parent'], @@ -173,6 +174,9 @@ function display_content(&$a) { $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'; @@ -216,7 +220,18 @@ function display_content(&$a) { $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $item['thumb']); - $profile_link = $profile_url; + // 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 = $redirect_url; + $sparkle = ' sparkle'; + } + else { + $profile_link = $item['author-link']; + $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'])); @@ -258,6 +273,7 @@ function display_content(&$a) { '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, '$owner_name' => $owner_name, + '$plink' => get_plink($item), '$drop' => $drop, '$vote' => $likebuttons, '$like' => $like, @@ -291,6 +307,9 @@ function display_content(&$a) { } } + + $o .= '
' . t('Shared content is covered by the Creative Commons Attribution 3.0 license.') . '
'; + return $o; }