From d10525a375884850b1b643796b839747cbc623b2 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 17 Mar 2017 14:22:10 +0100 Subject: fix item_list and item_search templates. make item filer use a bootdtrap modal and some css and class fixes --- include/conversation.php | 7 ++++++- include/widgets.php | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/conversation.php b/include/conversation.php index 45b3a53e8..167b10846 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,7 +1181,7 @@ 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']) - ? '' . '' . urlencode($name) . '' . $name . '' + ? '' . '' . urlencode($name) . '' . $name . '' : '' . $name . '' ); diff --git a/include/widgets.php b/include/widgets.php index f247470b3..b95cbfc26 100644 --- a/include/widgets.php +++ b/include/widgets.php @@ -1485,7 +1485,7 @@ function widget_forums($arr) { foreach($r1 as $rr) { if($unseen && (! intval($rr['unseen']))) continue; - $o .= ''; + $o .= ''; } $o .= ''; } @@ -1540,7 +1540,7 @@ function widget_activity($arr) { $o .= '

' . t('Activity','widget') . '

'; } -- cgit v1.2.3