more heavy lifting

This commit is contained in:
friendica
2012-10-23 21:24:23 -07:00
parent 8e8482355b
commit 968b9ce1af
8 changed files with 49 additions and 50 deletions

View File

@@ -141,7 +141,7 @@ class Item extends BaseObject {
else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($this->get_data_value('thumb')));
$profile_avatar = $item['author']['xchan_photo'];
$profile_avatar = $item['author']['xchan_photo_m'];
$locate = array('location' => $item['location'], 'coord' => $item['coord'], 'html' => '');
call_hooks('render_location',$locate);

View File

@@ -56,7 +56,7 @@ function profile_activity($changed, $value) {
$links = array();
$links[] = array('rel' => 'alternate', 'type' => 'text/html', 'href' => $self[0]['profile'] . '?tab=profile');
$links[] = array('rel' => 'photo', 'type' => /*FIXME*/ 'image/jpeg', 'href' => $self[0]['xchan_photo']);
$links[] = array('rel' => 'photo', 'type' => $self[0]['xchan_photo_mimetype'], 'href' => $self[0]['xchan_photo_l']);
$arr['object'] = json_encode(array(
'type' => ACTIVITY_OBJ_PROFILE,

View File

@@ -441,7 +441,7 @@ function prepare_threads_body($a, $items, $cmnt_tpl, $page_writeable, $mode, $pr
else
$profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $a->get_cached_avatar_image($thumb));
$profile_avatar = $item['author']['xchan_photo'];
$profile_avatar = $item['author']['xchan_photo_m'];
$profile_link = zrl($item['author']['xchan_profile']);
$profile_name = $item['author']['xchan_name'];
@@ -1204,7 +1204,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional') {
$profile_avatar = $item['author']['xchan_photo'];
$profile_avatar = $item['author']['xchan_photo_m'];
$profile_link = zrl($item['author']['xchan_profile']);
$profile_name = $item['author']['xchan_name'];

View File

@@ -110,12 +110,14 @@ function create_identity($arr) {
$newuid = $ret['channel']['channel_id'];
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo, xchan_addr, xchan_profile, xchan_name, xchan_network, xchan_photo_date, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
$r = q("insert into xchan ( xchan_hash, xchan_guid, xchan_guid_sig, xchan_pubkey, xchan_photo_l, xchan_photo_m, xchan_photo_s, xchan_addr, xchan_profile, xchan_name, xchan_network, xchan_photo_date, xchan_name_date ) values ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')",
dbesc($hash),
dbesc($ret['channel']['channel_guid']),
dbesc($sig),
dbesc($key['pubkey']),
dbesc($a->get_baseurl() . "/photo/profile/{$newuid}"),
dbesc($a->get_baseurl() . "/photo/profile/l/{$newuid}"),
dbesc($a->get_baseurl() . "/photo/profile/m/{$newuid}"),
dbesc($a->get_baseurl() . "/photo/profile/s/{$newuid}"),
dbesc($ret['channel']['channel_address'] . '@' . $a->get_hostname()),
dbesc(z_root() . '/profile/' . $ret['channel']['channel_address']),
dbesc($ret['channel']['channel_name']),

View File

@@ -56,11 +56,8 @@ function nav(&$a) {
$nav['usermenu'][] = Array('photos/' . $channel['channel_address'], t('Photos'), "", t('Your photos'));
$nav['usermenu'][] = Array('events/', t('Events'), "", t('Your events'));
// user info
$r = q("SELECT micro FROM contact WHERE uid=%d AND self=1", intval($channel['channel_id']));
$userinfo = array(
'icon' => $xchan[0]['xchan_photo'],
$userinfo = array(
'icon' => $xchan[0]['xchan_photo_s'],
'name' => $channel['channel_name'],
);