Example #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);
Example #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));
<?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 = user_info_username('ident', $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 = user_name($profile_id);
//$profile->display_name();
$body = $profile->view();
$body = templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body));
echo templates_page_draw(array($title, $body));
Example #4
0
// define what profile to show
$profile_name = optional_param('profile_name', '', PARAM_ALPHANUM);
if (!empty($profile_name)) {
    $profile_id = user_info_username('ident', $profile_name);
}
if (empty($profile_id)) {
    // fetch from GET/POST param
    $profile_id = page_owner();
    // if it wasn't in GET/POST but we have a valid session, use it
    if ($profile_id === -1 && isset($_SESSION['userid'])) {
        $profile_id = $_SESSION['userid'];
    }
}
$profile_name = user_info('username', $profile_id);
// init library
$profile = new ElggProfile($profile_id);
define("context", "profile");
protect(1);
global $page_owner, $metatags, $CFG, $data;
if (isset($_SESSION['profile:preload'])) {
    $data['profile:preload'] = $_SESSION['profile:preload'];
    unset($_SESSION['profile:preload']);
}
if (isset($_SESSION['profile:preload:access'])) {
    $data['profile:preload:access'] = $_SESSION['profile:preload:access'];
    unset($_SESSION['profile:preload:access']);
}
$title = user_name($page_owner) . " :: " . __gettext("Edit profile") . "";
templates_page_setup();
$metatags .= "<script type=\"text/javascript\" src=\"" . $CFG->wwwroot . "mod/profile/tabber/tabber.js\"></script>";
$metatags .= "<link rel=\"stylesheet\" href=\"" . $CFG->wwwroot . "mod/profile/tabber/example.css\" type=\"text/css\" media=\"screen\" />";
Example #5
0
// 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)) {
    // fetch from GET/POST param
    $profile_id = optional_param('profile_id', -1, PARAM_INT);
    // if it wasn't in GET/POST but we have a valid session, use it
    if ($profile_id === -1 && isset($_SESSION['userid'])) {
        $profile_id = $_SESSION['userid'];
    }
    $profile_name = run("users:id_to_name", $profile_id);
}
// init library
$profile = new ElggProfile($profile_id);
define("context", "profile");
protect(1);
global $page_owner;
$title = run("users:display:name", $page_owner) . " :: " . gettext("Edit profile") . "";
templates_page_setup();
if ($profile_new = data_submitted()) {
    $body = profile_update($profile_new);
} else {
    $body = $profile->display_form() . (include $CFG->dirroot . "units/tinymce/tinymce_js.php");
}
$body = templates_draw(array('context' => 'contentholder', 'title' => $title, 'body' => $body));
print templates_page_draw(array($title, $body));
function profile_update($profile_new)
{
    global $CFG;