]> git.mxchange.org Git - friendica.git/blobdiff - mod/contacts.php
minor positioning adjustment on search items
[friendica.git] / mod / contacts.php
index bd5bf8ea80b9c56d3acbf4d55aa342a1224b6673..02c75c7755c6d9d28942ed420803847f5f12944b 100644 (file)
@@ -4,10 +4,20 @@ require_once('include/Contact.php');
 
 function contacts_init(&$a) {
        require_once('include/group.php');
+       if(! x($a->page,'aside'))
+               $a->page['aside'] = '';
        $a->page['aside'] .= group_side();
 
        if($a->config['register_policy'] != REGISTER_CLOSED)
                $a->page['aside'] .= '<div class="side-invite-link-wrapper" id="side-invite-link-wrapper" ><a href="invite" class="side-invite-link" id="side-invite-link">' . t("Invite Friends") . '</a></div>';
+
+       $tpl = load_view_file('view/follow.tpl');
+       $a->page['aside'] .= replace_macros($tpl,array(
+               '$label' => t('Connect/Follow [profile address]'),
+               '$hint' => t('Example: bob@example.com, http://example.com/barbara'),
+               '$follow' => t('Follow')
+       ));
+
 }
 
 function contacts_post(&$a) {
@@ -76,7 +86,11 @@ function contacts_post(&$a) {
 
 function contacts_content(&$a) {
 
+       $sort_type = 0;
+       $o = '';
        $o .= '<script> $(document).ready(function() { $(\'#nav-contacts-link\').addClass(\'nav-selected\'); });</script>';
+
+
        if(! local_user()) {
                notice( t('Permission denied.') . EOL);
                return;
@@ -150,6 +164,8 @@ function contacts_content(&$a) {
                        return;
                }
 
+               $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
+
                require_once('view/contact_selectors.php');
 
                $tpl = load_view_file("view/contact_edit.tpl");
@@ -186,10 +202,11 @@ function contacts_content(&$a) {
                        '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') 
                                ? t('Never') 
                                : datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')),
-                       '$profile_select' => contact_profile_assign($r[0]['profile-id']),
+                       '$profile_select' => contact_profile_assign($r[0]['profile-id'],(($r[0]['network'] !== 'dfrn') ? true : false)),
                        '$contact_id' => $r[0]['id'],
                        '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ),
                        '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ),
+                       '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')),
                        '$blocked' => (($r[0]['blocked']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
                        '$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
                        '$rating' => contact_reputation($r[0]['rating']),