diff options
author | friendica <info@friendica.com> | 2015-02-16 17:01:13 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-02-16 17:01:13 -0800 |
commit | 533f39debe494dc826570ff030fcda35041d9038 (patch) | |
tree | 5acd57c5d5d9506995482b4911054f529f592d91 /mod | |
parent | 1d1676094dd82482f113d6de9c2a95407a1a692f (diff) | |
download | volse-hubzilla-533f39debe494dc826570ff030fcda35041d9038.tar.gz volse-hubzilla-533f39debe494dc826570ff030fcda35041d9038.tar.bz2 volse-hubzilla-533f39debe494dc826570ff030fcda35041d9038.zip |
bring back like/dislike summaries on photos
Diffstat (limited to 'mod')
-rw-r--r-- | mod/photos.php | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/mod/photos.php b/mod/photos.php index 8ac6ed3d7..297790f6e 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -974,13 +974,21 @@ function photos_content(&$a) { $like = ''; $dislike = ''; + $conv_responses = array( + 'like' => array('title' => t('Likes','title')),'dislike' => array('title' => t('Dislikes','title')), + 'agree' => array('title' => t('Agree','title')),'disagree' => array('title' => t('Disagree','title')), 'abstain' => array('title' => t('Abstain','title')), + 'attendyes' => array('title' => t('Attending','title')), 'attendno' => array('title' => t('Not attending','title')), 'attendmaybe' => array('title' => t('Might attend','title')) + ); + + + if($r) { -// foreach($r as $item) { -// like_puller($a,$item,$alike,'like'); -// like_puller($a,$item,$dlike,'dislike'); -// } + foreach($r as $item) { + builtin_activity_puller($item, $conv_responses); + } + $like_count = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid']] : ''); $like_list = ((x($alike,$link_item['mid'])) ? $alike[$link_item['mid'] . '-l'] : ''); @@ -1084,6 +1092,13 @@ function photos_content(&$a) { $dislike_e = $dislike; + $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'); $o .= replace_macros($photo_tpl, array( '$id' => $link_item['id'], //$ph[0]['id'], @@ -1098,6 +1113,7 @@ function photos_content(&$a) { '$unknown' => t('Unknown'), '$tag_hdr' => t('In This Photo:'), '$tags' => $tags, + 'responses' => $responses, '$edit' => $edit, '$likebuttons' => $likebuttons, '$like' => $like_e, |