]> git.mxchange.org Git - friendica.git/commitdiff
items: new property 'shiny'.
authorFabrixxm <fabrix.xm@gmail.com>
Fri, 9 Nov 2012 16:13:59 +0000 (11:13 -0500)
committerFabrixxm <fabrix.xm@gmail.com>
Fri, 9 Nov 2012 16:13:59 +0000 (11:13 -0500)
separate 'indent' (''|'comment') from 'shiny' (''|'shiny')

mod/content.php
object/Item.php

index e0634b3e841f1f1a5e710b9f73eb7f209e753693..c4b0ca2f62716c5890cd348be4f27f75a232ccb0 100644 (file)
@@ -784,8 +784,9 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
 
                                $indent = (($toplevelpost) ? '' : ' comment');
 
+                               $shiny = "";
                                if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
-                                       $indent .= ' shiny'; 
+                                       $shiny = 'shiny'; 
 
                                // 
                                localize_item($item);
@@ -829,6 +830,7 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
                                        'lock' => $lock,
                                        'location' => template_escape($location),
                                        'indent' => $indent,
+                                       'shiny' => $shiny,
                                        'owner_url' => $owner_url,
                                        'owner_photo' => $owner_photo,
                                        'owner_name' => template_escape($owner_name),
index 9ec63b4f20c3b16ac65d6d0c547be33588c2b8f0..b8afe2213a547651b49607a973ef5f542157683a 100644 (file)
@@ -93,6 +93,7 @@ class Item extends BaseObject {
                $star = false;
                $isstarred = "unstarred";
                $indent = '';
+               $shiny = '';
                $osparkle = '';
                $total_children = $this->count_descendants();
 
@@ -199,8 +200,9 @@ class Item extends BaseObject {
                        if ($shareable) $buttons['share'] = array( t('Share this'), t('share'));
                }
 
-               if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0)
-                       $indent .= ' shiny';
+               if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0){
+                       $shiny = 'shiny';
+               }
 
                localize_item($item);
 
@@ -241,6 +243,7 @@ class Item extends BaseObject {
                        'lock' => $lock,
                        'location' => template_escape($location),
                        'indent' => $indent,
+                       'shiny' => $shiny,
                        'owner_url' => $this->get_owner_url(),
                        'owner_photo' => $this->get_owner_photo(),
                        'owner_name' => template_escape($this->get_owner_name()),