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' => z_root() . '/contacts/' . $cid
29 if(! x($a->page,'aside'))
30 $a->page['aside'] = '';
31 $a->page['aside'] .= $vcard_widget;
36 $o .= replace_macros(get_markup_template("section_title.tpl"),array(
37 '$title' => sprintf( t('Friends of %s'), $c[0]['name'])
41 $r = all_friends(local_user(),$cid);
44 $o .= t('No friends to display.');
48 $tpl = get_markup_template('common_friends.tpl');
52 $o .= replace_macros($tpl,array(
54 '$name' => $rr['name'],
55 '$photo' => $rr['photo'],
61 // $o .= paginate($a);