protected function renderProfile($a_user_id, $a_type, array $a_fields = null) { global $ilCtrl; include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php"; $pub_profile = new ilPublicUserProfileGUI($a_user_id); $pub_profile->setEmbedded(true, $this->getOutputMode() == "offline"); // full circle: additional was set in the original public user profile call $pub_profile->setAdditional($this->getAdditional()); if ($a_type == "manual" && sizeof($a_fields)) { $prefs = array(); foreach ($a_fields as $field) { $field = trim($field); if ($field) { $prefs["public_" . $field] = "y"; } } $pub_profile->setCustomPrefs($prefs); } if ($this->getOutputMode() != "offline") { return $ilCtrl->getHTML($pub_profile); } else { return $pub_profile->getEmbeddable(); } }
protected function renderProfile($a_user_id, $a_type, array $a_fields = null) { global $ilCtrl; $user_id = $this->getPageContentUserId($a_user_id); if ($this->getOutputMode() == "offline") { // profile picture is done in ilPortfolioHTMLExport $this->export_material["js"][] = "http://maps.google.com/maps/api/js?sensor=false"; $this->export_material["js"][] = "./Services/Maps/js/ServiceGoogleMaps.js"; $this->export_material["js"][] = "./Services/Maps/js/OpenLayers.js"; $this->export_material["js"][] = "./Services/Maps/js/ServiceOpenLayers.js"; } include_once "./Services/User/classes/class.ilPublicUserProfileGUI.php"; $pub_profile = new ilPublicUserProfileGUI($user_id); $pub_profile->setEmbedded(true, $this->getOutputMode() == "offline"); // full circle: additional was set in the original public user profile call $pub_profile->setAdditional($this->getAdditional()); if ($a_type == "manual" && sizeof($a_fields)) { $prefs = array(); foreach ($a_fields as $field) { $field = trim($field); if ($field) { $prefs["public_" . $field] = "y"; } } $pub_profile->setCustomPrefs($prefs); } if ($this->getOutputMode() != "offline") { return $ilCtrl->getHTML($pub_profile); } else { return $pub_profile->getEmbeddable(); } }