]> git.mxchange.org Git - friendica.git/blob - mod/suggest.php
prevent duplicate @ tags
[friendica.git] / mod / suggest.php
1 <?php
2
3 require_once('include/socgraph.php');
4 require_once('include/contact_widgets.php');
5
6 function suggest_content(&$a) {
7
8         $o = '';
9         if(! local_user()) {
10                 notice( t('Permission denied.') . EOL);
11                 return;
12         }
13
14         $a->page['aside'] .= follow_widget();
15         $a->page['aside'] .= findpeople_widget();
16
17
18         $o .= '<h2>' . t('Friend Suggestions') . '</h2>';
19
20
21         $r = suggestion_query(local_user());
22
23         if(! count($r)) {
24                 $o .= t('No suggestions. This works best when you have more than one contact/friend.');
25                 return $o;
26         }
27
28         $tpl = get_markup_template('common_friends.tpl');
29
30         foreach($r as $rr) {
31                         
32                 $o .= replace_macros($tpl,array(
33                         '$url' => $rr['url'],
34                         '$name' => $rr['name'],
35                         '$photo' => $rr['photo'],
36                         '$tags' => ''
37                 ));
38         }
39
40         $o .= cleardiv();
41 //      $o .= paginate($a);
42         return $o;
43 }