3 require_once('include/socgraph.php');
4 require_once('include/contact_widgets.php');
7 function suggest_init(&$a) {
11 if(x($_GET,'ignore') && intval($_GET['ignore'])) {
12 q("insert into gcign ( uid, gcid ) values ( %d, %d ) ",
14 intval($_GET['ignore'])
24 function suggest_content(&$a) {
28 notice( t('Permission denied.') . EOL);
32 $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
34 $a->page['aside'] .= follow_widget();
35 $a->page['aside'] .= findpeople_widget();
38 $o .= '<h2>' . t('Friend Suggestions') . '</h2>';
41 $r = suggestion_query(local_user());
44 $o .= t('No suggestions available. If this is a new site, please try again in 24 hours.');
48 $tpl = get_markup_template('suggest_friends.tpl');
52 $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
54 $o .= replace_macros($tpl,array(
55 '$url' => zrl($rr['url']),
56 '$name' => $rr['name'],
57 '$photo' => $rr['photo'],
58 '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
59 '$conntxt' => t('Connect'),
60 '$connlnk' => $connlnk,
61 '$ignore' => t('Ignore/Hide')
66 // $o .= paginate($a);