X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fxrd.php;h=c23119145ca4d0685f0aab07ed549dd7df997f3d;hb=206c26ae30e711aa30cdb29d668bee9dce834c28;hp=accc2f68ef1f0388f8a9b193aa180dafccc3f311;hpb=020deefba613327a1d8875ba7f2cf9a750be42dd;p=friendica.git diff --git a/mod/xrd.php b/mod/xrd.php index accc2f68ef..c23119145c 100644 --- a/mod/xrd.php +++ b/mod/xrd.php @@ -1,14 +1,16 @@ $a->get_baseurl(), '$dspr_guid' => $r[0]['guid'], - '$dspr_key' => base64_encode($r[0]['pubkey']) + '$dspr_key' => base64_encode(pemtorsa($r[0]['pubkey'])) )); } else $dspr = ''; + $tpl = get_markup_template('xrd_person.tpl'); + + $profile_url = $a->get_baseurl().'/profile/'.$r[0]['nickname']; - $tpl = file_get_contents('view/xrd_person.tpl'); + if ($acct) + $alias = $profile_url; + else { + $alias = 'acct:'.$r[0]['nickname'].'@'.$a->get_hostname(); + + if ($a->get_path()) + $alias .= '/'.$a->get_path(); + } $o = replace_macros($tpl, array( + '$nick' => $r[0]['nickname'], '$accturi' => $uri, - '$profile_url' => $a->get_baseurl() . '/profile/' . $r[0]['nickname'], + '$alias' => $alias, + '$profile_url' => $profile_url, + '$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'], + '$poco_url' => $a->get_baseurl() . '/poco/' . $r[0]['nickname'], '$photo' => $a->get_baseurl() . '/photo/profile/' . $r[0]['uid'] . '.jpg', '$dspr' => $dspr, '$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 + '$subscribe' => $a->get_baseurl() . '/follow?url={uri}', + '$modexp' => 'data:application/magic-public-key,' . $salmon_key, + '$bigkey' => salmon_key($r[0]['pubkey']) )); $arr = array('user' => $r[0], 'xml' => $o); call_hooks('personal_xrd', $arr); - echo $o; + echo $arr['xml']; killme(); }