aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-09 01:35:24 -0700
committerFriendika <info@friendika.com>2011-05-09 01:35:24 -0700
commitbe84d51767366c4538a8203f0046cb5ac06396d6 (patch)
tree04b91c03fd0f2e365291f2917275fe5ee7102948 /include
parent3b51f28d257e556b74e61b7d5340bcc54a3e3311 (diff)
downloadvolse-hubzilla-be84d51767366c4538a8203f0046cb5ac06396d6.tar.gz
volse-hubzilla-be84d51767366c4538a8203f0046cb5ac06396d6.tar.bz2
volse-hubzilla-be84d51767366c4538a8203f0046cb5ac06396d6.zip
use local contact photo if available
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 12c3b2a20..775234284 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -141,7 +141,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 +150,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']) ? '<a target="map" title="' . $item['location'] . '" href="http://maps.google.com/?q=' . urlencode($item['location']) . '">' . $item['location'] . '</a>' : '');
$coord = (($item['coord']) ? '<a target="map" title="' . $item['coord'] . '" href="http://maps.google.com/?q=' . urlencode($item['coord']) . '">' . $item['coord'] . '</a>' : '');
if($coord) {
@@ -388,7 +393,6 @@ function conversation(&$a, $items, $mode, $update) {
$diff_author = ((link_compare($item['url'],$item['author-link'])) ? false : true);
$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);
$sp = false;
$profile_link = best_link_url($item,$sp);
@@ -398,6 +402,15 @@ function conversation(&$a, $items, $mode, $update) {
if($profile_link === 'mailbox')
$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'])) && $diff_author) ? $item['author-avatar'] : $thumb);
+
+
+
+
$like = ((x($alike,$item['id'])) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
$dislike = ((x($dlike,$item['id'])) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');