X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fnetwork.php;h=43c55b8e3f4dee124e16a27e94aec165be6fa430;hb=ded2812799a63ba159072281d04cb08e1128b4af;hp=a6e03440b42fb8d15d5f4def1f21f59da883646c;hpb=f0b640058427aff2d9d60899f9005980ab89c0ef;p=friendica.git diff --git a/mod/network.php b/mod/network.php index a6e03440b4..43c55b8e3f 100644 --- a/mod/network.php +++ b/mod/network.php @@ -38,10 +38,11 @@ function network_content(&$a, $update = 0) { $a->page['htmlhead'] .= replace_macros($tpl, array( '$baseurl' => $a->get_baseurl(), - '$geotag' => $geotag + '$geotag' => $geotag, + '$nickname' => $a->user['nickname'] )); - require_once('view/acl_selectors.php'); + require_once('include/acl_selectors.php'); $tpl = load_view_file("view/jot.tpl"); @@ -156,17 +157,21 @@ function network_content(&$a, $update = 0) { $template = $tpl; $commentww = ''; $owner_url = $owner_photo = $owner_name = ''; + $profile_url = $item['url']; + $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ; if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($item['id'] != $item['parent'])) continue; - $lock = (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) - || strlen($item['deny_cid']) || strlen($item['deny_gid'])) + + $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) + || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? '
' . t('Private Message') . '
' : '
'); + // Top-level wall post not written by the wall owner (wall-to-wall) // First figure out who owns it. @@ -237,8 +242,11 @@ function network_content(&$a, $update = 0) { // Post was remotely authored. - $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); - $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $thumb); + $diff_author = (($item['url'] !== $item['author-link']) ? true : false); + + $profile_name = (((strlen($item['author-name'])) && $diff_author) ? $item['author-name'] : $item['name']); + $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb); + $profile_link = $profile_url; @@ -268,6 +276,12 @@ function network_content(&$a, $update = 0) { $location = '' . $coord . ''; } + $indent = (($item['parent'] != $item['item_id']) ? ' comment' : ''); + + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) + $indent .= ' shiny'; + + // Build the HTML $o .= replace_macros($template,array( @@ -278,11 +292,11 @@ function network_content(&$a, $update = 0) { '$osparkle' => $osparkle, '$sparkle' => $sparkle, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, - '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), + '$indent' => $indent, '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, '$owner_name' => $owner_name,