aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-09-19 02:13:59 -0700
committerFriendika <info@friendika.com>2011-09-19 02:13:59 -0700
commit0a30a91b14c8887db668d74759953405f02d4e65 (patch)
tree5abe63464ced99ea7f6b7dcaa105f1946b85634b
parent2aef98f71d95ba5c2caae7637002daef0bce6de5 (diff)
downloadvolse-hubzilla-0a30a91b14c8887db668d74759953405f02d4e65.tar.gz
volse-hubzilla-0a30a91b14c8887db668d74759953405f02d4e65.tar.bz2
volse-hubzilla-0a30a91b14c8887db668d74759953405f02d4e65.zip
basic zot discovery framework
-rw-r--r--mod/hostxrd.php3
-rw-r--r--mod/xrd.php1
-rw-r--r--view/xrd_host.tpl13
-rw-r--r--view/xrd_person.tpl11
4 files changed, 27 insertions, 1 deletions
diff --git a/mod/hostxrd.php b/mod/hostxrd.php
index c7861d26d..1cc18da7a 100644
--- a/mod/hostxrd.php
+++ b/mod/hostxrd.php
@@ -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();
diff --git a/mod/xrd.php b/mod/xrd.php
index fcec74336..dae6e4828 100644
--- a/mod/xrd.php
+++ b/mod/xrd.php
@@ -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'],
diff --git a/view/xrd_host.tpl b/view/xrd_host.tpl
index f1d9707d5..ee687ffa9 100644
--- a/view/xrd_host.tpl
+++ b/view/xrd_host.tpl
@@ -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>
diff --git a/view/xrd_person.tpl b/view/xrd_person.tpl
index fd11ad600..7373499bf 100644
--- a/view/xrd_person.tpl
+++ b/view/xrd_person.tpl
@@ -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"