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