diff options
author | Friendika <info@friendika.com> | 2011-02-07 17:06:04 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-02-07 17:06:04 -0800 |
commit | 18c5d1ff90dd364328032b3f0092ac5176ebc4c5 (patch) | |
tree | b514163221c58438f1acbc930f75926fcbb68ff2 /boot.php | |
parent | 7dd56fa14c784a95695aece6dfe5cac145452ffe (diff) | |
download | volse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.tar.gz volse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.tar.bz2 volse-hubzilla-18c5d1ff90dd364328032b3f0092ac5176ebc4c5.zip |
feed cleanup
Diffstat (limited to 'boot.php')
-rw-r--r-- | boot.php | 43 |
1 files changed, 42 insertions, 1 deletions
@@ -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; +}} + |