]> git.mxchange.org Git - friendica.git/blobdiff - include/identity.php
The preview picture can now be remote or local
[friendica.git] / include / identity.php
index 7bd2d2cbc8d530a22815081f015a7c1b0bf36234..2230d98a42f66385948fbf8d6efafd15bda3ecc3 100644 (file)
@@ -190,7 +190,7 @@ if(! function_exists('profile_sidebar')) {
                $o = '';
                $location = false;
                $address = false;
-               $pdesc = true;
+//             $pdesc = true;
 
                if((! is_array($profile)) && (! count($profile)))
                        return $o;
@@ -286,13 +286,15 @@ if(! function_exists('profile_sidebar')) {
                        );
                }
 
-               if((x($profile['page-flags']) == 1)
-                               || (x($profile['page-flags']) == 2)
-                               || (x($profile['page-flags']) == 5))
-                       $account_type = page_type_translate($profile['page-flags']);
-
-               if(! $account_type)
-                       $account_type = (x($profile['forum']) || x($profile['prv']) || (x($profile['community'])) ? t('Forum') : "");
+               // check if profile is a forum
+               if((x($profile['page-flags']) == 2)
+                               || (x($profile['page-flags']) == 5)
+                               || (x($profile['forum']))
+                               || (x($profile['prv']))
+                               || (x($profile['community'])))
+                       $account_type = t('Forum');
+               else
+                       $account_type = "";
 
                if((x($profile,'address') == 1)
                                || (x($profile,'locality') == 1)
@@ -371,7 +373,7 @@ if(! function_exists('profile_sidebar')) {
                        '$account_type' => $account_type,
                        '$location' => $location,
                        '$gender'   => $gender,
-                       '$pdesc'        => $pdesc,
+//                     '$pdesc'        => $pdesc,
                        '$marital'  => $marital,
                        '$homepage' => $homepage,
                        '$about' => $about,
@@ -725,6 +727,16 @@ if(! function_exists('profile_tabs')){
                        );
                }
 
+               if ((! $is_owner) && ((count($a->profile)) || (! $a->profile['hide-friends']))) {
+                       $tabs[] = array(
+                               'label' => t('Contacts'),
+                               'url'   => $a->get_baseurl() . '/viewcontacts/' . $nickname,
+                               'sel'   => ((!isset($tab)&&$a->argv[0]=='viewcontacts')?'active':''),
+                               'title' => t('Contacts'),
+                               'id' => 'viewcontacts-tab',
+                               'accesskey' => 'k',
+                       );
+               }
 
                $arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
                call_hooks('profile_tabs', $arr);