Definition at line 45 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::_forwards | ( | ) |
get all gui classes that are called from this one (see class ilCtrl)
array | array of gui classes that are called |
Definition at line 103 of file class.ilPageObjectGUI.php.
{ return array("ilPageEditorGUI"); }
ilPageObjectGUI::activatePage | ( | ) |
Definition at line 457 of file class.ilPageObjectGUI.php.
{ $act_meth = $this->act_meth; $this->act_obj->$act_meth(true); $this->ctrl->redirectByClass("illmpageobjectgui", "view"); }
ilPageObjectGUI::deactivatePage | ( | ) |
Definition at line 450 of file class.ilPageObjectGUI.php.
{ $act_meth = $this->act_meth; $this->act_obj->$act_meth(false); $this->ctrl->redirectByClass("illmpageobjectgui", "view"); }
ilPageObjectGUI::displayValidationError | ( | $ | a_error | ) |
display validation error
string | $a_error error string |
Definition at line 1007 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{ if(is_array($a_error)) { $error_str = "<b>Validation Error(s):</b><br>"; foreach ($a_error as $error) { $err_mess = implode($error, " - "); if (!is_int(strpos($err_mess, ":0:"))) { $error_str .= htmlentities($err_mess)."<br />"; } } $this->tpl->setVariable("MESSAGE", $error_str); } }
ilPageObjectGUI::enableChangeComments | ( | $ | a_enabled | ) |
Definition at line 320 of file class.ilPageObjectGUI.php.
{ $this->change_comments = $a_enabled; }
ilPageObjectGUI::enableCitation | ( | $ | a_enabled | ) |
Definition at line 264 of file class.ilPageObjectGUI.php.
{ $this->citation = $a_enabled; }
& ilPageObjectGUI::executeCommand | ( | ) |
execute command
Definition at line 406 of file class.ilPageObjectGUI.php.
References $cmd, getHeader(), and getPageObject().
{ $next_class = $this->ctrl->getNextClass($this); //echo ":$next_class:"; $cmd = $this->ctrl->getCmd(); $this->ctrl->addTab("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view") , "view", "ilEditClipboardGUI"); switch($next_class) { case "ileditclipboardgui": $this->tabs_gui->clearTargets(); //$this->ctrl->setReturn($this, "view"); $clip_gui = new ilEditClipboardGUI(); $clip_gui->setPageBackTitle($this->page_back_title); //$ret =& $clip_gui->executeCommand(); $ret =& $this->ctrl->forwardCommand($clip_gui); break; case "ilpageeditorgui": $page_editor =& new ilPageEditorGUI($this->getPageObject(), $this); $page_editor->setLocator($this->locator); $page_editor->setHeader($this->getHeader()); $page_editor->setPageBackTitle($this->page_back_title); $page_editor->setIntLinkHelpDefault($this->int_link_def_type, $this->int_link_def_id); $page_editor->setIntLinkReturn($this->int_link_return); //$page_editor->executeCommand(); $ret =& $this->ctrl->forwardCommand($page_editor); break; case "ilmediapooltargetselector": include_once("content/classes/class.ilMediaPoolTargetSelector.php"); $target_sel =& new ilMediaPoolTargetSelector(); $ret =& $this->ctrl->forwardCommand($target_sel); break; default: $ret =& $this->$cmd(); break; } }
ilPageObjectGUI::getActivated | ( | ) |
Definition at line 388 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->activated;
}
ilPageObjectGUI::getBibId | ( | ) |
Definition at line 115 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->bib_id ? $this->bib_id : 0;
}
ilPageObjectGUI::getEnabledActivation | ( | ) |
Definition at line 398 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->activation;
}
ilPageObjectGUI::getFileDownloadLink | ( | ) |
Definition at line 294 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->file_download_link;
}
ilPageObjectGUI::getFullscreenLink | ( | ) |
Definition at line 304 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->fullscreen_link;
}
ilPageObjectGUI::getHeader | ( | ) |
Definition at line 168 of file class.ilPageObjectGUI.php.
Referenced by executeCommand().
{
return $this->header;
}
ilPageObjectGUI::getLinkFrame | ( | ) |
Definition at line 188 of file class.ilPageObjectGUI.php.
{
return $this->link_frame;
}
ilPageObjectGUI::getLinkParams | ( | ) |
Definition at line 178 of file class.ilPageObjectGUI.php.
{
return $this->link_params;
}
ilPageObjectGUI::getLinkXML | ( | ) |
Definition at line 198 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->link_xml;
}
ilPageObjectGUI::getOfflineDirectory | ( | ) |
get offline directory
Definition at line 344 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->offline_directory;
}
ilPageObjectGUI::getOutputMode | ( | ) |
Definition at line 138 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output_mode;
}
ilPageObjectGUI::getOutputSubmode | ( | ) |
Definition at line 250 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output_submode;
}
& ilPageObjectGUI::getPageObject | ( | ) |
Definition at line 125 of file class.ilPageObjectGUI.php.
Referenced by executeCommand().
{
return $this->obj;
}
ilPageObjectGUI::getPresentationTitle | ( | ) |
Definition at line 158 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->presentation_title;
}
ilPageObjectGUI::getQuestionHTML | ( | ) |
Definition at line 218 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->question_html;
}
ilPageObjectGUI::getQuestionXML | ( | ) |
Definition at line 213 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->question_xml;
}
ilPageObjectGUI::getSourcecodeDownloadScript | ( | ) |
Definition at line 260 of file class.ilPageObjectGUI.php.
{
return $this->sourcecode_download_script;
}
ilPageObjectGUI::getTemplateOutputVar | ( | ) |
Definition at line 239 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->template_output_var;
}
ilPageObjectGUI::getTemplateTargetVar | ( | ) |
Definition at line 228 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->target_var;
}
ilPageObjectGUI::getViewPageLink | ( | ) |
get view page link
Definition at line 364 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->view_page_link;
}
ilPageObjectGUI::getViewPageTarget | ( | ) |
get view page target frame
Definition at line 372 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->view_page_target;
}
ilPageObjectGUI::ilPageObjectGUI | ( | &$ | a_page_object | ) |
Constructor public.
Definition at line 73 of file class.ilPageObjectGUI.php.
References $ilCtrl, $ilias, $lng, $tpl, and setPageObject().
{ global $ilias, $tpl, $lng, $ilCtrl,$ilTabs; $this->ctrl =& $ilCtrl; $this->ilias =& $ilias; $this->tpl =& $tpl; $this->ctrl =& $ilCtrl; $this->lng =& $lng; $this->obj =& $a_page_object; $this->output_mode = "presentation"; $this->setPageObject($a_page_object); $this->output2template = true; $this->question_xml = ""; $this->question_html = ""; $this->tabs_gui =& $ilTabs; // USED FOR TRANSLATIONS $this->template_output_var = "PAGE_CONTENT"; $this->citation = false; $this->change_comments = false; $this->page_back_title = $this->lng->txt("page"); }
ilPageObjectGUI::isEnabledChangeComments | ( | ) |
Definition at line 325 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->change_comments;
}
ilPageObjectGUI::isEnabledCitation | ( | ) |
Definition at line 269 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->citation;
}
ilPageObjectGUI::outputToTemplate | ( | ) |
Definition at line 148 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output2template;
}
ilPageObjectGUI::presentation | ( | $ | mode = "presentation" |
) |
Definition at line 936 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{ global $tree; $this->setOutputMode($mode); return $this->showPage(); }
ilPageObjectGUI::preview | ( | ) |
Definition at line 916 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{ global $tree; $this->setOutputMode("preview"); return $this->showPage(); }
ilPageObjectGUI::setActivated | ( | $ | a_act | ) |
Definition at line 383 of file class.ilPageObjectGUI.php.
{ $this->activated = $a_act; }
ilPageObjectGUI::setActivationListener | ( | &$ | a_obj, | |
$ | a_meth | |||
) |
Definition at line 377 of file class.ilPageObjectGUI.php.
{ $this->act_obj =& $a_obj; $this->act_meth = $a_meth; }
ilPageObjectGUI::setBibId | ( | $ | a_id | ) |
Definition at line 109 of file class.ilPageObjectGUI.php.
{
// USED FOR SELECTION WHICH PAGE TURNS AND LATER PAGES SHOULD BE SHOWN
$this->bib_id = $a_id;
}
ilPageObjectGUI::setEnabledActivation | ( | $ | a_act | ) |
Definition at line 393 of file class.ilPageObjectGUI.php.
{ $this->activation = $a_act; }
ilPageObjectGUI::setFileDownloadLink | ( | $ | a_download_link | ) |
Definition at line 289 of file class.ilPageObjectGUI.php.
{ $this->file_download_link = $a_download_link; }
ilPageObjectGUI::setFullscreenLink | ( | $ | a_fullscreen_link | ) |
Definition at line 299 of file class.ilPageObjectGUI.php.
{ $this->fullscreen_link = $a_fullscreen_link; }
ilPageObjectGUI::setHeader | ( | $ | a_title = "" |
) |
Definition at line 163 of file class.ilPageObjectGUI.php.
{ $this->header = $a_title; }
ilPageObjectGUI::setIntLinkHelpDefault | ( | $ | a_type, | |
$ | a_id | |||
) |
Definition at line 309 of file class.ilPageObjectGUI.php.
{ $this->int_link_def_type = $a_type; $this->int_link_def_id = $a_id; }
ilPageObjectGUI::setIntLinkReturn | ( | $ | a_return | ) |
Definition at line 315 of file class.ilPageObjectGUI.php.
{ $this->int_link_return = $a_return; }
ilPageObjectGUI::setLinkFrame | ( | $ | l_frame = "" |
) |
Definition at line 183 of file class.ilPageObjectGUI.php.
{ $this->link_frame = $l_frame; }
ilPageObjectGUI::setLinkParams | ( | $ | l_params = "" |
) |
Definition at line 173 of file class.ilPageObjectGUI.php.
{ $this->link_params = $l_params; }
ilPageObjectGUI::setLinkXML | ( | $ | link_xml | ) |
Definition at line 193 of file class.ilPageObjectGUI.php.
{ $this->link_xml = $link_xml; }
ilPageObjectGUI::setLocator | ( | &$ | a_locator | ) |
Definition at line 274 of file class.ilPageObjectGUI.php.
{ $this->locator =& $a_locator; }
ilPageObjectGUI::setOfflineDirectory | ( | $ | offdir | ) |
set offline directory to offdir
offdir | contains diretory where to store files |
Definition at line 335 of file class.ilPageObjectGUI.php.
{ $this->offline_directory = $offdir; }
ilPageObjectGUI::setOutputMode | ( | $ | a_mode = "presentation" |
) |
mode: "presentation" | "edit" | "preview"
Definition at line 133 of file class.ilPageObjectGUI.php.
Referenced by presentation(), preview(), and view().
{ $this->output_mode = $a_mode; }
ilPageObjectGUI::setOutputSubmode | ( | $ | a_mode | ) |
Definition at line 244 of file class.ilPageObjectGUI.php.
{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->output_submode = $a_mode;
}
ilPageObjectGUI::setPageBackTitle | ( | $ | a_title | ) |
Definition at line 284 of file class.ilPageObjectGUI.php.
{ $this->page_back_title = $a_title; }
ilPageObjectGUI::setPageObject | ( | &$ | a_pg_obj | ) |
Definition at line 120 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().
{ $this->obj =& $a_pg_obj; }
ilPageObjectGUI::setPresentationTitle | ( | $ | a_title = "" |
) |
Definition at line 153 of file class.ilPageObjectGUI.php.
{ $this->presentation_title = $a_title; }
ilPageObjectGUI::setQuestionHTML | ( | $ | question_html | ) |
Definition at line 208 of file class.ilPageObjectGUI.php.
References $question_html.
{ $this->question_html = $question_html; }
ilPageObjectGUI::setQuestionXML | ( | $ | question_xml | ) |
Definition at line 203 of file class.ilPageObjectGUI.php.
{ $this->question_xml = $question_xml; }
ilPageObjectGUI::setSourcecodeDownloadScript | ( | $ | script_name | ) |
Definition at line 256 of file class.ilPageObjectGUI.php.
References $script_name.
{ $this->sourcecode_download_script = $script_name; }
ilPageObjectGUI::setTabs | ( | $ | a_tabs | ) |
Definition at line 279 of file class.ilPageObjectGUI.php.
{ $this->tabs_gui = $a_tabs; }
ilPageObjectGUI::setTemplateOutput | ( | $ | a_output = true |
) |
Definition at line 143 of file class.ilPageObjectGUI.php.
{ $this->output2template = $a_output; }
ilPageObjectGUI::setTemplateOutputVar | ( | $ | a_value | ) |
Definition at line 233 of file class.ilPageObjectGUI.php.
{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->template_output_var = $a_value;
}
ilPageObjectGUI::setTemplateTargetVar | ( | $ | a_variable | ) |
Definition at line 223 of file class.ilPageObjectGUI.php.
{ $this->target_var = $a_variable; }
ilPageObjectGUI::setViewPageLink | ( | $ | a_link, | |
$ | a_target = "" | |||
) |
set link for "view page" button
string | link target | |
string | target frame |
Definition at line 355 of file class.ilPageObjectGUI.php.
{ $this->view_page_link = $a_link; $this->view_page_target = $a_target; }
ilPageObjectGUI::showMediaFullscreen | ( | $ | a_style_id = 0 |
) |
show fullscreen view of media object
Definition at line 947 of file class.ilPageObjectGUI.php.
References $_GET, $output, ilObject::_lookupTitle(), ilUtil::getStyleSheetLocation(), ilUtil::getWebspaceDir(), xslt_create(), xslt_error(), xslt_free(), and xslt_process().
{ $this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "content"); $this->tpl->setCurrentBlock("ContentStyle"); $this->tpl->setVariable("LOCATION_CONTENT_STYLESHEET", 0); $this->tpl->parseCurrentBlock(); $this->tpl->setVariable("PAGETITLE", " - ".ilObject::_lookupTitle($_GET["mob_id"])); $this->tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation()); $this->tpl->setCurrentBlock("ilMedia"); require_once("content/classes/Media/class.ilObjMediaObject.php"); $media_obj =& new ilObjMediaObject($_GET["mob_id"]); if (!empty ($_GET["pg_id"])) { require_once("content/classes/Pages/class.ilPageObject.php"); $pg_obj =& new ilPageObject($this->obj->getParentType(), $_GET["pg_id"]); $pg_obj->buildDom(); $xml = "<dummy>"; // todo: we get always the first alias now (problem if mob is used multiple // times in page) $xml.= $pg_obj->getMediaAliasElement($_GET["mob_id"]); $xml.= $media_obj->getXML(IL_MODE_OUTPUT); $xml.="</dummy>"; } else { $xml = "<dummy>"; $xml.= $media_obj->getXML(IL_MODE_ALIAS); $xml.= $media_obj->getXML(IL_MODE_OUTPUT); $xml.="</dummy>"; } //echo htmlentities($xml); exit; $xsl = file_get_contents("./content/page.xsl"); $args = array( '/_xml' => $xml, '/_xsl' => $xsl ); $xh = xslt_create(); //echo "<b>XML:</b>".htmlentities($xml); // determine target frames for internal links //$pg_frame = $_GET["frame"]; $wb_path = ilUtil::getWebspaceDir("output"); // $wb_path = "../".$this->ilias->ini->readVariable("server","webspace_dir"); $mode = "fullscreen"; $params = array ('mode' => $mode, 'webspace_path' => $wb_path); $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params); echo xslt_error($xh); xslt_free($xh); // unmask user html $this->tpl->setVariable("MEDIA_CONTENT", $output); }
ilPageObjectGUI::showPage | ( | ) |
Definition at line 467 of file class.ilPageObjectGUI.php.
References $_GET, $_SESSION, $ilias, $output, $paragraph_plugins, $tree, ilPageEditorGUI::_doJSEditing(), ilObject::_exists(), ilInternalLink::_getTargetsOfSource(), ilPageEditorGUI::_isBrowserJSEditCapable(), ilObject::_lookupTitle(), ilUtil::buildLatexImages(), displayValidationError(), ilUtil::formSelect(), getActivated(), getBibId(), getEnabledActivation(), getFileDownloadLink(), getFullscreenLink(), ilUtil::getImagePath(), getLinkXML(), getOfflineDirectory(), getOutputMode(), getOutputSubmode(), getPresentationTitle(), getQuestionHTML(), getQuestionXML(), getTemplateOutputVar(), getTemplateTargetVar(), getViewPageLink(), getViewPageTarget(), ilUtil::getWebspaceDir(), ilObjContentObject::hasSuccessorPage(), ilUtil::insertLatexImages(), isEnabledChangeComments(), isEnabledCitation(), outputToTemplate(), sendInfo(), xslt_create(), xslt_free(), and xslt_process().
Referenced by presentation(), preview(), and view().
{ global $tree, $ilUser, $ilias; // init template if($this->outputToTemplate()) { if($this->getOutputMode() == "edit") { //echo ":".$this->getTemplateTargetVar().":"; $this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_edit_wysiwyg.html", "content"); // to do: status dependent class $this->tpl->setVariable("CLASS_PAGE_TD", "ilc_Page"); // user comment if ($this->isEnabledChangeComments()) { $this->tpl->setCurrentBlock("change_comment"); $this->tpl->setVariable("TXT_ADD_COMMENT", $this->lng->txt("cont_add_change_comment")); $this->tpl->parseCurrentBlock(); $this->tpl->setCurrentBlock("adm_content"); } $this->tpl->setVariable("TXT_INSERT_BEFORE", $this->lng->txt("cont_set_before")); $this->tpl->setVariable("TXT_INSERT_AFTER", $this->lng->txt("cont_set_after")); $this->tpl->setVariable("TXT_INSERT_CANCEL", $this->lng->txt("cont_set_cancel")); $this->tpl->setVariable("TXT_CONFIRM_DELETE", $this->lng->txt("cont_confirm_delete")); $this->tpl->setVariable("JS_DRAGDROP", ILIAS_HTTP_PATH."/content/js/wz_dragdrop.js"); $this->tpl->setVariable("IMG_DRAGDROP", ilUtil::getImagePath("icon_drag.gif")); if (!ilPageEditorGUI::_isBrowserJSEditCapable()) { $this->tpl->setVariable("TXT_JAVA_SCRIPT_CAPABLE", "<br />".$this->lng->txt("cont_browser_not_js_capable")); } $this->tpl->setVariable("TXT_CHANGE_EDIT_MODE", $this->lng->txt("cont_set_edit_mode")); if ($this->getEnabledActivation()) { $this->tpl->setCurrentBlock("de_activate_page"); if ($this->getActivated()) { $this->tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_deactivate_page")); $this->tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "deactivatePage"); } else { $this->tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_activate_page")); $this->tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "activatePage"); } $this->tpl->parseCurrentBlock(); } $med_mode = array("enable" => $this->lng->txt("cont_enable_media"), "disable" => $this->lng->txt("cont_disable_media")); $sel_media_mode = ($ilUser->getPref("ilPageEditor_MediaMode") == "disable") ? "disable" : "enable"; $js_mode = array("enable" => $this->lng->txt("cont_enable_js"), "disable" => $this->lng->txt("cont_disable_js")); $this->tpl->setVariable("SEL_MEDIA_MODE", ilUtil::formSelect($sel_media_mode, "media_mode", $med_mode, false, true, 0, "ilEditSelect")); // HTML active/inactive $html_mode = array("enable" => $this->lng->txt("cont_enable_html"), "disable" => $this->lng->txt("cont_disable_html")); $sel_html_mode = ($ilUser->getPref("ilPageEditor_HTMLMode") == "disable") ? "disable" : "enable"; $this->tpl->setVariable("SEL_HTML_MODE", ilUtil::formSelect($sel_html_mode, "html_mode", $html_mode, false, true, 0, "ilEditSelect")); if ($this->getViewPageLink() != "") { $this->tpl->setCurrentBlock("view_link"); $this->tpl->setVariable("LINK_VIEW_PAGE", $this->getViewPageLink()); $this->tpl->setVariable("TARGET_VIEW_PAGE", $this->getViewPageTarget()); $this->tpl->setVariable("TXT_VIEW_PAGE", $this->lng->txt("view")); $this->tpl->parseCurrentBlock(); } // javascript activation $sel_js_mode = "disable"; if($ilias->getSetting("enable_js_edit")) { $sel_js_mode = (ilPageEditorGUI::_doJSEditing()) ? "enable" : "disable"; $this->tpl->setVariable("SEL_JAVA_SCRIPT", ilUtil::formSelect($sel_js_mode, "js_mode", $js_mode, false, true, 0, "ilEditSelect")); } // multiple actions if ($sel_js_mode == "disable") { $this->tpl->setCurrentBlock("multi_actions"); $this->tpl->setVariable("TXT_DE_ACTIVATE_SELECTED", $this->lng->txt("cont_ed_enable")); $this->tpl->setVariable("TXT_DELETE_SELECTED", $this->lng->txt("cont_delete_selected")); $this->tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif")); $this->tpl->parseCurrentBlock(); } } else { if($this->getOutputSubmode() == 'translation') { $this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_translation_content.html", "content"); } else { // presentation if($this->getOutputMode() != 'preview') { $this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_content.html", "content"); } else // preview { $this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_preview.html", "content"); } } } if ($this->getOutputMode() != "presentation" && $this->getOutputMode() != "offline" && $this->getOutputMode() != "print") { $this->tpl->setVariable("FORMACTION", $this->ctrl->getFormActionByClass("ilpageeditorgui")); } // output media object edit list (of media links) if($this->getOutputMode() == "edit") { $links = ilInternalLink::_getTargetsOfSource($this->obj->getParentType().":pg", $this->obj->getId()); $mob_links = array(); foreach($links as $link) { if ($link["type"] == "mob") { if (ilObject::_exists($link["id"])) { $mob_links[$link["id"]] = ilObject::_lookupTitle($link["id"])." [".$link["id"]."]"; } } } if (count($mob_links) > 0) { $this->tpl->setCurrentBlock("med_link"); $this->tpl->setVariable("TXT_LINKED_MOBS", $this->lng->txt("cont_linked_mobs")); $this->tpl->setVariable("SEL_MED_LINKS", ilUtil::formSelect(0, "mob_id", $mob_links, false, true)); $this->tpl->setVariable("TXT_EDIT_MEDIA", $this->lng->txt("cont_edit_mob")); $this->tpl->setVariable("TXT_COPY_TO_CLIPBOARD", $this->lng->txt("cont_copy_to_clipboard")); //$this->tpl->setVariable("TXT_COPY_TO_POOL", $this->lng->txt("cont_copy_to_mediapool")); $this->tpl->parseCurrentBlock(); } } if ($_GET["reloadTree"] == "y") { $this->tpl->setCurrentBlock("reload_tree"); if ($this->obj->getParentType() == "dbk") { $this->tpl->setVariable("LINK_TREE", $this->ctrl->getLinkTargetByClass("ilobjdlbookgui", "explorer")); } else { $this->tpl->setVariable("LINK_TREE", $this->ctrl->getLinkTargetByClass("ilobjlearningmodulegui", "explorer")); } $this->tpl->parseCurrentBlock(); } } // get content $builded = $this->obj->buildDom(); $this->obj->addFileSizes(); // manage hierarchical ids if($this->getOutputMode() == "edit") { $this->obj->addHierIDs(); $hids = $this->obj->getHierIds(); $row1_ids = $this->obj->getFirstRowIds(); $col1_ids = $this->obj->getFirstColumnIds(); $litem_ids = $this->obj->getListItemIds(); $fitem_ids = $this->obj->getFileItemIds(); // standard menues $hids = $this->obj->getHierIds(); foreach($hids as $hid) { $this->tpl->setCurrentBlock("add_dhtml"); $this->tpl->setVariable("CONTEXTMENU", "contextmenu_".$hid); $this->tpl->parseCurrentBlock(); } // column menues for tables foreach($col1_ids as $hid) { $this->tpl->setCurrentBlock("add_dhtml"); $this->tpl->setVariable("CONTEXTMENU", "contextmenu_r".$hid); $this->tpl->parseCurrentBlock(); } // row menues for tables foreach($row1_ids as $hid) { $this->tpl->setCurrentBlock("add_dhtml"); $this->tpl->setVariable("CONTEXTMENU", "contextmenu_c".$hid); $this->tpl->parseCurrentBlock(); } // list item menues foreach($litem_ids as $hid) { $this->tpl->setCurrentBlock("add_dhtml"); $this->tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid); $this->tpl->parseCurrentBlock(); } // file item menues foreach($fitem_ids as $hid) { $this->tpl->setCurrentBlock("add_dhtml"); $this->tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid); $this->tpl->parseCurrentBlock(); } } $this->obj->addSourceCodeHighlighting($this->getOutputMode()); //echo "<br>-".htmlentities($this->obj->getXMLContent())."-<br><br>"; //echo "<br>-".htmlentities($this->getLinkXML())."-"; $content = $this->obj->getXMLFromDom(false, true, true, $this->getLinkXML().$this->getQuestionXML()); // check validation errors if($builded !== true) { $this->displayValidationError($builded); } else { $this->displayValidationError($_SESSION["il_pg_error"]); } unset($_SESSION["il_pg_error"]); if(isset($_SESSION["citation_error"])) { sendInfo($this->lng->txt("cont_citation_selection_not_valid")); session_unregister("citation_error"); unset($_SESSION["citation_error"]); } // get title $pg_title = $this->getPresentationTitle(); //$content = str_replace(" ", "", $content); // run xslt $xsl = file_get_contents("./content/page.xsl"); $args = array( '/_xml' => $content, '/_xsl' => $xsl ); $xh = xslt_create(); //echo "<b>XML</b>:".htmlentities($content).":<br>"; // echo "<b>XSLT</b>:".htmlentities($xsl).":<br>"; // echo "mode:".$this->getOutputMode().":<br>"; $add_path = ilUtil::getImagePath("add.gif"); $col_path = ilUtil::getImagePath("col.gif"); $row_path = ilUtil::getImagePath("row.gif"); $item_path = ilUtil::getImagePath("item.gif"); $med_disabled_path = ilUtil::getImagePath("media_disabled.gif"); if ($this->getOutputMode() != "offline") { $enlarge_path = ilUtil::getImagePath("enlarge.gif"); $wb_path = ilUtil::getWebspaceDir("output"); } else { $enlarge_path = "images/enlarge.gif"; $wb_path = "."; } $pg_title_class = ($this->getOutputMode() == "print") ? "ilc_PrintPageTitle" : ""; // page splitting only for learning modules and // digital books $enable_split_new = ($this->obj->getParentType() == "lm" || $this->obj->getParentType() == "dbk") ? "y" : "n"; // page splitting to next page only for learning modules and // digital books if next page exists in tree if (($this->obj->getParentType() == "lm" || $this->obj->getParentType() == "dbk") && ilObjContentObject::hasSuccessorPage($this->obj->getParentId(), $this->obj->getId())) { $enable_split_next = "y"; } else { $enable_split_next = "n"; } $paragraph_plugins = new ilParagraphPlugins(); $paragraph_plugins->initialize (); /* if (!session_is_registered("paragraph_plugins")) { $paragraph_plugins = new ilParagraphPlugins(); $paragraph_plugins->initialize (); $_SESSION ["paragraph_plugins"] = $paragraph_plugins; } */ if ($this->getOutputMode() == "presentation") { $paragraph_plugin_string = $paragraph_plugins->serializeToString(); $_SESSION ["paragraph_plugins"] = $paragraph_plugins; } $img_path = ilUtil::getImagePath("", false, $this->getOutputMode(), $this->getOutputMode() == "offline"); //$wb_path = "../".$this->ilias->ini->readVariable("server","webspace_dir"); //echo "-".$this->sourcecode_download_script.":"; // added UTF-8 encoding otherwise umlaute are converted too $params = array ('mode' => $this->getOutputMode(), 'pg_title' => htmlentities($pg_title,ENT_QUOTES,"UTF-8"), 'pg_id' => $this->obj->getId(), 'pg_title_class' => $pg_title_class, 'webspace_path' => $wb_path, 'enlarge_path' => $enlarge_path, 'img_add' => $add_path, 'img_col' => $col_path, 'img_row' => $row_path, 'img_item' => $item_path, 'enable_split_new' => $enable_split_new, 'enable_split_next' => $enable_split_next, 'link_params' => $this->link_params, 'file_download_link' => $this->getFileDownloadLink(), 'fullscreen_link' => $this->getFullscreenLink(), 'med_disabled_path' => $med_disabled_path, 'img_path' => $img_path, 'parent_id' => $this->obj->getParentId(), 'download_script' => $this->sourcecode_download_script, 'encoded_download_script' => urlencode($this->sourcecode_download_script), // digilib 'bib_id' => $this->getBibId(),'citation' => (int) $this->isEnabledCitation(), 'pagebreak' => $this->lng->txt('dgl_pagebreak'), 'page' => $this->lng->txt('page'), 'citate_page' => $this->lng->txt('citate_page'), 'citate_from' => $this->lng->txt('citate_from'), 'citate_to' => $this->lng->txt('citate_to'), 'citate' => $this->lng->txt('citate'), 'media_mode' => $ilUser->getPref("ilPageEditor_MediaMode"), 'javascript' => $sel_js_mode, 'paragraph_plugins' => $paragraph_plugin_string); if($this->link_frame != "") // todo other link types $params["pg_frame"] = $this->link_frame; //if (version_compare(PHP_VERSION,'5','>=')) //{ // $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params, true); //} //else //{ $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params); //} xslt_free($xh); // unmask user html if ($this->getOutputMode() != "edit" || $ilUser->getPref("ilPageEditor_HTMLMode") != "disable") { $output = str_replace("<","<",$output); $output = str_replace(">",">",$output); } $output = str_replace("&", "&", $output); // replace latex code: todo: finish if ($this->getOutputMode() != "offline") { $output = ilUtil::insertLatexImages($output); } else { $output = ilUtil::buildLatexImages($output, $this->getOfflineDirectory()); } // (horrible) workaround for preventing template engine // from hiding paragraph text that is enclosed // in curly brackets (e.g. "{a}", see ilLMEditorGUI::executeCommand()) $output = str_replace("{", "{", $output); $output = str_replace("}", "}", $output); //echo "<b>HTML</b>:".htmlentities($output).":<br>"; // remove all newlines (important for code / pre output) $output = str_replace("\n", "", $output); $qhtml = $this->getQuestionHTML(); if (strlen($qhtml)) { // removed simple str_replace with preg_replace because if the question content // is part of a table, the xmlns isn't added and the question content wasn't visible then // Helmut Schottmüller, 2006-11-15 $output = preg_replace("/(<div( xmlns:xhtml\=\"http:\/\/www.w3.org\/1999\/xhtml\"){0,1} class\=\"ilc_Question\">)/ims", "\\1" . $qhtml, $output); // old source code prior to the preg_replace change // $question_prefix = "<div xmlns:xhtml=\"http://www.w3.org/1999/xhtml\" class=\"ilc_Question\">"; // $output = str_replace($question_prefix, $question_prefix . $qhtml, $output); } if($this->getOutputMode() == "edit" && !$this->getActivated()) { $output = '<div class="il_editarea_disabled">'.$output.'</div>'; } // output if($this->outputToTemplate()) { $this->tpl->setVariable($this->getTemplateOutputVar(), $output); return $output; } else { return $output; } }
ilPageObjectGUI::view | ( | ) |
Definition at line 926 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{ global $tree; $this->setOutputMode("edit"); return $this->showPage(); }
ilPageObjectGUI::$activated = true |
Definition at line 67 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$activation = false |
Definition at line 66 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$bib_id |
Definition at line 61 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$change_comments |
Definition at line 64 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$citation |
Definition at line 62 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$ctrl |
Definition at line 50 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$ilias |
Definition at line 47 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI(), and showPage().
ilPageObjectGUI::$link_params |
Definition at line 60 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$lng |
Definition at line 49 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().
ilPageObjectGUI::$obj |
Definition at line 51 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$output2template |
Definition at line 59 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$output_mode |
Definition at line 52 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$output_submode |
Definition at line 53 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$presentation_title |
Definition at line 54 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$question_html |
Definition at line 65 of file class.ilPageObjectGUI.php.
Referenced by setQuestionHTML().
ilPageObjectGUI::$return_location |
Definition at line 56 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$sourcecode_download_script |
Definition at line 63 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$target_script |
Definition at line 55 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$target_var |
Definition at line 57 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$template_output_var |
Definition at line 58 of file class.ilPageObjectGUI.php.
ilPageObjectGUI::$tpl |
Definition at line 48 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().