X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fphotos.php;h=5ca973d16637d4db92434c2d43fbb6a1313827f9;hb=835e6c4955c9e1c160c02c21e8df7ca7beabd2fb;hp=834fab33fdb7459b6e324f8b833a0db3a825b31b;hpb=b6781f5e40eff8ddc714fb96207c0ddfa574d403;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 834fab33fd..5ca973d166 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -18,6 +18,8 @@ function photos_init(&$a) { return; } + nav_set_selected('home'); + $o = ''; if($a->argc > 1) { @@ -546,7 +548,7 @@ function photos_post(&$a) { if(count($links)) { foreach($links as $link) { if($link['@attributes']['rel'] === 'http://webfinger.net/rel/profile-page') - $profile = $link['@attributes']['href']; + $profile = $link['@attributes']['href']; if($link['@attributes']['rel'] === 'salmon') { $salmon = '$url:' . str_replace(',','%sc',$link['@attributes']['href']); if(strlen($inform)) @@ -1633,18 +1635,22 @@ function photos_content(&$a) { $like = ''; $dislike = ''; + $conv_responses = array( + 'like' => array('title' => t('Likes','title')),'dislike' => array('title' => t('Dislikes','title')), + 'attendyes' => array('title' => t('Attending','title')), 'attendno' => array('title' => t('Not attending','title')), 'attendmaybe' => array('title' => t('Might attend','title')) + ); + // display comments if(count($r)) { foreach($r as $item) { - like_puller($a,$item,$alike,'like'); - like_puller($a,$item,$dlike,'dislike'); + builtin_activity_puller($item, $conv_responses); } - $like = ((isset($alike[$link_item['id']])) ? format_like($alike[$link_item['id']],$alike[$link_item['id'] . '-l'],'like',$link_item['id']) : ''); - $dislike = ((isset($dlike[$link_item['id']])) ? format_like($dlike[$link_item['id']],$dlike[$link_item['id'] . '-l'],'dislike',$link_item['id']) : ''); + $like = ((x($conv_responses['like'],$link_item['uri'])) ? format_like($conv_responses['like'][$link_item['uri']],$conv_responses['like'][$link_item['uri'] . '-l'],'like',$link_item['id']) : ''); + $dislike = ((x($conv_responses['dislike'],$link_item['uri'])) ? format_like($conv_responses['dislike'][$link_item['uri']],$conv_responses['dislike'][$link_item['uri'] . '-l'],'dislike',$link_item['id']) : ''); @@ -1763,6 +1769,12 @@ function photos_content(&$a) { $paginate = paginate($a); } + + $response_verbs = array('like'); + if(feature_enabled($owner_uid,'dislike')) + $response_verbs[] = 'dislike'; + $responses = get_responses($conv_responses,$response_verbs,'',$link_item); + $photo_tpl = get_markup_template('photo_view.tpl'); if($a->theme['template_engine'] === 'internal') { @@ -1794,6 +1806,7 @@ function photos_content(&$a) { '$likebuttons' => $likebuttons, '$like' => $like_e, '$dislike' => $dikslike_e, + 'responses' => $responses, '$comments' => $comments, '$paginate' => $paginate, ));