add photos to the profile "likes this" dropdowns

This commit is contained in:
redmatrix
2016-02-01 17:42:53 -08:00
parent ff487a0271
commit 723a49ccee
4 changed files with 8 additions and 6 deletions

View File

@@ -1267,7 +1267,7 @@ function advanced_profile(&$a) {
$profile['like_button_label'] = tt('Like','Likes',$profile['like_count'],'noun');
if($likers) {
foreach($likers as $l)
$profile['likers'][] = array('name' => $l['xchan_name'],'url' => zid($l['xchan_url']));
$profile['likers'][] = array('name' => $l['xchan_name'],'photo' => zid($l['xchan_photo_s']), 'url' => zid($l['xchan_url']));
}
if(($a->profile['dob']) && ($a->profile['dob'] != '0000-00-00')) {

View File

@@ -3438,6 +3438,7 @@ function check_item_source($uid, $item) {
if(! $r[0]['src_patt'])
return true;
require_once('include/html2plain.php');
$text = prepare_text($item['body'],$item['mimetype']);
$text = html2plain($text);

View File

@@ -398,16 +398,17 @@ function get_things($profile_hash,$uid) {
$things[$k] = null;
foreach($r as $rr) {
$l = q("select xchan_name, xchan_url from likes left join xchan on likee = xchan_hash where
$l = q("select xchan_name, xchan_photo_s, xchan_url from likes left join xchan on likee = xchan_hash where
target_type = '%s' and target_id = '%s' and channel_id = %d",
dbesc(ACTIVITY_OBJ_THING),
dbesc($rr['obj_obj']),
intval($uid)
);
for($x = 0; $x < count($l); $x ++)
for($x = 0; $x < count($l); $x ++) {
$l[$x]['xchan_url'] = zid($l[$x]['xchan_url']);
$l[$x]['xchan_photo_s'] = zid($l[$x]['xchan_photo_s']);
}
if(! $things[$rr['obj_verb']])
$things[$rr['obj_verb']] = array();