aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--boot.php6
-rw-r--r--include/Contact.php17
-rw-r--r--view/tpl/profile_vcard.tpl10
-rw-r--r--view/tpl/xchan_vcard.tpl11
4 files changed, 26 insertions, 18 deletions
diff --git a/boot.php b/boot.php
index 36fa535b1..6fac2d914 100644
--- a/boot.php
+++ b/boot.php
@@ -1334,12 +1334,6 @@ if(! function_exists('profile_sidebar')) {
}
}
- if(get_my_url() && $profile['unkmail'])
- $wallmessage = t('Message');
- else
- $wallmessage = false;
-
-
// show edit profile to yourself
if($is_owner) {
diff --git a/include/Contact.php b/include/Contact.php
index ff798ed74..e52b5c9cf 100644
--- a/include/Contact.php
+++ b/include/Contact.php
@@ -2,9 +2,22 @@
function vcard_from_xchan($xchan) {
+
+ $connect = false;
+ if(local_user()) {
+ $r = q("select * from abook where abook_xchan = '%s' and abook_channel = %d limit 1",
+ dbesc($xchan['xchan_hash']),
+ intval(local_user())
+ );
+ if(! $r)
+ $connect = t('Connect');
+ }
+
return replace_macros(get_markup_template('xchan_vcard.tpl'),array(
- '$name' => $xchan['xchan_name'],
- '$photo' => $xchan['xchan_photo_l']
+ '$name' => $xchan['xchan_name'],
+ '$photo' => $xchan['xchan_photo_l'],
+ '$url' => $xchan['xchan_addr'],
+ '$connect' => $connect
));
}
diff --git a/view/tpl/profile_vcard.tpl b/view/tpl/profile_vcard.tpl
index 216f9665a..7ae62330c 100644
--- a/view/tpl/profile_vcard.tpl
+++ b/view/tpl/profile_vcard.tpl
@@ -47,16 +47,6 @@
{{ if $homepage }}<dl class="homepage"><dt class="homepage-label">$homepage</dt><dd class="homepage-url"><a href="$profile.homepage" >$profile.homepage</a></dd></dl>{{ endif }}
- <div id="profile-extra-links">
- <ul>
- {{ if $connect }}
- <li><a id="dfrn-request-link" href="dfrn_request/$profile.nickname">$connect</a></li>
- {{ endif }}
- {{ if $wallmessage }}
- <li><a id="wallmessage-link" href="wallmessage/$profile.nickname">$wallmessage</a></li>
- {{ endif }}
- </ul>
- </div>
</div>
$contact_block
diff --git a/view/tpl/xchan_vcard.tpl b/view/tpl/xchan_vcard.tpl
index 6bc56ce74..4e3f69b0c 100644
--- a/view/tpl/xchan_vcard.tpl
+++ b/view/tpl/xchan_vcard.tpl
@@ -2,3 +2,14 @@
<div class="fn">$name</div>
<div id="profile-photo-wrapper"><img class="vcard-photo photo" src="$photo" alt="name" /></div>
</div>
+
+
+
+<div id="profile-extra-links">
+<ul>
+{{ if $connect }}
+ <li><a id="follow-link" href="follow?f=&url=$follow">$connect</a></li>
+{{ endif }}
+</ul>
+</div>
+