3 function hcard_init(&$a) {
5 if((get_config('system','block_public')) && (! local_user()) && (! remote_user()))
11 notice( t('No profile') . EOL );
17 if((local_user()) && ($a->argc > 2) && ($a->argv[2] === 'view')) {
18 $which = $a->user['nickname'];
19 $profile = $a->argv[1];
22 profile_load($a,$which,$profile);
24 if((x($a->profile,'page-flags')) && ($a->profile['page-flags'] == PAGE_COMMUNITY)) {
25 $a->page['htmlhead'] .= '<meta name="friendika.community" content="true" />';
27 if(x($a->profile,'openidserver'))
28 $a->page['htmlhead'] .= '<link rel="openid.server" href="' . $a->profile['openidserver'] . '" />' . "\r\n";
29 if(x($a->profile,'openid')) {
30 $delegate = ((strstr($a->profile['openid'],'://')) ? $a->profile['openid'] : 'http://' . $a->profile['openid']);
31 $a->page['htmlhead'] .= '<link rel="openid.delegate" href="' . $delegate . '" />' . "\r\n";
34 $keywords = ((x($a->profile,'pub_keywords')) ? $a->profile['pub_keywords'] : '');
35 $keywords = str_replace(array(',',' ',',,'),array(' ',',',','),$keywords);
37 $a->page['htmlhead'] .= '<meta name="keywords" content="' . $keywords . '" />' . "\r\n" ;
39 $a->page['htmlhead'] .= '<meta name="dfrn-global-visibility" content="' . (($a->profile['net-publish']) ? 'true' : 'false') . '" />' . "\r\n" ;
40 $a->page['htmlhead'] .= '<link rel="alternate" type="application/atom+xml" href="' . $a->get_baseurl() . '/dfrn_poll/' . $which .'" />' . "\r\n" ;
41 $uri = urlencode('acct:' . $a->profile['nickname'] . '@' . $a->get_hostname() . (($a->path) ? '/' . $a->path : ''));
42 $a->page['htmlhead'] .= '<link rel="lrdd" type="application/xrd+xml" href="' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '" />' . "\r\n";
43 header('Link: <' . $a->get_baseurl() . '/xrd/?uri=' . $uri . '>; rel="lrdd"; type="application/xrd+xml"', false);
45 $dfrn_pages = array('request', 'confirm', 'notify', 'poll');
46 foreach($dfrn_pages as $dfrn)
47 $a->page['htmlhead'] .= "<link rel=\"dfrn-{$dfrn}\" href=\"".$a->get_baseurl()."/dfrn_{$dfrn}/{$which}\" />\r\n";