Definition at line 44 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 96 of file class.ilPageObjectGUI.php.
{
return array("ilPageEditorGUI");
}
| ilPageObjectGUI::displayValidationError | ( | $ | a_error | ) |
display validation error
| string | $a_error error string |
Definition at line 818 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);
}
}
Here is the caller graph for this function:| ilPageObjectGUI::enableChangeComments | ( | $ | a_enabled | ) |
Definition at line 293 of file class.ilPageObjectGUI.php.
{
$this->change_comments = $a_enabled;
}
| ilPageObjectGUI::enableCitation | ( | $ | a_enabled | ) |
Definition at line 247 of file class.ilPageObjectGUI.php.
{
$this->citation = $a_enabled;
}
| & ilPageObjectGUI::executeCommand | ( | ) |
execute command
Definition at line 334 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->ctrl->setReturn($this, "view");
$clip_gui = new ilEditClipboardGUI();
//$ret =& $clip_gui->executeCommand();
$ret =& $this->ctrl->forwardCommand($clip_gui);
break;
case "ilpageeditorgui":
$page_editor =& new ilPageEditorGUI($this->getPageObject());
$page_editor->setLocator($this->locator);
$page_editor->setHeader($this->getHeader());
$page_editor->setIntLinkHelpDefault($this->int_link_def_type,
$this->int_link_def_id);
//$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;
}
}
Here is the call graph for this function:| ilPageObjectGUI::getBibId | ( | ) |
Definition at line 108 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->bib_id ? $this->bib_id : 0;
}
Here is the caller graph for this function:| ilPageObjectGUI::getFileDownloadLink | ( | ) |
Definition at line 272 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->file_download_link;
}
Here is the caller graph for this function:| ilPageObjectGUI::getFullscreenLink | ( | ) |
Definition at line 282 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->fullscreen_link;
}
Here is the caller graph for this function:| ilPageObjectGUI::getHeader | ( | ) |
Definition at line 161 of file class.ilPageObjectGUI.php.
Referenced by executeCommand().
{
return $this->header;
}
Here is the caller graph for this function:| ilPageObjectGUI::getLinkFrame | ( | ) |
Definition at line 181 of file class.ilPageObjectGUI.php.
{
return $this->link_frame;
}
| ilPageObjectGUI::getLinkParams | ( | ) |
Definition at line 171 of file class.ilPageObjectGUI.php.
{
return $this->link_params;
}
| ilPageObjectGUI::getLinkXML | ( | ) |
Definition at line 191 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->link_xml;
}
Here is the caller graph for this function:| ilPageObjectGUI::getOutputMode | ( | ) |
Definition at line 131 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output_mode;
}
Here is the caller graph for this function:| ilPageObjectGUI::getOutputSubmode | ( | ) |
Definition at line 233 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output_submode;
}
Here is the caller graph for this function:| & ilPageObjectGUI::getPageObject | ( | ) |
Definition at line 118 of file class.ilPageObjectGUI.php.
Referenced by executeCommand().
{
return $this->obj;
}
Here is the caller graph for this function:| ilPageObjectGUI::getPresentationTitle | ( | ) |
Definition at line 151 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->presentation_title;
}
Here is the caller graph for this function:| ilPageObjectGUI::getQuestionXML | ( | ) |
Definition at line 201 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->question_xml;
}
Here is the caller graph for this function:| ilPageObjectGUI::getSourcecodeDownloadScript | ( | ) |
Definition at line 243 of file class.ilPageObjectGUI.php.
{
return $this->sourcecode_download_script;
}
| ilPageObjectGUI::getTemplateOutputVar | ( | ) |
Definition at line 222 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->template_output_var;
}
Here is the caller graph for this function:| ilPageObjectGUI::getTemplateTargetVar | ( | ) |
Definition at line 211 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->target_var;
}
Here is the caller graph for this function:| ilPageObjectGUI::getViewPageLink | ( | ) |
get view page link
Definition at line 318 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->view_page_link;
}
Here is the caller graph for this function:| ilPageObjectGUI::getViewPageTarget | ( | ) |
get view page target frame
Definition at line 326 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->view_page_target;
}
Here is the caller graph for this function:| ilPageObjectGUI::ilPageObjectGUI | ( | &$ | a_page_object | ) |
Constructor public.
Definition at line 69 of file class.ilPageObjectGUI.php.
References $ilCtrl, $ilias, $lng, $tpl, and setPageObject().
{
global $ilias, $tpl, $lng, $ilCtrl;
$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 = "";
// USED FOR TRANSLATIONS
$this->template_output_var = "PAGE_CONTENT";
$this->citation = false;
$this->change_comments = false;
}
Here is the call graph for this function:| ilPageObjectGUI::isEnabledChangeComments | ( | ) |
Definition at line 298 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->change_comments;
}
Here is the caller graph for this function:| ilPageObjectGUI::isEnabledCitation | ( | ) |
Definition at line 252 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->citation;
}
Here is the caller graph for this function:| ilPageObjectGUI::outputToTemplate | ( | ) |
Definition at line 141 of file class.ilPageObjectGUI.php.
Referenced by showPage().
{
return $this->output2template;
}
Here is the caller graph for this function:| ilPageObjectGUI::presentation | ( | $ | mode = "presentation" |
) |
Definition at line 747 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{
global $tree;
$this->setOutputMode($mode);
return $this->showPage();
}
Here is the call graph for this function:| ilPageObjectGUI::preview | ( | ) |
Definition at line 727 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{
global $tree;
$this->setOutputMode("preview");
return $this->showPage();
}
Here is the call graph for this function:| ilPageObjectGUI::setBibId | ( | $ | a_id | ) |
Definition at line 102 of file class.ilPageObjectGUI.php.
{
// USED FOR SELECTION WHICH PAGE TURNS AND LATER PAGES SHOULD BE SHOWN
$this->bib_id = $a_id;
}
| ilPageObjectGUI::setFileDownloadLink | ( | $ | a_download_link | ) |
Definition at line 267 of file class.ilPageObjectGUI.php.
{
$this->file_download_link = $a_download_link;
}
| ilPageObjectGUI::setFullscreenLink | ( | $ | a_fullscreen_link | ) |
Definition at line 277 of file class.ilPageObjectGUI.php.
{
$this->fullscreen_link = $a_fullscreen_link;
}
| ilPageObjectGUI::setHeader | ( | $ | a_title = "" |
) |
Definition at line 156 of file class.ilPageObjectGUI.php.
{
$this->header = $a_title;
}
| ilPageObjectGUI::setIntLinkHelpDefault | ( | $ | a_type, | |
| $ | a_id | |||
| ) |
Definition at line 287 of file class.ilPageObjectGUI.php.
{
$this->int_link_def_type = $a_type;
$this->int_link_def_id = $a_id;
}
| ilPageObjectGUI::setLinkFrame | ( | $ | l_frame = "" |
) |
Definition at line 176 of file class.ilPageObjectGUI.php.
{
$this->link_frame = $l_frame;
}
| ilPageObjectGUI::setLinkParams | ( | $ | l_params = "" |
) |
Definition at line 166 of file class.ilPageObjectGUI.php.
{
$this->link_params = $l_params;
}
| ilPageObjectGUI::setLinkXML | ( | $ | link_xml | ) |
Definition at line 186 of file class.ilPageObjectGUI.php.
{
$this->link_xml = $link_xml;
}
| ilPageObjectGUI::setLocator | ( | &$ | a_locator | ) |
Definition at line 257 of file class.ilPageObjectGUI.php.
{
$this->locator =& $a_locator;
}
| ilPageObjectGUI::setOutputMode | ( | $ | a_mode = "presentation" |
) |
mode: "presentation" | "edit" | "preview"
Definition at line 126 of file class.ilPageObjectGUI.php.
Referenced by presentation(), preview(), and view().
{
$this->output_mode = $a_mode;
}
Here is the caller graph for this function:| ilPageObjectGUI::setOutputSubmode | ( | $ | a_mode | ) |
Definition at line 227 of file class.ilPageObjectGUI.php.
{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->output_submode = $a_mode;
}
| ilPageObjectGUI::setPageObject | ( | &$ | a_pg_obj | ) |
Definition at line 113 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().
{
$this->obj =& $a_pg_obj;
}
Here is the caller graph for this function:| ilPageObjectGUI::setPresentationTitle | ( | $ | a_title = "" |
) |
Definition at line 146 of file class.ilPageObjectGUI.php.
{
$this->presentation_title = $a_title;
}
| ilPageObjectGUI::setQuestionXML | ( | $ | question_xml | ) |
Definition at line 196 of file class.ilPageObjectGUI.php.
{
$this->question_xml = $question_xml;
}
| ilPageObjectGUI::setSourcecodeDownloadScript | ( | $ | script_name | ) |
Definition at line 239 of file class.ilPageObjectGUI.php.
References $script_name.
{
$this->sourcecode_download_script = $script_name;
}
| ilPageObjectGUI::setTabs | ( | $ | a_tabs | ) |
Definition at line 262 of file class.ilPageObjectGUI.php.
{
$this->tabs = $a_tabs;
}
| ilPageObjectGUI::setTemplateOutput | ( | $ | a_output = true |
) |
Definition at line 136 of file class.ilPageObjectGUI.php.
{
$this->output2template = $a_output;
}
| ilPageObjectGUI::setTemplateOutputVar | ( | $ | a_value | ) |
Definition at line 216 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 206 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 309 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 758 of file class.ilPageObjectGUI.php.
References $_GET, $args, $output, $params, $xh, $xml, $xsl, 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);
}
Here is the call graph for this function:| ilPageObjectGUI::showPage | ( | ) |
Definition at line 377 of file class.ilPageObjectGUI.php.
References $_GET, $_SESSION, $args, $ilias, $ilUser, $output, $params, $tree, $xh, $xsl, ilPageEditorGUI::_doJSEditing(), ilInternalLink::_getTargetsOfSource(), ilPageEditorGUI::_isBrowserJSEditCapable(), ilObject::_lookupTitle(), displayValidationError(), ilUtil::formSelect(), getBibId(), getFileDownloadLink(), getFullscreenLink(), ilUtil::getImagePath(), getLinkXML(), getOutputMode(), getOutputSubmode(), getPresentationTitle(), getQuestionXML(), getTemplateOutputVar(), getTemplateTargetVar(), getViewPageLink(), getViewPageTarget(), ilUtil::getWebspaceDir(), ilObjContentObject::hasSuccessorPage(), 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");
// 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("ilias_logo.png"));
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"));
$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";
//if (DEVMODE)
//{
$js_mode = array("enable" => $this->lng->txt("cont_enable_js"),
"disable" => $this->lng->txt("cont_disable_js"));
//}
//else
//{
// $js_mode = array("disable" => $this->lng->txt("cont_disable_js"));
//}
$this->tpl->setVariable("SEL_MEDIA_MODE",
ilUtil::formSelect($sel_media_mode, "media_mode", $med_mode, false, true));
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));
}
}
else
{
if($this->getOutputSubmode() == 'translation')
{
$this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_translation_content.html", "content");
}
else
{
$this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_content.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")
{
$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 = "";
if ($this->getOutputMode() == "presentation")
{
if (is_object($GLOBALS["paragraph_plugins"])) {
$paragraph_plugins = $GLOBALS["paragraph_plugins"];
$paragraph_plugins = $paragraph_plugins->serializeToString();
}
}*/
$img_path = ilUtil::getImagePath("", false, $this->getOutputMode(), $this->getOutputMode() == "offline");
//$paragraph_plugins = "java122#animate#http://www.mps.de#jeliot.gif|php3#edit#http://www.edit.de#edit.gif";
//$wb_path = "../".$this->ilias->ini->readVariable("server","webspace_dir");
//echo "-".$this->sourcecode_download_script.":";
$params = array ('mode' => $this->getOutputMode(), 'pg_title' => $pg_title,
'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),
'bib_id' => $this->getBibId(),'citation' => (int) $this->isEnabledCitation(),
'media_mode' => $ilUser->getPref("ilPageEditor_MediaMode"),
'javascript' => $sel_js_mode);
if($this->link_frame != "") // todo other link types
$params["pg_frame"] = $this->link_frame;
$output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args, $params);
//echo xslt_error($xh);
xslt_free($xh);
// unmask user html
$output = str_replace("<","<",$output);
$output = str_replace(">",">",$output);
$output = str_replace("&", "&", $output);
// (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);
// output
if($this->outputToTemplate())
{
$this->tpl->setVariable($this->getTemplateOutputVar(), $output);
return $output;
}
else
{
return $output;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPageObjectGUI::view | ( | ) |
Definition at line 737 of file class.ilPageObjectGUI.php.
References $tree, setOutputMode(), and showPage().
{
global $tree;
$this->setOutputMode("edit");
return $this->showPage();
}
Here is the call graph for this function:| ilPageObjectGUI::$bib_id |
Definition at line 60 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$change_comments |
Definition at line 63 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$citation |
Definition at line 61 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$ctrl |
Definition at line 49 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$ilias |
Definition at line 46 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI(), and showPage().
| ilPageObjectGUI::$link_params |
Definition at line 59 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$lng |
Definition at line 48 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().
| ilPageObjectGUI::$obj |
Definition at line 50 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$output2template |
Definition at line 58 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$output_mode |
Definition at line 51 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$output_submode |
Definition at line 52 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$presentation_title |
Definition at line 53 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$return_location |
Definition at line 55 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$sourcecode_download_script |
Definition at line 62 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$target_script |
Definition at line 54 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$target_var |
Definition at line 56 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$template_output_var |
Definition at line 57 of file class.ilPageObjectGUI.php.
| ilPageObjectGUI::$tpl |
Definition at line 47 of file class.ilPageObjectGUI.php.
Referenced by ilPageObjectGUI().
1.7.1