small css tweak
[elgg.git] / profile / index.php
blob14d2ea657dae76072c6ce3ddcf03885900cebf25
1 <?php
3 // ELGG profile view page
5 // Run includes
6 require_once(dirname(dirname(__FILE__)) . '/includes.php');
7 require_once($CFG->dirroot . 'profile/profile.class.php');
9 // define what profile to show
10 $profile_name = optional_param('profile_name', '', PARAM_ALPHANUM);
11 if (!empty($profile_name)) {
12 $profile_id = run("users:name_to_id", $profile_name);
14 if (empty($profile_id)) {
15 $profile_id = optional_param('profile_id', -1, PARAM_INT);
17 // and the page_owner naturally
18 $page_owner = $profile_id;
20 define("context", "profile");
21 templates_page_setup();
23 // init library
24 $profile = new ElggProfile($profile_id);
26 $title = $profile->display_name();
27 $body = $profile->view();
29 $body = templates_draw( array(
30 'context' => 'contentholder',
31 'title' => $title,
32 'body' => $body
33 ));
35 echo templates_page_draw(array($title, $body));