+ if(get_config('system','diaspora_enabled')) {
+ $tpl = get_markup_template('xrd_diaspora.tpl');
+ $dspr = replace_macros($tpl,array(
+ '$baseurl' => $a->get_baseurl(),
+ '$dspr_guid' => $r[0]['guid'],
+ '$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'];
+
+ if ($acct)
+ $alias = $profile_url;
+ else {
+ $alias = 'acct:'.$r[0]['nickname'].'@'.$a->get_hostname();
+
+ if ($a->get_path())
+ $alias .= '/'.$a->get_path();
+ }