X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Fidentity.php;h=d87d891a5cdf3120ff350542b51602849c28e430;hb=8944ad1ac1bb4293eeacd79536cdeed3173cad9a;hp=e412c68c961c4f2085bbfb7e100ac20aa7c3f9dc;hpb=39b37281a78b58b50503056e69b2aaa9885257b0;p=friendica.git diff --git a/include/identity.php b/include/identity.php index e412c68c96..d87d891a5c 100644 --- a/include/identity.php +++ b/include/identity.php @@ -4,7 +4,8 @@ */ require_once('include/forums.php'); - +require_once('include/bbcode.php'); +require_once("mod/proxy.php"); /** * @@ -108,7 +109,6 @@ if(! function_exists('profile_load')) { else $a->page['aside'] .= profile_sidebar($a->profile, $block); - /*if(! $block) $a->page['aside'] .= contact_block();*/ @@ -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; @@ -199,7 +199,7 @@ if(! function_exists('profile_sidebar')) { if (($profile['network'] != "") AND ($profile['network'] != NETWORK_DFRN)) { $profile['network_name'] = format_network_name($profile['network'],$profile['url']); - } else + } else $profile['network_name'] = ""; call_hooks('profile_sidebar_enter', $profile); @@ -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((intval($profile['page-flags']) == PAGE_COMMUNITY) + || (intval($profile['page-flags']) == PAGE_PRVGROUP) + || (intval($profile['forum'])) + || (intval($profile['prv'])) + || (intval($profile['community']))) + $account_type = t('Forum'); + else + $account_type = ""; if((x($profile,'address') == 1) || (x($profile,'locality') == 1) @@ -358,6 +360,15 @@ if(! function_exists('profile_sidebar')) { $p[$k] = $v; } + if (isset($p["about"])) + $p["about"] = bbcode($p["about"]); + + if (isset($p["location"])) + $p["location"] = bbcode($p["location"]); + + if (isset($p["photo"])) + $p["photo"] = proxy_url($p["photo"], false, PROXY_SIZE_SMALL); + if($a->theme['template_engine'] === 'internal') $location = template_escape($location); @@ -371,7 +382,7 @@ if(! function_exists('profile_sidebar')) { '$account_type' => $account_type, '$location' => $location, '$gender' => $gender, - '$pdesc' => $pdesc, +// '$pdesc' => $pdesc, '$marital' => $marital, '$homepage' => $homepage, '$about' => $about,