From e5662dc89367dc70f6a07282c807807261503726 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 15 Jan 2017 21:23:43 -0800 Subject: vcard export from profile --- Zotlabs/Module/Profile.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Module/Profile.php') diff --git a/Zotlabs/Module/Profile.php b/Zotlabs/Module/Profile.php index 9e868db92..0bc23952b 100644 --- a/Zotlabs/Module/Profile.php +++ b/Zotlabs/Module/Profile.php @@ -60,7 +60,9 @@ class Profile extends \Zotlabs\Web\Controller { } $groups = array(); - + + + $tab = 'profile'; $o = ''; @@ -69,6 +71,15 @@ class Profile extends \Zotlabs\Web\Controller { return; } + + + if(argc() > 2 && argv(2) === 'vcard') { + header('Content-type: text/vcard'); + header('content-disposition: attachment; filename="' . t('vcard') . '-' . $profile['channel_address'] . '.vcf"' ); + echo \App::$profile['profile_vcard']; + killme(); + } + $is_owner = ((local_channel()) && (local_channel() == \App::$profile['profile_uid']) ? true : false); -- cgit v1.2.3 From 6644dc4861272273acf683dd6e06ceb586f2e4db Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 21 Feb 2017 18:58:51 -0800 Subject: use head_add_link() for feed discovery --- Zotlabs/Module/Profile.php | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Profile.php') diff --git a/Zotlabs/Module/Profile.php b/Zotlabs/Module/Profile.php index 0bc23952b..fda88da52 100644 --- a/Zotlabs/Module/Profile.php +++ b/Zotlabs/Module/Profile.php @@ -37,8 +37,21 @@ class Profile extends \Zotlabs\Web\Controller { $profile = $r[0]['profile_guid']; } - \App::$page['htmlhead'] .= '' . "\r\n" ; - + head_add_link( [ + 'rel' => 'alternate', + 'type' => 'application/atom+xml', + 'title' => t('Posts and comments'), + 'href' => z_root() . '/feed/' . $which + ]); + + head_add_link( [ + 'rel' => 'alternate', + 'type' => 'application/atom+xml', + 'title' => t('Only posts'), + 'href' => z_root() . '/feed/' . $which . '?f=&top=1' + ]); + + if(! $profile) { $x = q("select channel_id as profile_uid from channel where channel_address = '%s' limit 1", dbesc(argv(1)) -- cgit v1.2.3