Beispiel #1
0
        		$run_result .= $body;*/
        // Draw the user's comment wall
        if (function_exists("commentwall_displayonprofile")) {
            $offset = optional_param('offset', 0);
            $limit = optional_param('limit', 3);
            $run_result .= commentwall_displayonprofile($page_owner, $limit, $offset);
        }
        $view = array();
        $view['body'] = $run_result;
        $run_result = '';
        $username = user_info('username', $this->id);
        $run_result .= '<div id="profile_widgets">' . "\n";
        $run_result .= widget_page_display($page_owner, 'profile', 0, 2);
        $run_result .= "</div>\n";
        $view['body'] .= $run_result;
        return $view;
    }
}
//Pruebas con el perfil extendido
// init library
$profileall = new ElggProfile($profile_id);
//$title = user_name($profile_id); //$profile->display_name();
$body = $profileall->view();
$run_result .= $body;
// init library
$profile = new ElggProfile2($profile_id);
$title = $profile->display_name();
// $title = 'Profile';
$view = $profile->view();
$run_result .= $view['body'];
templates_page_output($title, $run_result);
Beispiel #2
0
<?php

//    ELGG profile view page
// Run includes
require_once dirname(dirname(__FILE__)) . '/includes.php';
require_once $CFG->dirroot . 'profile/profile.class.php';
// define what profile to show
$profile_name = optional_param('profile_name', '', PARAM_ALPHANUM);
if (!empty($profile_name)) {
    $profile_id = run("users:name_to_id", $profile_name);
}
if (empty($profile_id)) {
    $profile_id = optional_param('profile_id', -1, PARAM_INT);
}
// and the page_owner naturally
$page_owner = $profile_id;
define("context", "profile");
templates_page_setup();
// init library
$profile = new ElggProfile($profile_id);
$title = $profile->display_name();
$body = $profile->view();
$body = templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body));
echo templates_page_draw(array($title, $body));