]> git.mxchange.org Git - friendica.git/blobdiff - mod/suggest.php
new version of the ShaShape iconset
[friendica.git] / mod / suggest.php
index 760bbf06ae5868166ffce247523cc25d7136c15f..578338b5058055ff85d57dbb22d7c6abff4aab9f 100644 (file)
@@ -61,8 +61,8 @@ function suggest_content(&$a) {
 
        $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
 
-       $a->page['aside'] .= follow_widget();
        $a->page['aside'] .= findpeople_widget();
+       $a->page['aside'] .= follow_widget();
 
 
        $r = suggestion_query(local_user());
@@ -72,31 +72,45 @@ function suggest_content(&$a) {
                return $o;
        }
 
+       require_once 'include/contact_selectors.php';
+
        foreach($r as $rr) {
 
                $connlnk = $a->get_baseurl() . '/follow/?url=' . (($rr['connect']) ? $rr['connect'] : $rr['url']);
+               $ignlnk = $a->get_baseurl() . '/suggest?ignore=' . $rr['id'];
+               $photo_menu = array(array(t("View Profile"), zrl($rr["url"])));
+               $photo_menu[] = array(t("Connect/Follow"), $connlnk);
+               $photo_menu[] = array(t('Ignore/Hide'), $ignlnk);
+               $contact_details = get_contact_details_by_url($rr["url"], local_user());
 
                $entry = array(
                        'url' => zrl($rr['url']),
-                       'url_clean' => $rr['url'],
+                       'itemurl' => (($contact_details['addr'] != "") ? $contact_details['addr'] : $rr['url']),
+                       'img_hover' => $rr['url'],
                        'name' => $rr['name'],
-                       'photo' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
-                       'ignlnk' => $a->get_baseurl() . '/suggest?ignore=' . $rr['id'],
+                       'thumb' => proxy_url($rr['photo'], false, PROXY_SIZE_THUMB),
+                       'details'       => $contact_details['location'],
+                        'tags'          => $contact_details['keywords'],
+                        'about'         => $contact_details['about'],
+                       'ignlnk' => $ignlnk,
                        'ignid' => $rr['id'],
                        'conntxt' => t('Connect'),
                        'connlnk' => $connlnk,
-                       'ignore' => t('Ignore/Hide')
+                       'photo_menu' => $photo_menu,
+                       'ignore' => t('Ignore/Hide'),
+                       'network' => network_to_name($rr['network'], $rr['url']),
+                       'id' => ++$id,
                );
                $entries[] = $entry;
        }
 
-       $tpl = get_markup_template('suggest_friends.tpl');
+       $tpl = get_markup_template('viewcontact_template.tpl');
 
        $o .= replace_macros($tpl,array(
                '$title' => t('Friend Suggestions'),
-               '$entries' => $entries,
+               '$contacts' => $entries,
+               
        ));
 
-//     $o .= paginate($a);
        return $o;
 }