From 73904bfa030cd169fcb6eb9a5a32cc28177e2489 Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Wed, 3 Sep 2014 09:52:31 +0200 Subject: [PATCH] Added an alternate link to the profile in the atom feeds (feature request #925) --- include/items.php | 6 ++++++ view/templates/atom_feed.tpl | 1 + view/templates/atom_feed_dfrn.tpl | 1 + 3 files changed, 8 insertions(+) diff --git a/include/items.php b/include/items.php index f9e0203c2..0e156beb2 100644 --- a/include/items.php +++ b/include/items.php @@ -163,6 +163,11 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) $salmon = feed_salmonlinks($owner_nick); + $alternatelink = $owner['url']; + + if(isset($category)) + $alternatelink .= "/category/".$category; + $atom .= replace_macros($feed_template, array( '$version' => xmlify(FRIENDICA_VERSION), '$feed_id' => xmlify($a->get_baseurl() . '/profile/' . $owner_nick), @@ -170,6 +175,7 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) '$feed_updated' => xmlify(datetime_convert('UTC', 'UTC', 'now' , ATOM_TIME)) , '$hub' => $hubxml, '$salmon' => $salmon, + '$alternatelink' => xmlify($alternatelink), '$name' => xmlify($owner['name']), '$profile_page' => xmlify($owner['url']), '$photo' => xmlify($owner['photo']), diff --git a/view/templates/atom_feed.tpl b/view/templates/atom_feed.tpl index db553d99f..0ce534d03 100644 --- a/view/templates/atom_feed.tpl +++ b/view/templates/atom_feed.tpl @@ -19,6 +19,7 @@ {{$feed_title}} Friendica + {{$hub}} {{$salmon}} {{$community}} diff --git a/view/templates/atom_feed_dfrn.tpl b/view/templates/atom_feed_dfrn.tpl index 87d78a518..babe2f61e 100644 --- a/view/templates/atom_feed_dfrn.tpl +++ b/view/templates/atom_feed_dfrn.tpl @@ -19,6 +19,7 @@ {{$feed_title}} Friendica + {{$hub}} {{$salmon}} {{$community}}