X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fdisplay.php;h=cad60d2754ce5990f7040463633c1b8a3e7a8d64;hb=b358e8afe21443a8f7e14573953a9780ba1d592d;hp=aa945536172c7741c9bef2c608cdb00bd4849209;hpb=f9f018ef083acb554003def1fc186bfc3102acc0;p=friendica.git diff --git a/mod/display.php b/mod/display.php index aa94553617..cad60d2754 100644 --- a/mod/display.php +++ b/mod/display.php @@ -5,8 +5,8 @@ function display_content(&$a) { $o = '
' . "\r\n"; - require_once('mod/profile.php'); - profile_init($a); + $nick = (($a->argc > 1) ? $a->argv[1] : ''); + profile_load($a,$nick); $item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); @@ -142,8 +142,8 @@ function display_content(&$a) { && ($item['id'] != $item['parent'])) continue; - $lock = (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) - || strlen($item['deny_cid']) || strlen($item['deny_gid'])) + $lock = ((($item['private']) || (($item['uid'] == local_user()) && (strlen($item['allow_cid']) || strlen($item['allow_gid']) + || strlen($item['deny_cid']) || strlen($item['deny_gid'])))) ? '
' . t('Private Message') . '
' : '
'); @@ -235,19 +235,26 @@ function display_content(&$a) { $location = '' . $coord . ''; } - $o .= replace_macros($template,array( + $indent = (($item['parent'] != $item['item_id']) ? ' comment' : ''); + + if(strcmp(datetime_convert('UTC','UTC',$item['created']),datetime_convert('UTC','UTC','now - 12 hours')) > 0) + $indent .= ' shiny'; + + + $tmp_item = replace_macros($template,array( '$id' => $item['item_id'], + '$title' => t('View $name\'s profile'), '$profile_url' => $profile_link, '$name' => $profile_name, '$sparkle' => $sparkle, '$osparkle' => $osparkle, '$thumb' => $profile_avatar, '$title' => $item['title'], - '$body' => bbcode($item['body']), + '$body' => smilies(bbcode($item['body'])), '$ago' => relative_date($item['created']), '$lock' => $lock, '$location' => $location, - '$indent' => (($item['parent'] != $item['item_id']) ? ' comment' : ''), + '$indent' => $indent, '$owner_url' => $owner_url, '$owner_photo' => $owner_photo, '$owner_name' => $owner_name, @@ -258,6 +265,12 @@ function display_content(&$a) { '$comment' => $comment )); + $arr = array('item' => $item, 'output' => $tmp_item); + call_hooks('display_item', $arr); + + $o .= $arr['output']; + + } } else {