]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
sugest.php: themeable as whole page
[friendica.git] / mod / suggest.php
index e07e9331146cd1ec8efa4840de23eeb3763d37dd..760bbf06ae5868166ffce247523cc25d7136c15f 100644 (file)
@@ -65,11 +65,6 @@ function suggest_content(&$a) {
        $a->page['aside'] .= findpeople_widget();
 
 
-       $o .= replace_macros(get_markup_template("section_title.tpl"),array(
-               '$title' => t('Friend Suggestions')
-       ));
-
-
        $r = suggestion_query(local_user());
 
        if(! count($r)) {
@@ -77,25 +72,31 @@ function suggest_content(&$a) {
                return $o;
        }
 
-       $tpl = get_markup_template('suggest_friends.tpl');
-
        foreach($r as $rr) {
 
-               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);                      
-
-               $o .= replace_macros($tpl,array(
-                       '$url' => zrl($rr['url']),
-                       '$name' => $rr['name'],
-                       '$photo' => proxy_url($rr['photo']),
-                       '$ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
-                       '$ignid' => $rr['id'],
-                       '$conntxt' => t('Connect'),
-                       '$connlnk' => $connlnk,
-                       '$ignore' => t('Ignore/Hide')
-               ));
+               $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
+
+               $entry = array(
+                       'url' => zrl($rr['url']),
+                       'url_clean' => $rr['url'],
+                       'name' => $rr['name'],
+                       'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
+                       'ignid' => $rr['id'],
+                       'conntxt' => t('Connect'),
+                       'connlnk' => $connlnk,
+                       'ignore' => t('Ignore/Hide')
+               );
+               $entries[] = $entry;
        }
 
-       $o .= cleardiv();
+       $tpl = get_markup_template('suggest_friends.tpl');
+
+       $o .= replace_macros($tpl,array(
+               '$title' => t('Friend Suggestions'),
+               '$entries' => $entries,
+       ));
+
 //     $o .= paginate($a);
        return $o;
 }