]> git.mxchange.org Git - friendica.git/blobdiff - mod/network.php
show creative commons coverage on registration page
[friendica.git] / mod / network.php
index a6e03440b42fb8d15d5f4def1f21f59da883646c..43c55b8e3f4dee124e16a27e94aec165be6fa430 100644 (file)
@@ -38,10 +38,11 @@ function network_content(&$a, $update = 0) {
        
                $a->page['htmlhead'] .= replace_macros($tpl, array(
                        '$baseurl' => $a->get_baseurl(),
-                       '$geotag' => $geotag
+                       '$geotag' => $geotag,
+                       '$nickname' => $a->user['nickname']
                ));
 
-               require_once('view/acl_selectors.php');
+               require_once('include/acl_selectors.php');
 
                $tpl = load_view_file("view/jot.tpl");
                
@@ -156,17 +157,21 @@ function network_content(&$a, $update = 0) {
                        $template = $tpl;
                        $commentww = '';
                        $owner_url = $owner_photo = $owner_name = '';
+
                        $profile_url = $item['url'];
+
                        $redirect_url = $a->get_baseurl() . '/redir/' . $item['cid'] ;
 
                        if(((activity_match($item['verb'],ACTIVITY_LIKE)) || (activity_match($item['verb'],ACTIVITY_DISLIKE))) && ($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']))))
                                ? '<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="' . t('Private Message') . '" onclick="lockview(event,' . $item['id'] . ');" /></div>'
                                : '<div class="wall-item-lock"></div>');
 
+
                        // Top-level wall post not written by the wall owner (wall-to-wall)
                        // First figure out who owns it. 
 
@@ -237,8 +242,11 @@ function network_content(&$a, $update = 0) {
 
                        // Post was remotely authored.
 
-                       $profile_name = ((strlen($item['author-name'])) ? $item['author-name'] : $item['name']);
-                       $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $thumb);
+                       $diff_author = (($item['url'] !== $item['author-link']) ? true : false);
+
+                       $profile_name   = (((strlen($item['author-name']))   && $diff_author) ? $item['author-name']   : $item['name']);
+                       $profile_avatar = (((strlen($item['author-avatar'])) && $diff_author) ? $item['author-avatar'] : $thumb);
+
 
                        $profile_link = $profile_url;
 
@@ -268,6 +276,12 @@ function network_content(&$a, $update = 0) {
                                        $location = '<span class="smalltext">' . $coord . '</span>';
                        }
 
+                       $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'; 
+
+
                        // Build the HTML
 
                        $o .= replace_macros($template,array(
@@ -278,11 +292,11 @@ function network_content(&$a, $update = 0) {
                                '$osparkle' => $osparkle,
                                '$sparkle' => $sparkle,
                                '$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,