3 require_once('include/socgraph.php');
5 function allfriends_content(&$a) {
9 notice( t('Permission denied.') . EOL);
14 $cid = intval($a->argv[1]);
18 $c = q("select name, url, photo from contact where id = %d and uid = %d limit 1",
23 $vcard_widget .= replace_macros(get_markup_template("vcard-widget.tpl"),array(
24 '$name' => $c[0]['name'],
25 '$photo' => $c[0]['photo'],
26 'url' => $a->get_baseurl() . '/contacts/' . $cid
29 if(! x($a->page,'aside'))
30 $a->page['aside'] = '';
31 $a->page['aside'] .= $vcard_widget;
36 $o .= '<h2>' . sprintf( t('Friends of %s'), $c[0]['name']) . '</h2>';
39 $r = all_friends(local_user(),$cid);
42 $o .= t('No friends to display.');
46 $tpl = get_markup_template('common_friends.tpl');
50 $o .= replace_macros($tpl,array(
52 '$name' => $rr['name'],
53 '$photo' => $rr['photo'],
59 // $o .= paginate($a);