]> git.mxchange.org Git - friendica.git/commitdiff
implement rel alternate, some corresponding last minute touchups on display module
authorMike Macgirvin <mike@macgirvin.com>
Thu, 30 Sep 2010 23:06:53 +0000 (16:06 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Thu, 30 Sep 2010 23:06:53 +0000 (16:06 -0700)
include/items.php
include/notifier.php
mod/display.php
mod/network.php
view/atom_cmnt.tpl
view/atom_item.tpl

index 630d9dfbb6ef45d745e14cadae417bfab444824a..42355cc3cf81ebdff641241b463f0c6d08f15e7e 100644 (file)
@@ -179,6 +179,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
                                        '$updated'            => xmlify(datetime_convert('UTC', 'UTC', $item['edited']  . '+00:00' , ATOM_TIME)),
                                        '$location'           => xmlify($item['location']),
                                        '$type'               => $type,
+                                       '$alt'           => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']),
                                        '$content'            => xmlify($item['body']),
                                        '$verb'               => xmlify($verb),
                                        '$actobj'             => $actobj,  // do not xmlify
@@ -196,6 +197,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_id, $last_update, $direction = 0) {
                                        '$updated'       => xmlify(datetime_convert('UTC', 'UTC', $item['edited']  . '+00:00' , ATOM_TIME)),
                                        '$type'          => $type,
                                        '$content'       => xmlify($item['body']),
+                                       '$alt'           => xmlify($a->get_baseurl() . '/display/' . $owner_nick . '/' . $item['id']),
                                        '$verb'          => xmlify($verb),
                                        '$actobj'        => $actobj, // do not xmlify
                                        '$parent_id'     => xmlify($item['parent-uri']),
index 92f739549219e977f60ad8f284af687db163ff9c..967f4ff55b5871ad10efd46bf0460f2e8f1343ec 100644 (file)
                                                '$type'               => 'text',
                                                '$verb'               => xmlify($verb),
                                                '$actobj'             => $actobj,
+                                               '$alt'                => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
                                                '$content'            => xmlify($item['body']),
                                                '$parent_id'          => xmlify($item['parent-uri']),
                                                '$comment_allow'      => 0
                                                        '$verb'               => xmlify($verb),
                                                        '$actobj'             => $actobj,
                                                        '$content'            => xmlify($item['body']),
+                                                       '$alt'                => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
                                                        '$comment_allow'      => (($item['last-child']) ? 1 : 0)
                                                ));
                                        }
                                                        '$published'     => xmlify(datetime_convert('UTC', 'UTC', $item['created'] . '+00:00' , ATOM_TIME)),
                                                        '$updated'       => xmlify(datetime_convert('UTC', 'UTC', $item['edited']  . '+00:00' , ATOM_TIME)),
                                                        '$content'       => xmlify($item['body']),
+                                                       '$alt'           => xmlify($a->get_baseurl() . '/display/' . $owner['nickname'] . '/' . $item['id']),
                                                        '$location'      => xmlify($item['location']),
                                                        '$type'          => 'text',
                                                        '$verb'          => xmlify($verb),
index 451b9d64437c5957bac446280116edadb269b87f..d8aca43e4d90dc6bfc576d07398bd8980e6edaa3 100644 (file)
@@ -155,6 +155,9 @@ function display_content(&$a) {
                                : '<div class="wall-item-lock"></div>');
 
                        if(can_write_wall($a,$a->profile['uid'])) {
+                               if($item['id'] == $item['parent']) {
+                                       $likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
+                               }
                                if($item['last-child']) {
                                        $comment = replace_macros($cmnt_tpl,array(
                                                '$return_path' => $_SESSION['return_url'],
@@ -219,20 +222,14 @@ function display_content(&$a) {
                        $profile_avatar = ((strlen($item['author-avatar'])) ? $item['author-avatar'] : $item['thumb']);
                        $profile_link = $profile_url;
 
-                       $drop = '';
-
                        if(($item['contact-id'] == $_SESSION['visitor_id']) || ($item['uid'] == get_uid()))
                                $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
+                       else 
+                               $drop = replace_macros(load_view_file('view/wall_fake_drop.tpl'), array('$id' => $item['id']));
 
                        $like    = (($alike[$item['id']]) ? format_like($alike[$item['id']],$alike[$item['id'] . '-l'],'like',$item['id']) : '');
                        $dislike = (($dlike[$item['id']]) ? format_like($dlike[$item['id']],$dlike[$item['id'] . '-l'],'dislike',$item['id']) : '');
 
-                       $likebuttons = '';
-                       if($item['id'] == $item['parent']) {
-                               $likebuttons = replace_macros($like_tpl,array('$id' => $item['id']));
-                       }
-
-
 
                        $o .= replace_macros($template,array(
                                '$id' => $item['item_id'],
index ac5664b4fc173eb2e64d985961209e313e48e050..9d12d4346d7c4f9ca3ae064f1c163acd7ae0e363 100644 (file)
@@ -234,7 +234,6 @@ function network_content(&$a, $update = 0) {
                                ));
                        }
 
-
                        $drop = replace_macros(load_view_file('view/wall_item_drop.tpl'), array('$id' => $item['id']));
 
 
index 59dff9efa41ff9177140c906ac1356116fc37b2e..a067f50ca792770f66ea905830018f21f432f19a 100644 (file)
@@ -11,6 +11,7 @@
                <published>$published</published>
                <updated>$updated</updated>
                <content type="$type" >$content</content>
+               <link rel="alternate" href="$alt" />
                <dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
                <as:verb>$verb</as:verb>
                $actobj
index d1eadb4afd5664bb1059fdf5f157844d63e6a401..baede636c34a5e9b3c28add37f585874398de302 100644 (file)
@@ -15,6 +15,7 @@
                <published>$published</published>
                <updated>$updated</updated>
                <content type="$type" >$content</content>
+               <link rel="alternate" href="$alt" />
                <dfrn:location>$location</dfrn:location>
                <dfrn:comment-allow>$comment_allow</dfrn:comment-allow>
                <as:verb>$verb</as:verb>