aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-07 17:06:04 -0800
committerFriendika <info@friendika.com>2011-02-07 17:06:04 -0800
commit18c5d1ff90dd364328032b3f0092ac5176ebc4c5 (patch)
treeb514163221c58438f1acbc930f75926fcbb68ff2 /boot.php
parent7dd56fa14c784a95695aece6dfe5cac145452ffe (diff)
downloadvolse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.tar.gz
volse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.tar.bz2
volse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.zip
feed cleanup
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php43
1 files changed, 42 insertions, 1 deletions
diff --git a/boot.php b/boot.php
index 509fe2287..c8722caa7 100644
--- a/boot.php
+++ b/boot.php
@@ -2365,4 +2365,45 @@ function feed_birthday($uid,$tz) {
}
return $birthday;
-}} \ No newline at end of file
+}}
+
+/**
+ * return atom link elements for all of our hubs
+ */
+
+if(! function_exists('feed_hublinks')) {
+function feed_hublinks() {
+
+ $hub = get_config('system','huburl');
+
+ $hubxml = '';
+ if(strlen($hub)) {
+ $hubs = explode(',', $hub);
+ if(count($hubs)) {
+ foreach($hubs as $h) {
+ $h = trim($h);
+ if(! strlen($h))
+ continue;
+ $hubxml .= '<link rel="hub" href="' . xmlify($h) . '" />' . "\n" ;
+ }
+ }
+ }
+ return $hubxml;
+}}
+
+/* return atom link elements for salmon endpoints */
+
+if(! function_exists('feed_salmonlinks')) {
+function feed_salmonlinks($nick) {
+
+ $a = get_app();
+
+ $salmon = '<link rel="salmon" href="' . xmlify($a->get_baseurl() . '/salmon/' . $nick) . '" />' . "\n" ;
+
+ // old style links that status.net still needed as of 12/2010
+
+ $salmon .= ' <link rel="http://salmon-protocol.org/ns/salmon-replies" href="' . xmlify($a->get_baseurl() . '/salmon/' . $nick) . '" />' . "\n" ;
+ $salmon .= ' <link rel="http://salmon-protocol.org/ns/salmon-mention" href="' . xmlify($a->get_baseurl() . '/salmon/' . $nick) . '" />' . "\n" ;
+ return $salmon;
+}}
+