* @copyright 2015 SocialApparatus * @license GNU General Public License (GPL) version 2 * @version 1 * @link http://modbash.com */ $user = elgg_get_page_owner_entity(); $profile_fields = elgg_get_config('profile_fields'); echo '
'; echo "{$user->username}"; echo "

{$user->name}

"; // the controller doesn't allow non-admins to view banned users' profiles if ($user->isBanned()) { $title = elgg_echo('banned'); $reason = ($user->ban_reason === 'banned') ? '' : $user->ban_reason; echo "

$title

$reason
"; } echo elgg_view("profile/status", array("entity" => $user)); $microformats = array( 'mobile' => 'tel p-tel', 'phone' => 'tel p-tel', 'website' => 'url u-url', 'contactemail' => 'email u-email', ); $even_odd = null; if (is_array($profile_fields) && sizeof($profile_fields) > 0) { foreach ($profile_fields as $shortname => $valtype) { if ($shortname == "description") { // skip about me and put at bottom continue; } $value = $user->$shortname; if (!is_null($value)) { // fix profile URLs populated by https://github.com/Elgg/Elgg/issues/5232 // @todo Replace with upgrade script, only need to alter users with last_update after 1.8.13 if ($valtype == 'url' && $value == 'http://') { $user->$shortname = ''; continue; } // validate urls if ($valtype == 'url' && !preg_match('~^https?\://~i', $value)) { $value = "http://$value"; } // this controls the alternating class $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even'; ?>
: $value ); if (isset($microformats[$shortname])) { $class = $microformats[$shortname]; } else { $class = ''; } echo ""; echo elgg_view("output/{$valtype}", $params); echo ""; ?>
description) { echo "

" . elgg_echo("profile:aboutme") . "

"; echo "
"; echo elgg_view('output/longtext', array('value' => $user->description, 'class' => 'mtn')); echo "
"; } echo '
';