]> git.mxchange.org Git - friendica.git/commitdiff
more comprehensive XRD linkages
authorMike Macgirvin <mike@macgirvin.com>
Tue, 12 Oct 2010 11:39:32 +0000 (04:39 -0700)
committerMike Macgirvin <mike@macgirvin.com>
Tue, 12 Oct 2010 11:39:32 +0000 (04:39 -0700)
include/hostxrd.php
mod/xrd.php
view/xrd_person.tpl

index 3279cea68e305934e95ba684216af966bd8786a2..f8c39892767f9bd49bea1193b315a901ddf949de 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-
+       header("Content-type: text/xml");
        $tpl = file_get_contents('view/xrd_host.tpl');
        echo str_replace('$domain',$this->hostname,$tpl);
        session_write_close();
index 53985e10c1faf51a68dad545f58ac40be9b18fc0..fd87803e9d96b417809b0ef80800100d86305990 100644 (file)
@@ -20,16 +20,18 @@ function xrd_content(&$a) {
        $salmon_key = salmon_key($r[0]['spubkey']);
 
 
-
+       header("Content-type: text/xml");
 
        $tpl = load_view_file('view/xrd_person.tpl');
 
        $o = replace_macros($tpl, array(
-               '$accturi' => $uri,
-               '$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'],
-               '$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'],
-               '$salmon' => $a->get_baseurl() . '/salmon/' . $r[0]['nickname'] . '/mention',
-               '$modexp' => 'data:application/magic-public-key,' . $salmon_key
+               '$accturi'     => $uri,
+               '$profile_url' => $a->get_baseurl() . '/profile/'       . $r[0]['nickname'],
+               '$atom'        => $a->get_baseurl() . '/dfrn_poll/'     . $r[0]['nickname'],
+               '$photo'       => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'],
+               '$salmon'      => $a->get_baseurl() . '/salmon/'        . $r[0]['nickname'],
+               '$salmen'      => $a->get_baseurl() . '/salmon/'        . $r[0]['nickname'] . '/mention',
+               '$modexp'      => 'data:application/magic-public-key,'  . $salmon_key
        ));
 
        echo $o;
index d7ce13efabdacb1c4f21b4a9e518db0b025ef5f6..24bf9449a0712f2ec3704f69ecb6e61015860625 100644 (file)
@@ -1,20 +1,30 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<XRD xmlns='http://docs.oasis-open.org/ns/xri/xrd-1.0'>
+<?xml version="1.0" encoding="UTF-8"?>
+<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
  
     <Subject>$accturi</Subject>
+       <Alias>$accturi</Alias>
     <Alias>$profile_url</Alias>
  
-    <Link rel='http://purl.org/macgirvin/dfrn/1.0'
-          href='$profile_url' />
-    <Link rel='http://webfinger.net/rel/profile-page'
-          type='text/html'
-          href='$profile_url' />
-    <Link rel='http://microformats.org/profile/hcard'
-          type='text/html'
-          href='$profile_url' />
-    <Link rel='http://webfinger.net/rel/avatar'
-          href='$photo' />
-    <Link rel="salmon" href="$salmon" />
-    <Link rel="magic-public-key" href="$modexp" />
+    <Link rel="http://purl.org/macgirvin/dfrn/1.0"
+          href="$profile_url" />
+    <Link rel="http://schemas.google.com/g/2010#updates-from" 
+          type="application/atom+xml" 
+          href="$atom" />
+    <Link rel="http://webfinger.net/rel/profile-page"
+          type="text/html"
+          href="$profile_url" />
+    <Link rel="http://microformats.org/profile/hcard"
+          type="text/html"
+          href="$profile_url" />
+    <Link rel="http://webfinger.net/rel/avatar"
+          href="$photo" />
+    <Link rel="salmon" 
+          href="$salmon" />
+    <Link rel="http://salmon-protocol.org/ns/salmon-replies" 
+          href="$salmon" />
+    <Link rel="http://salmon-protocol.org/ns/salmon-mention" 
+          href="$salmen" />
+    <Link rel="magic-public-key" 
+          href="$modexp" />
  
 </XRD>