basic zot discovery framework

This commit is contained in:
Friendika 2011-09-19 02:13:59 -07:00
parent 2aef98f71d
commit 0a30a91b14
4 changed files with 27 additions and 1 deletions

View file

@ -4,7 +4,8 @@ function hostxrd_init(&$a) {
header('Access-Control-Allow-Origin: *');
header("Content-type: text/xml");
$tpl = file_get_contents('view/xrd_host.tpl');
echo str_replace(array('$zroot','$domain'),array(z_root(),z_path()),$tpl);
echo str_replace(array(
'$zroot','$domain','$zot_post'),array(z_root(),z_path(),z_root() . '/post'),$tpl);
session_write_close();
exit();

View file

@ -45,6 +45,7 @@ function xrd_init(&$a) {
'$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
'$hcard_url' => $a->get_baseurl() . '/hcard/' . $r[0]['nickname'],
'$atom' => $a->get_baseurl() . '/dfrn_poll/' . $r[0]['nickname'],
'$zot_post' => $a->get_baseurl() . '/post/' . $r[0]['nickname'],
'$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg',
'$dspr' => $dspr,
'$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'],

View file

@ -9,4 +9,17 @@
<Link rel='http://services.mozilla.com/amcd/0.1' href='$domain/amcd' />
<Link rel="http://oexchange.org/spec/0.8/rel/resident-target" type="application/xrd+xml"
href="$domain/oexchange/xrd" />
<Link rel="http://purl.org/zot/1.0/post"
href="$zot_post" />
<Property xmlns:zot="http://purl.og/zot/1.0"
type="http://purl.org/zot/1.0/version"
zot:version="1" />
<Property xmlns:zot="http://purl.og/zot/1.0"
type="http://purl.org/zot/1.0/accept"
zot:accept="application/atom+xml" />
</XRD>

View file

@ -5,6 +5,17 @@
<Alias>$accturi</Alias>
<Alias>$profile_url</Alias>
<Link rel="http://purl.org/zot/1.0/post"
href="$zot_post" />
<Property xmlns:zot="http://purl.og/zot/1.0"
type="http://purl.org/zot/1.0/version"
zot:version="1" />
<Property xmlns:zot="http://purl.og/zot/1.0"
type="http://purl.org/zot/1.0/accept"
zot:accept="application/atom+xml" />
<Link rel="http://purl.org/macgirvin/dfrn/1.0"
href="$profile_url" />
<Link rel="http://schemas.google.com/g/2010#updates-from"