aboutsummaryrefslogtreecommitdiffstats
path: root/include/conversation.php
diff options
context:
space:
mode:
Diffstat (limited to 'include/conversation.php')
-rw-r--r--include/conversation.php19
1 files changed, 10 insertions, 9 deletions
diff --git a/include/conversation.php b/include/conversation.php
index a1acc456a..e6ba1fa6e 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -614,6 +614,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
$owner_photo = '';
$owner_name = '';
$sparkle = '';
+ $is_new = false;
if($mode === 'search' || $mode === 'community') {
if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE)))
@@ -682,6 +683,9 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
$has_tags = (($body['tags'] || $body['categories'] || $body['mentions'] || $body['attachments'] || $body['folders']) ? true : false);
+ if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
+ $is_new = true;
+
$tmp_item = array(
'template' => $tpl,
'toplevel' => 'toplevel_item',
@@ -738,6 +742,7 @@ function conversation(&$a, $items, $mode, $update, $page_mode = 'traditional', $
'wait' => t('Please wait'),
'thread_level' => 1,
'has_tags' => $has_tags,
+ 'is_new' => $is_new
);
$arr = array('item' => $item, 'output' => $tmp_item);
@@ -1176,8 +1181,8 @@ function builtin_activity_puller($item, &$conv_responses) {
if((activity_match($item['verb'], $verb)) && ($item['id'] != $item['parent'])) {
$name = (($item['author']['xchan_name']) ? $item['author']['xchan_name'] : t('Unknown'));
$url = (($item['author_xchan'] && $item['author']['xchan_photo_s'])
- ? '<a href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="dropdown-menu-img-xs" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" />' . $name . '</a>'
- : '<a href="#" class="disabled">' . $name . '</a>'
+ ? '<a class="dropdown-item" href="' . chanlink_hash($item['author_xchan']) . '">' . '<img class="menu-img-1" src="' . zid($item['author']['xchan_photo_s']) . '" alt="' . urlencode($name) . '" />' . $name . '</a>'
+ : '<a class="dropdown-item" href="#" class="disabled">' . $name . '</a>'
);
if(! $item['thr_parent'])
@@ -1922,15 +1927,11 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) {
$ret[$v] = array();
$ret[$v]['count'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid']] : '');
$ret[$v]['list'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid'] . '-l'] : '');
- if(count($ret[$v]['list']) > MAX_LIKERS) {
- $ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS);
- array_push($ret[$v]['list_part'], '<a href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
- . (($ob) ? $ob->get_id() : $item['id']) . '"><b>' . t('View all') . '</b></a>');
- } else {
- $ret[$v]['list_part'] = '';
- }
$ret[$v]['button'] = get_response_button_text($v,$ret[$v]['count']);
$ret[$v]['title'] = $conv_responses[$v]['title'];
+ if($ret[$v]['count'] > MAX_LIKERS) {
+ $ret[$v]['modal'] = true;
+ }
}
$count = 0;