mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:15:13 +00:00
small improvements to profile like activity
This commit is contained in:
parent
ba2ede0a8f
commit
dc8c7a2d2e
2 changed files with 10 additions and 4 deletions
|
@ -1832,8 +1832,7 @@ function get_zcard($channel,$observer_hash = '',$args = array()) {
|
||||||
$cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['scale'];
|
$cover['href'] = z_root() . '/photo/' . $r[0]['resource_id'] . '-' . $r[0]['scale'];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// @fixme remove this when we have a fallback cover photo and use that instead.
|
$cover = $pphoto;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$o .= replace_macros(get_markup_template('zcard.tpl'),array(
|
$o .= replace_macros(get_markup_template('zcard.tpl'),array(
|
||||||
|
|
11
mod/like.php
11
mod/like.php
|
@ -107,13 +107,13 @@ function like_content(&$a) {
|
||||||
// to them.
|
// to them.
|
||||||
$allow_cid = $allow_gid = $deny_cid = $deny_gid = '';
|
$allow_cid = $allow_gid = $deny_cid = $deny_gid = '';
|
||||||
foreach($d as $dd) {
|
foreach($d as $dd) {
|
||||||
$allow_gid .= '<' . $dd['abook_xchan'] . '>';
|
$allow_cid .= '<' . $dd['abook_xchan'] . '>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$post_type = t('channel');
|
$post_type = t('channel');
|
||||||
$objtype = ACTIVITY_OBJ_PROFILE;
|
$objtype = ACTIVITY_OBJ_PROFILE;
|
||||||
|
|
||||||
|
$profile = $r[0];
|
||||||
}
|
}
|
||||||
elseif($obj_type == 'thing') {
|
elseif($obj_type == 'thing') {
|
||||||
|
|
||||||
|
@ -462,6 +462,13 @@ function like_content(&$a) {
|
||||||
if($obj_type === 'thing' && $r[0]['imgurl']) {
|
if($obj_type === 'thing' && $r[0]['imgurl']) {
|
||||||
$arr['body'] .= "\n\n[zmg=80x80]" . $r[0]['imgurl'] . '[/zmg]';
|
$arr['body'] .= "\n\n[zmg=80x80]" . $r[0]['imgurl'] . '[/zmg]';
|
||||||
}
|
}
|
||||||
|
if($obj_type === 'profile') {
|
||||||
|
if($public) {
|
||||||
|
$arr['body'] .= "\n\n" . '[embed]' . z_root() . '/profile/' . $ch[0]['channel_address'] . '[/embed]';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
$arr['body'] .= "\n\n[zmg=80x80]" . $profile['thumb'] . '[/zmg]';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$arr['verb'] = $activity;
|
$arr['verb'] = $activity;
|
||||||
|
|
Loading…
Reference in a new issue