X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fconversation.php;h=4fa4b92ada48b11db0eb2769956ac81e6931bc9f;hb=21769d7390a0bcfb5c74e53c05867ab52a54448b;hp=12c3b2a20d38585c2367b36bdc4618c4288e510c;hpb=2c63b65e3c66bcb0a047ce51c04d23376aa6c525;p=friendica.git diff --git a/include/conversation.php b/include/conversation.php index 12c3b2a20d..4fa4b92ada 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -91,6 +91,11 @@ function conversation(&$a, $items, $mode, $update) { $page_writeable = can_write_wall($a,$profile_owner); } + if($mode === 'notes') { + $profile_owner = $a->profile['profile_uid']; + $page_writeable = true; + } + if($mode === 'display') { $profile_owner = $a->profile['uid']; $page_writeable = can_write_wall($a,$profile_owner); @@ -104,11 +109,11 @@ function conversation(&$a, $items, $mode, $update) { load_contact_links(local_user()); - $cmnt_tpl = load_view_file('view/comment_item.tpl'); - $like_tpl = load_view_file('view/like.tpl'); - $noshare_tpl = load_view_file('view/like_noshare.tpl'); - $tpl = load_view_file('view/wall_item.tpl'); - $wallwall = load_view_file('view/wallwall_item.tpl'); + $cmnt_tpl = get_markup_template('comment_item.tpl'); + $like_tpl = get_markup_template('like.tpl'); + $noshare_tpl = get_markup_template('like_noshare.tpl'); + $tpl = get_markup_template('wall_item.tpl'); + $wallwall = get_markup_template('wallwall_item.tpl'); $alike = array(); $dlike = array(); @@ -120,8 +125,8 @@ function conversation(&$a, $items, $mode, $update) { // "New Item View" on network page or search page results // - just loop through the items and format them minimally for display - $tpl = load_view_file('view/search_item.tpl'); - $droptpl = load_view_file('view/wall_fake_drop.tpl'); + $tpl = get_markup_template('search_item.tpl'); + $droptpl = get_markup_template('wall_fake_drop.tpl'); foreach($items as $item) { @@ -141,7 +146,6 @@ function conversation(&$a, $items, $mode, $update) { $nickname = $a->user['nickname']; $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']); - $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); $sp = false; $profile_link = best_link_url($item,$sp); @@ -151,6 +155,12 @@ function conversation(&$a, $items, $mode, $update) { $profile_link = ''; + $normalised = normalise_link((strlen($item['author-link'])) ? $item['author-link'] : $item['url']); + if(($normalised != 'mailbox') && (x($a->contacts[$normalised]))) + $profile_avatar = $a->contacts[$normalised]['thumb']; + else + $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']); + $location = (($item['location']) ? '' . $item['location'] . '' : ''); $coord = (($item['coord']) ? '' . $item['coord'] . '' : ''); if($coord) { @@ -258,11 +268,11 @@ function conversation(&$a, $items, $mode, $update) { $item_writeable = (($item['writable'] || $item['self']) ? true : false); - if($blowhard == $item['cid'] && (! $item['self']) && ($mode != 'profile')) { + if($blowhard == $item['cid'] && (! $item['self']) && ($mode != 'profile') && ($mode != 'notes')) { $blowhard_count ++; if($blowhard_count == 3) { $o .= '' . '