mirror of
https://github.com/friendica/friendica
synced 2024-12-30 18:16:28 +01:00
basic zot discovery framework
This commit is contained in:
parent
2aef98f71d
commit
0a30a91b14
4 changed files with 27 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -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'],
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue