/** * Forward to page editor */ protected function forwardToPageObject() { global $lng, $tpl; $key = (int) $_REQUEST['key']; $this->ctrl->saveParameter($this, 'key', $key); include_once "./Services/Authentication/classes/class.ilLoginPage.php"; include_once "./Services/Authentication/classes/class.ilLoginPageGUI.php"; include_once './Services/Style/classes/class.ilObjStyleSheet.php'; $lng->loadLanguageModule("content"); if (!ilLoginPage::_exists('auth', $key)) { // doesn't exist -> create new one $new_page_object = new ilLoginPage(); $new_page_object->setParentId($key); $new_page_object->setId($key); $new_page_object->createFromXML(); } include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0)); $tpl->setCurrentBlock("SyntaxStyle"); $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath()); $tpl->parseCurrentBlock(); $this->ctrl->setReturnByClass('illoginpagegui', "edit"); $page_gui = new ilLoginPageGUI($key); $page_gui->setTemplateTargetVar("ADM_CONTENT"); $page_gui->setLinkXML($link_xml); //$page_gui->enableChangeComments($this->content_object->isActiveHistoryUserComments()); //$page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, "downloadFile")); //$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen")); //$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo // $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this, "")); $page_gui->setPresentationTitle(""); $page_gui->setTemplateOutput(false); //$page_gui->setLocator($contObjLocator); $page_gui->setHeader(""); // style tab //$page_gui->setTabHook($this, "addPageTabs"); if ($this->ctrl->getCmd() == 'editPage') { $this->ctrl->setCmd('edit'); } $html = $this->ctrl->forwardCommand($page_gui); $tpl->setContent($html); }
/** * Get HTML of ILIAS login page editor * @return string html */ protected function getLoginPageEditorHTML() { global $lng, $tpl; include_once './Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php'; $lpe = ilAuthLoginPageEditorSettings::getInstance(); $active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey()); if (!$active_lang) { return ''; } // if page does not exist, return nothing include_once './Services/COPage/classes/class.ilPageUtil.php'; if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) { return ''; } include_once './Services/Authentication/classes/class.ilLoginPage.php'; include_once './Services/Authentication/classes/class.ilLoginPageGUI.php'; include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0)); $tpl->setCurrentBlock("SyntaxStyle"); $tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath()); $tpl->parseCurrentBlock(); // get page object $page_gui = new ilLoginPageGUI(ilLanguage::lookupId($active_lang)); include_once "./Services/Style/classes/class.ilObjStyleSheet.php"; $page_gui->setStyleId(0, 'auth'); $page_gui->setPresentationTitle(""); $page_gui->setTemplateOutput(false); $page_gui->setHeader(""); $ret = $page_gui->showPage(); return $ret; }