]> git.mxchange.org Git - friendica.git/commitdiff
Issue 2864: Add a "alternate" link on display page
authorMichael <heluecht@pirati.ca>
Tue, 6 Jun 2017 17:56:22 +0000 (17:56 +0000)
committerMichael <heluecht@pirati.ca>
Tue, 6 Jun 2017 17:56:22 +0000 (17:56 +0000)
mod/display.php
view/templates/display-head.tpl

index ca6809eba14c6fb9b34c359d2f4db172ce83417f..bc0ba388bfa4dedfc2071015ca5b502ee0bff780 100644 (file)
@@ -209,9 +209,6 @@ function display_content(App $a, $update = 0) {
 
        $o = '';
 
-       $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'), array());
-
-
        if ($update) {
                $nick = $_REQUEST['nick'];
        } else {
@@ -281,6 +278,10 @@ function display_content(App $a, $update = 0) {
                return;
        }
 
+       $alternate = App::get_baseurl().'/display/'.$nick.'/'.$item_id.'.atom';
+       $a->page['htmlhead'] .= replace_macros(get_markup_template('display-head.tpl'),
+                               array('$alternate' => $alternate));
+
 
        $groups = array();
 
index 9a96a23988fa36c27d05dbf1a1d1f215a0a82e80..f4d050eec23e7933b6ffb9c68d85bdb068fb4910 100644 (file)
@@ -1,4 +1,4 @@
-
+<link href='{{$alternate}}' rel='alternate' type='application/atom+xml'>
 <script>
 $(document).ready(function() {
        $(".comment-edit-wrapper textarea").editor_autocomplete(baseurl+"/acl");
@@ -6,4 +6,3 @@ $(document).ready(function() {
        $(".wall-item-comment-wrapper textarea").editor_autocomplete(baseurl+"/acl");
 });
 </script>
-