guid); } // short circuit if invalid or banned username if (!$user || ($user->isBanned() && !isadminloggedin())) { register_error(elgg_echo('profile:notfound')); forward(); } $action = NULL; if (isset($page[1])) { $action = $page[1]; } if ($action == 'edit') { // use the core profile edit page require $CONFIG->path . 'pages/profile/edit.php'; return; } // main profile page $params = array( 'box' => elgg_view('profile/wrapper'), 'num_columns' => 3, ); $content = elgg_view_layout('widgets', $params); $body = elgg_view_layout('one_column', array('content' => $content)); echo elgg_view_page($title, $body); } /** * Profile URL generator for $user->getUrl(); * * @param ElggUser $user * @return string User URL */ function profile_url($user) { return elgg_get_site_url() . "pg/profile/" . $user->username; } /** * Parse ECML on parts of the profile * * @param unknown_type $hook * @param unknown_type $entity_type * @param unknown_type $return_value * @param unknown_type $params */ function profile_ecml_views_hook($hook, $entity_type, $return_value, $params) { $return_value['profile/profile_content'] = elgg_echo('profile'); return $return_value; }