ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilPageObjectGUI Class Reference

Class ilPageObjectGUI. More...

+ Inheritance diagram for ilPageObjectGUI:
+ Collaboration diagram for ilPageObjectGUI:

Public Member Functions

 ilPageObjectGUI ($a_parent_type, $a_id=0, $a_old_nr=0)
 Constructor public.
 initPageObject ($a_parent_type, $a_id, $a_old_nr)
 setBibId ($a_id)
 Set Bib Id.
 getBibId ()
 Get Bib Id.
 setPageObject ($a_pg_obj)
 Set Page Object.
 getPageObject ()
 Get Page Object.
 setOutputMode ($a_mode=IL_PAGE_PRESENTATION)
 Set Output Mode.
 getOutputMode ()
 setTemplateOutput ($a_output=true)
 outputToTemplate ()
 setPresentationTitle ($a_title="")
 getPresentationTitle ()
 setHeader ($a_title="")
 getHeader ()
 setLinkParams ($l_params="")
 getLinkParams ()
 setLinkFrame ($l_frame="")
 getLinkFrame ()
 setLinkXML ($link_xml)
 getLinkXML ()
 setQuestionXML ($question_xml)
 setQuestionHTML ($question_html)
 getQuestionXML ()
 getQuestionHTML ()
 setTemplateTargetVar ($a_variable)
 getTemplateTargetVar ()
 setTemplateOutputVar ($a_value)
 getTemplateOutputVar ()
 setOutputSubmode ($a_mode)
 getOutputSubmode ()
 setSourcecodeDownloadScript ($script_name)
 getSourcecodeDownloadScript ()
 enableCitation ($a_enabled)
 isEnabledCitation ()
 setLocator (&$a_locator)
 setTabs ($a_tabs)
 setPageBackTitle ($a_title)
 setFileDownloadLink ($a_download_link)
 getFileDownloadLink ()
 setFullscreenLink ($a_fullscreen_link)
 getFullscreenLink ()
 setIntLinkHelpDefault ($a_type, $a_id)
 setIntLinkReturn ($a_return)
 enableChangeComments ($a_enabled)
 isEnabledChangeComments ()
 setOfflineDirectory ($offdir)
 set offline directory to offdir
 getOfflineDirectory ()
 get offline directory
 setViewPageLink ($a_link, $a_target="")
 set link for "view page" button
 getViewPageLink ()
 get view page link
 getViewPageTarget ()
 get view page target frame
 setActivationListener (&$a_obj, $a_meth)
 setActivated ($a_act)
 getActivated ()
 setEnabledActivation ($a_act)
 getEnabledActivation ()
 setEnabledInternalLinks ($a_enabledinternallinks)
 Set Enable internal links.
 getEnabledInternalLinks ()
 Get Enable internal links.
 setEditPreview ($a_editpreview)
 Set Display first Edit tab, then Preview tab, instead of Page and Edit.
 getEditPreview ()
 Get Display first Edit tab, then Preview tab, instead of Page and Edit.
 setPreventHTMLUnmasking ($a_preventhtmlunmasking)
 Set Prevent HTML Unmasking (true/false).
 getPreventHTMLUnmasking ()
 Get Prevent HTML Unmasking (true/false).
 setEnabledTabs ($a_enabledtabs)
 Set Output tabs.
 getEnabledTabs ()
 Get Output tabs.
 setEnabledRepositoryObjects ($a_enabledrepositoryobjects)
 Set Enable Repository Objects Content Component.
 getEnabledRepositoryObjects ()
 Get Enable Repository Objects Content Component.
 setEnabledMaps ($a_enabledmaps)
 Set Enable Maps Content Component.
 getEnabledMaps ()
 Get Enable Maps Content Component.
 setEnabledPCTabs ($a_enabledpctabs)
 Set Enable Tabs Content Component.
 getEnabledPCTabs ()
 Get Enable Tabs Content Component.
 setEnabledFileLists ($a_enabledfilelists)
 Set Enable File Lists Content Componente (Default is true).
 getEnabledFileLists ()
 Get Enable File Lists Content Componente (Default is true).
 setEnabledPageFocus ($a_enabledpagefocus)
 Set Enable page focus.
 getEnabledPageFocus ()
 Get Enable page focus.
 setExplorerUpdater ($a_exp_frame, $a_exp_id, $a_exp_target_script)
 Set Explorer Updater.
 setPrependingHtml ($a_prependinghtml)
 Set Prepending HTML.
 getPrependingHtml ()
 Get Prepending HTML.
 setEnabledWikiLinks ($a_enablewikilinks)
 Set Enable Wiki Links.
 getEnabledWikiLinks ()
 Get Enable Wiki Links.
 setEnableEditing ($a_enableediting)
 Set Enable Editing.
 getEnableEditing ()
 Get Enable Editing.
 setRawPageContent ($a_rawpagecontent)
 Set Get raw page content only.
 getRawPageContent ()
 Get Get raw page content only.
 activateMetaDataEditor ($a_rep_obj_id, $a_sub_obj_id, $a_type, $a_observer_obj=NULL, $a_observer_func="")
 Activate meda data editor.
 getComponentPluginsXML ()
 Put information about activated plugins into XML.
executeCommand ()
 execute command
 deactivatePage ()
 activatePage ()
 showPage ()
 setDefaultLinkXml ()
 Set standard link xml.
 downloadFile ()
 Download file of file lists.
 displayMediaFullscreen ()
 Show media in fullscreen mode.
 download_paragraph ()
 download source code paragraph
 insertMaps ($a_html)
 Insert Maps.
 postOutputProcessing ($a_output)
 Finalizing output processing.
 insertHelp ($a_tpl)
 Insert help texts.
 preview ()
 edit ()
 presentation ($a_mode=IL_PAGE_PRESENTATION)
 getHTML ()
 showMediaFullscreen ($a_style_id=0)
 show fullscreen view of media object
 displayValidationError ($a_error)
 display validation error
 history ()
 Get history table as HTML.
 rollbackConfirmation ()
 Rollback confirmation.
 rollback ()
 Rollback to a previous version.
 getTabs ($a_activate="")
 adds tabs to tab gui object
 compareVersion ()
 Compares two revisions of the page.
 replaceDiffTags ($a_html)

Data Fields

 $ilias
 $tpl
 $lng
 $ctrl
 $obj
 $output_mode
 $output_submode
 $presentation_title
 $target_script
 $return_location
 $target_var
 $template_output_var
 $output2template
 $link_params
 $bib_id
 $citation
 $sourcecode_download_script
 $change_comments
 $question_html
 $activation = false
 $activated = true
 $enabledinternallinks = true
 $editpreview = false
 $use_meta_data = false
 $enabledtabs = true
 $enabledpctabs = false
 $link_xml_set = false
 $enableediting = true
 $rawpagecontent = false

Detailed Description

Class ilPageObjectGUI.

User Interface for Page Objects Editing

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
Id:
class.ilPageObjectGUI.php 19730 2009-04-18 21:23:56Z akill

ilPageObjectGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMDEditorGUI ilPageObjectGUI: ilPublicUserProfileGUI

Definition at line 52 of file class.ilPageObjectGUI.php.

Member Function Documentation

ilPageObjectGUI::activateMetaDataEditor (   $a_rep_obj_id,
  $a_sub_obj_id,
  $a_type,
  $a_observer_obj = NULL,
  $a_observer_func = "" 
)

Activate meda data editor.

Parameters
int$a_rep_obj_idobject id as used in repository
int$a_sub_obj_idsub object id
string$a_typeobject type
object$a_observer_objobserver object
object$a_observer_funcobserver function

Definition at line 734 of file class.ilPageObjectGUI.php.

{
$this->use_meta_data = true;
$this->meta_data_rep_obj_id = $a_rep_obj_id;
$this->meta_data_sub_obj_id = $a_sub_obj_id;
$this->meta_data_type = $a_type;
$this->meta_data_observer_obj = $a_observer_obj;
$this->meta_data_observer_func = $a_observer_func;
}
ilPageObjectGUI::activatePage ( )

Definition at line 857 of file class.ilPageObjectGUI.php.

{
$act_meth = $this->act_meth;
$this->act_obj->$act_meth(true);
$this->ctrl->redirectByClass("illmpageobjectgui", "edit");
}
ilPageObjectGUI::compareVersion ( )

Compares two revisions of the page.

Definition at line 2003 of file class.ilPageObjectGUI.php.

References $lng, $tpl, IL_PAGE_PREVIEW, ilPageObjectGUI(), and replaceDiffTags().

{
global $lng;
$tpl = new ilTemplate("tpl.page_compare.html", true, true, "Services/COPage");
$compare = $this->obj->compareVersion($_POST["left"], $_POST["right"]);
// left page
$lpage = $compare["l_page"];
$lpage_gui = new ilPageObjectGUI("wpg");
$lpage_gui->setOutputMode(IL_PAGE_PREVIEW);
$lpage_gui->setPageObject($lpage);
$lpage_gui->setPreventHTMLUnmasking(true);
$lhtml = $lpage_gui->showPage();
$lhtml = $this->replaceDiffTags($lhtml);
$lhtml = str_replace("&lt;br /&gt;", "<br />", $lhtml);
$tpl->setVariable("LEFT", $lhtml);
// right page
$rpage = $compare["r_page"];
$rpage_gui = new ilPageObjectGUI("wpg");
$rpage_gui->setOutputMode(IL_PAGE_PREVIEW);
$rpage_gui->setPageObject($rpage);
$rpage_gui->setPreventHTMLUnmasking(true);
$rhtml = $rpage_gui->showPage();
$rhtml = $this->replaceDiffTags($rhtml);
$rhtml = str_replace("&lt;br /&gt;", "<br />", $rhtml);
$tpl->setVariable("RIGHT", $rhtml);
$tpl->setVariable("TXT_NEW", $lng->txt("cont_pc_new"));
$tpl->setVariable("TXT_MODIFIED", $lng->txt("cont_pc_modified"));
$tpl->setVariable("TXT_DELETED", $lng->txt("cont_pc_deleted"));
//var_dump($left);
//var_dump($right);
return $tpl->get();
}

+ Here is the call graph for this function:

ilPageObjectGUI::deactivatePage ( )

Definition at line 850 of file class.ilPageObjectGUI.php.

{
$act_meth = $this->act_meth;
$this->act_obj->$act_meth(false);
$this->ctrl->redirectByClass("illmpageobjectgui", "edit");
}
ilPageObjectGUI::displayMediaFullscreen ( )

Show media in fullscreen mode.

Definition at line 1585 of file class.ilPageObjectGUI.php.

References $_GET, $tpl, ilMediaItem\_getMapAreasIntLinks(), exit, ilObjStyleSheet\getContentStylePath(), ilUtil\getImagePath(), getPageObject(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_OUTPUT, xslt_create(), xslt_free(), and xslt_process().

{
$tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Modules/LearningModule");
$tpl->setCurrentBlock("ilMedia");
//$int_links = $page_object->getInternalLinks();
$med_links = ilMediaItem::_getMapAreasIntLinks($_GET["mob_id"]);
// @todo
//$link_xml = $this->getLinkXML($med_links, $this->getLayoutLinkTargets());
require_once("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$media_obj = new ilObjMediaObject($_GET["mob_id"]);
require_once("./Services/COPage/classes/class.ilPageObject.php");
$pg_obj = $this->getPageObject();
$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.= $link_xml;
$xml.="</dummy>";
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
$args = array( '/_xml' => $xml, '/_xsl' => $xsl );
$xh = xslt_create();
//echo "<b>XML:</b>".htmlentities($xml);
// determine target frames for internal links
$wb_path = ilUtil::getWebspaceDir("output");
$enlarge_path = ilUtil::getImagePath("enlarge.gif");
$params = array ('mode' => "fullscreen", 'enlarge_path' => $enlarge_path,
'link_params' => "ref_id=".$_GET["ref_id"],'fullscreen_link' => "",
'ref_id' => $_GET["ref_id"], '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
$tpl->setVariable("LOCATION_CONTENT_STYLESHEET",
$tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$tpl->setVariable("MEDIA_CONTENT", $output);
echo $tpl->get();
}

+ Here is the call graph for this function:

ilPageObjectGUI::displayValidationError (   $a_error)

display validation error

Parameters
string$a_errorerror string

Definition at line 1841 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::download_paragraph ( )

download source code paragraph

Definition at line 1637 of file class.ilPageObjectGUI.php.

References $_GET, and getPageObject().

{
$pg_obj = $this->getPageObject();
$pg_obj->send_paragraph($_GET["par_id"], $_GET["downloadtitle"]);
}

+ Here is the call graph for this function:

ilPageObjectGUI::downloadFile ( )

Download file of file lists.

Definition at line 1573 of file class.ilPageObjectGUI.php.

References $_GET, $file, and exit.

{
$file = explode("_", $_GET["file_id"]);
require_once("./Modules/File/classes/class.ilObjFile.php");
$fileObj =& new ilObjFile($file[count($file) - 1], false);
$fileObj->sendFile();
}
ilPageObjectGUI::edit ( )

Definition at line 1747 of file class.ilPageObjectGUI.php.

References $ilCtrl, $lng, getEnableEditing(), IL_PAGE_EDIT, ilUtil\sendInfo(), setOutputMode(), and showPage().

{
global $tree, $lng, $ilCtrl;
if (!$this->getEnableEditing())
{
ilUtil::sendInfo($lng->txt("permission_denied"), true);
$ilCtrl->redirect($this, "preview");
}
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::enableChangeComments (   $a_enabled)

Definition at line 369 of file class.ilPageObjectGUI.php.

{
$this->change_comments = $a_enabled;
}
ilPageObjectGUI::enableCitation (   $a_enabled)

Definition at line 313 of file class.ilPageObjectGUI.php.

{
$this->citation = $a_enabled;
}
& ilPageObjectGUI::executeCommand ( )

execute command

Reimplemented in ilWikiPageGUI.

Definition at line 780 of file class.ilPageObjectGUI.php.

References $_GET, $cmd, $ilCtrl, $lng, $ret, getEnableEditing(), getHeader(), getPageObject(), getTabs(), and ilUtil\sendInfo().

{
global $ilCtrl, $ilTabs, $lng;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
//$this->ctrl->addTab("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
// , "view", "ilEditClipboardGUI");
$this->getTabs();
$ilCtrl->setReturn($this, "edit");
switch($next_class)
{
case 'ilmdeditorgui':
//$this->setTabs();
$ilTabs->setTabActive("meta_data");
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->meta_data_rep_obj_id,
$this->meta_data_sub_obj_id, $this->meta_data_type);
if (is_object($this->meta_data_observer_obj))
{
$md_gui->addObserver($this->meta_data_observer_obj,
$this->meta_data_observer_func, "General");
}
$this->ctrl->forwardCommand($md_gui);
break;
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 'ilpublicuserprofilegui':
require_once './Services/User/classes/class.ilPublicUserProfileGUI.php';
$profile_gui = new ilPublicUserProfileGUI($_GET["user"]);
$ret = $this->ctrl->forwardCommand($profile_gui);
break;
case "ilpageeditorgui":
if (!$this->getEnableEditing())
{
ilUtil::sendInfo($lng->txt("permission_denied"), true);
$ilCtrl->redirect($this, "preview");
}
$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;
default:
$cmd = $this->ctrl->getCmd("preview");
$ret = $this->$cmd();
break;
}
//echo "+$ret+";
return $ret;
}

+ Here is the call graph for this function:

ilPageObjectGUI::getActivated ( )

Definition at line 437 of file class.ilPageObjectGUI.php.

References $activated.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getBibId ( )

Get Bib Id.

Definition at line 151 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::getComponentPluginsXML ( )

Put information about activated plugins into XML.

Definition at line 748 of file class.ilPageObjectGUI.php.

References getOutputMode(), IL_COMP_SERVICE, and ilPageComponentPlugin\TXT_CMD_INSERT.

{
$xml = "";
if($this->getOutputMode() == "edit")
{
global $ilPluginAdmin;
$pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE,
"COPage", "pgcp");
foreach ($pl_names as $pl_name)
{
$plugin = $ilPluginAdmin->getPluginObject(IL_COMP_SERVICE,
"COPage", "pgcp", $pl_name);
if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
{
$xml = '<ComponentPlugin Name="'.$plugin->getPluginName().
'" InsertText="'.$plugin->getUIText(ilPageComponentPlugin::TXT_CMD_INSERT).'" />';
}
}
}
if ($xml != "")
{
$xml = "<ComponentPlugins>".$xml."</ComponentPlugins>";
}
return $xml;
}

+ Here is the call graph for this function:

ilPageObjectGUI::getEditPreview ( )

Get Display first Edit tab, then Preview tab, instead of Page and Edit.

Returns
boolean Edit/Preview mode

Definition at line 488 of file class.ilPageObjectGUI.php.

References $editpreview.

Referenced by getTabs().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledActivation ( )

Definition at line 447 of file class.ilPageObjectGUI.php.

References $activation.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledFileLists ( )

Get Enable File Lists Content Componente (Default is true).

Returns
boolean Enable File Lists Content Componente (Default is true)

Definition at line 608 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledfilelists;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledInternalLinks ( )

Get Enable internal links.

Returns
boolean Enable internal links

Definition at line 468 of file class.ilPageObjectGUI.php.

References $enabledinternallinks.

ilPageObjectGUI::getEnabledMaps ( )

Get Enable Maps Content Component.

Returns
boolean Enable Maps Content Component

Definition at line 568 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledmaps;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledPageFocus ( )

Get Enable page focus.

Returns
boolean Enable page focus

Definition at line 628 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledpagefocus;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledPCTabs ( )

Get Enable Tabs Content Component.

Returns
boolean Enable Tabs Content Component

Definition at line 588 of file class.ilPageObjectGUI.php.

References $enabledpctabs.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledRepositoryObjects ( )

Get Enable Repository Objects Content Component.

Returns
boolean Enable Repository Objects Content Component

Definition at line 548 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->enabledrepositoryobjects;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledTabs ( )

Get Output tabs.

Returns
boolean Output tabs

Definition at line 528 of file class.ilPageObjectGUI.php.

References $enabledtabs.

Referenced by getTabs().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getEnabledWikiLinks ( )

Get Enable Wiki Links.

Returns
boolean Enable Wiki Links

Definition at line 680 of file class.ilPageObjectGUI.php.

{
return $this->enablewikilinks;
}
ilPageObjectGUI::getEnableEditing ( )

Get Enable Editing.

Returns
boolean Enable Editing

Definition at line 700 of file class.ilPageObjectGUI.php.

References $enableediting.

Referenced by edit(), executeCommand(), and getTabs().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getFileDownloadLink ( )

Definition at line 343 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 353 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 216 of file class.ilPageObjectGUI.php.

Referenced by executeCommand().

{
return $this->header;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getHTML ( )

Definition at line 1772 of file class.ilPageObjectGUI.php.

References getTabs(), and showPage().

{
$this->getTabs("preview");
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::getLinkFrame ( )

Definition at line 236 of file class.ilPageObjectGUI.php.

{
return $this->link_frame;
}
ilPageObjectGUI::getLinkParams ( )

Definition at line 226 of file class.ilPageObjectGUI.php.

References $link_params.

{
}
ilPageObjectGUI::getLinkXML ( )

Definition at line 247 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->link_xml;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getOfflineDirectory ( )

get offline directory

Returns
directory where to store offline files

Definition at line 393 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->offline_directory;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getOutputMode ( )

Definition at line 186 of file class.ilPageObjectGUI.php.

References $output_mode.

Referenced by getComponentPluginsXML(), and showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getOutputSubmode ( )

Definition at line 299 of file class.ilPageObjectGUI.php.

References $output_submode.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getPrependingHtml ( )

Get Prepending HTML.

Returns
string Prepending HTML

Definition at line 660 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->prependinghtml;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getPresentationTitle ( )

Definition at line 206 of file class.ilPageObjectGUI.php.

References $presentation_title.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::getPreventHTMLUnmasking ( )

Get Prevent HTML Unmasking (true/false).

Returns
boolean Prevent HTML Unmasking (true/false)

Definition at line 508 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->preventhtmlunmasking;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getQuestionHTML ( )

Definition at line 267 of file class.ilPageObjectGUI.php.

References $question_html.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getQuestionXML ( )

Definition at line 262 of file class.ilPageObjectGUI.php.

{
return $this->question_xml;
}
ilPageObjectGUI::getRawPageContent ( )

Get Get raw page content only.

Returns
boolean Get raw page content only

Definition at line 720 of file class.ilPageObjectGUI.php.

References $rawpagecontent.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getSourcecodeDownloadScript ( )
ilPageObjectGUI::getTabs (   $a_activate = "")

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented in ilWikiPageGUI.

Definition at line 1933 of file class.ilPageObjectGUI.php.

References $ilCtrl, getEditPreview(), getEnabledTabs(), and getEnableEditing().

Referenced by executeCommand(), and getHTML().

{
global $ilTabs, $ilCtrl;
if (!$this->getEnabledTabs())
{
return;
}
//echo "-".$ilCtrl->getNextClass()."-".$ilCtrl->getCmd()."-";
// back to upper context
if (!$this->getEditPreview())
{
$ilTabs->addTarget("pg", $ilCtrl->getLinkTarget($this, "preview")
, array("", "preview"));
if ($this->getEnableEditing())
{
$ilTabs->addTarget("edit", $ilCtrl->getLinkTarget($this, "edit")
, array("", "edit"));
}
}
else
{
if ($this->getEnableEditing())
{
$ilTabs->addTarget("edit", $ilCtrl->getLinkTarget($this, "edit")
, array("", "edit"));
}
$ilTabs->addTarget("cont_preview", $ilCtrl->getLinkTarget($this, "preview")
, array("", "preview"));
}
//$tabs_gui->addTarget("properties", $this->ctrl->getLinkTarget($this, "properties")
// , "properties", get_class($this));
if ($this->use_meta_data)
{
$ilTabs->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui',''),
"", "ilmdeditorgui");
}
if ($this->getEnableEditing())
{
$ilTabs->addTarget("history", $this->ctrl->getLinkTarget($this, "history")
, "history", get_class($this));
}
/* $tabs = $this->ctrl->getTabs();
foreach ($tabs as $tab)
{
$tabs_gui->addTarget($tab["lang_var"], $tab["link"]
, $tab["cmd"], $tab["class"]);
}
*/
if ($this->getEnableEditing())
{
$ilTabs->addTarget("clipboard", $this->ctrl->getLinkTargetByClass("ilEditClipboardGUI", "view")
, "view", "ilEditClipboardGUI");
}
//$ilTabs->setTabActive("pg");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::getTemplateOutputVar ( )

Definition at line 288 of file class.ilPageObjectGUI.php.

References $template_output_var.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::getTemplateTargetVar ( )

Definition at line 277 of file class.ilPageObjectGUI.php.

References $target_var.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::getViewPageLink ( )

get view page link

Definition at line 413 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 421 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $this->view_page_target;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::history ( )

Get history table as HTML.

Definition at line 1861 of file class.ilPageObjectGUI.php.

References $lng, $tpl, and getPageObject().

{
global $tpl, $lng, $ilAccess;
$tpl->addJavaScript("./Services/COPage/js/page_history.js");
include_once("./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
$table_gui = new ilPageHistoryTableGUI($this, "history");
$table_gui->setId("hist_table");
$entries = $this->getPageObject()->getHistoryEntries();
$entries[] = array('page_id' => $this->getPageObject()->getId(),
'parent_type' => $this->getPageObject()->getParentType(),
'hdate' => $this->getPageObject()->getLastChange(),
'parent_id' => $this->getPageObject()->getParentId(),
'nr' => 0,
'sortkey' => 999999,
'user' => $this->getPageObject()->last_change_user);
$table_gui->setData($entries);
return $table_gui->getHTML();
}

+ Here is the call graph for this function:

ilPageObjectGUI::ilPageObjectGUI (   $a_parent_type,
  $a_id = 0,
  $a_old_nr = 0 
)

Constructor public.

Definition at line 88 of file class.ilPageObjectGUI.php.

References $_GET, $ilCtrl, $ilias, $lng, $tpl, IL_PAGE_PRESENTATION, initPageObject(), setEnabledFileLists(), setEnabledMaps(), setEnabledPageFocus(), setEnabledPCTabs(), setEnabledRepositoryObjects(), setEnabledWikiLinks(), setOutputMode(), setPreventHTMLUnmasking(), and setTemplateOutput().

Referenced by compareVersion(), and ilWikiPageGUI\executeCommand().

{
global $ilias, $tpl, $lng, $ilCtrl,$ilTabs;
$this->ctrl =& $ilCtrl;
if ($a_old_nr == 0 && $_GET["old_nr"] > 0)
{
$a_old_nr = $_GET["old_nr"];
}
$this->ilias =& $ilias;
$this->tpl =& $tpl;
$this->ctrl =& $ilCtrl;
$this->lng =& $lng;
// defaults (as in learning modules)
$this->setEnabledMaps(false);
$this->setEnabledPCTabs(false);
$this->setEnabledFileLists(true);
$this->setEnabledPageFocus(true);
if ($a_id > 0)
{
$this->initPageObject($a_parent_type, $a_id, $a_old_nr);
}
$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");
$lng->loadLanguageModule("content");
$this->setPreventHTMLUnmasking(false);
$this->setEnabledWikiLinks(false);
$this->setTemplateOutput(false);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::initPageObject (   $a_parent_type,
  $a_id,
  $a_old_nr 
)

Reimplemented in ilWikiPageGUI.

Definition at line 133 of file class.ilPageObjectGUI.php.

References setPageObject().

Referenced by ilPageObjectGUI().

{
$page = new ilPageObject($a_parent_type, $a_id, $a_old_nr);
$this->setPageObject($page);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::insertHelp (   $a_tpl)

Insert help texts.

Definition at line 1702 of file class.ilPageObjectGUI.php.

References $lng, and ilUtil\getImagePath().

Referenced by showPage().

{
global $lng;
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("streaked_area.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_add_elements"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("icon_cont_el_s.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("drop_streaked_area.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_drag_and_drop_elements"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_img");
$a_tpl->setVariable("IMG_HELP", ilUtil::getImagePath("icon_cont_el_s.gif"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help_item");
$a_tpl->setVariable("TXT_HELP", $lng->txt("cont_double_click_to_delete"));
$a_tpl->parseCurrentBlock();
$a_tpl->setCurrentBlock("help");
$a_tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::insertMaps (   $a_html)

Insert Maps.

Definition at line 1646 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
$c_pos = 0;
$start = strpos($a_html, "[[[[[Map;");
if (is_int($start))
{
$end = strpos($a_html, "]]]]]", $start);
}
$i = 1;
while ($end > 0)
{
$param = substr($a_html, $start + 9, $end - $start - 9);
$param = explode(";", $param);
if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
{
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
$map_gui = new ilGoogleMapGUI();
$map_gui->setMapId("map_".$i);
$map_gui->setLatitude($param[0]);
$map_gui->setLongitude($param[1]);
$map_gui->setZoom($param[2]);
$map_gui->setWidth($param[3]."px");
$map_gui->setHeight($param[4]."px");
$map_gui->setEnableTypeControl(true);
$map_gui->setEnableNavigationControl(true);
$map_gui->setEnableCentralMarker(true);
$h2 = substr($a_html, 0, $start).
$map_gui->getHtml().
substr($a_html, $end + 5);
$a_html = $h2;
$i++;
}
$start = strpos($a_html, "[[[[[Map;", $start + 5);
$end = 0;
if (is_int($start))
{
$end = strpos($a_html, "]]]]]", $start);
}
}
return $a_html;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledChangeComments ( )

Definition at line 374 of file class.ilPageObjectGUI.php.

References $change_comments.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::isEnabledCitation ( )

Definition at line 318 of file class.ilPageObjectGUI.php.

References $citation.

Referenced by showPage().

{
}

+ Here is the caller graph for this function:

ilPageObjectGUI::outputToTemplate ( )

Definition at line 196 of file class.ilPageObjectGUI.php.

References $output2template.

Referenced by showPage().

+ Here is the caller graph for this function:

ilPageObjectGUI::postOutputProcessing (   $a_output)

Finalizing output processing.

Maybe overwritten in derived classes, e.g. in wiki module.

Reimplemented in ilWikiPageGUI.

Definition at line 1694 of file class.ilPageObjectGUI.php.

Referenced by showPage().

{
return $a_output;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::presentation (   $a_mode = IL_PAGE_PRESENTATION)

Definition at line 1764 of file class.ilPageObjectGUI.php.

References setOutputMode(), and showPage().

{
global $tree;
$this->setOutputMode($a_mode);
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::preview ( )

Reimplemented in ilWikiPageGUI.

Definition at line 1737 of file class.ilPageObjectGUI.php.

References IL_PAGE_PREVIEW, setOutputMode(), and showPage().

{
global $tree;
return $this->showPage();
}

+ Here is the call graph for this function:

ilPageObjectGUI::replaceDiffTags (   $a_html)

Definition at line 2042 of file class.ilPageObjectGUI.php.

Referenced by compareVersion().

{
$a_html = str_replace("[ilDiffInsStart]", '<span class="ilDiffIns">', $a_html);
$a_html = str_replace("[ilDiffDelStart]", '<span class="ilDiffDel">', $a_html);
$a_html = str_replace("[ilDiffInsEnd]", '</span>', $a_html);
$a_html = str_replace("[ilDiffDelEnd]", '</span>', $a_html);
return $a_html;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::rollback ( )

Rollback to a previous version.

Definition at line 1910 of file class.ilPageObjectGUI.php.

References $_GET, and $ilCtrl.

{
global $ilCtrl;
$hentry = $this->obj->getHistoryEntry($_GET["rollback_nr"]);
if ($hentry["content"] != "")
{
$this->obj->setXMLContent($hentry["content"]);
$this->obj->buildDom(true);
if ($this->obj->update())
{
$ilCtrl->redirect($this, "history");
}
}
$ilCtrl->redirect($this, "history");
}
ilPageObjectGUI::rollbackConfirmation ( )

Rollback confirmation.

Definition at line 1885 of file class.ilPageObjectGUI.php.

References $_GET, $ilCtrl, $lng, $tpl, ilDatePresentation\formatDate(), and IL_CAL_DATETIME.

{
global $tpl, $lng, $ilAccess, $ilCtrl;
include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
$c_gui = new ilConfirmationGUI();
// set confirm/cancel commands
$ilCtrl->setParameter($this, "rollback_nr", $_GET["old_nr"]);
$c_gui->setFormAction($ilCtrl->getFormAction($this, "rollback"));
$c_gui->setHeaderText($lng->txt("cont_rollback_confirmation"));
$c_gui->setCancel($lng->txt("cancel"), "history");
$c_gui->setConfirm($lng->txt("confirm"), "rollback");
$hentry = $this->obj->getHistoryEntry($_GET["old_nr"]);
$c_gui->addItem("id[]", $_GET["old_nr"],
$tpl->setContent($c_gui->getHTML());
}

+ Here is the call graph for this function:

ilPageObjectGUI::setActivated (   $a_act)

Definition at line 432 of file class.ilPageObjectGUI.php.

{
$this->activated = $a_act;
}
ilPageObjectGUI::setActivationListener ( $a_obj,
  $a_meth 
)

Definition at line 426 of file class.ilPageObjectGUI.php.

{
$this->act_obj =& $a_obj;
$this->act_meth = $a_meth;
}
ilPageObjectGUI::setBibId (   $a_id)

Set Bib Id.

Definition at line 142 of file class.ilPageObjectGUI.php.

{
// USED FOR SELECTION WHICH PAGE TURNS AND LATER PAGES SHOULD BE SHOWN
$this->bib_id = $a_id;
}
ilPageObjectGUI::setDefaultLinkXml ( )

Set standard link xml.

Definition at line 1513 of file class.ilPageObjectGUI.php.

References $target_arr, $target_id, ilLMObject\_lookupContObjID(), ilObject\_lookupObjId(), ilObject\_lookupType(), getPageObject(), and setLinkXML().

Referenced by showPage().

{
$int_links = $this->getPageObject()->getInternalLinks();
$link_info = "<IntLinkInfos>";
$targetframe = "None";
foreach ($int_links as $int_link)
{
$target = $int_link["Target"];
if (substr($target, 0, 4) == "il__")
{
$target_arr = explode("_", $target);
$type = $int_link["Type"];
switch($type)
{
case "PageObject":
case "StructureObject":
$ltarget="_top";
if ($type == "PageObject")
{
$href = "./goto.php?target=pg_".$target_id;
}
else
{
$href = "./goto.php?target=st_".$target_id;
}
break;
case "GlossaryItem":
$ltarget="_blank";
$href = "./goto.php?target=git_".$target_id;
break;
case "MediaObject":
$ltarget="_blank";
$href = "";
break;
case "RepositoryItem":
$ltarget="_top";
$obj_type = ilObject::_lookupType($target_id, true);
$href = "./goto.php?target=".$obj_type."_".$target_id;
break;
}
$link_info.="<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
"TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
}
}
$link_info.= "</IntLinkInfos>";
$this->setLinkXML($link_info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilPageObjectGUI::setEditPreview (   $a_editpreview)

Set Display first Edit tab, then Preview tab, instead of Page and Edit.

Parameters
boolean$a_editpreviewEdit/preview mode

Definition at line 478 of file class.ilPageObjectGUI.php.

Referenced by ilTermDefinitionEditorGUI\executeCommand(), and ilLMPageObjectGUI\executeCommand().

{
$this->editpreview = $a_editpreview;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledActivation (   $a_act)

Definition at line 442 of file class.ilPageObjectGUI.php.

{
$this->activation = $a_act;
}
ilPageObjectGUI::setEnabledFileLists (   $a_enabledfilelists)

Set Enable File Lists Content Componente (Default is true).

Parameters
boolean$a_enabledfilelistsEnable File Lists Content Componente (Default is true)

Definition at line 598 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledfilelists = $a_enabledfilelists;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledInternalLinks (   $a_enabledinternallinks)

Set Enable internal links.

Parameters
boolean$a_enabledinternallinksEnable internal links

Definition at line 458 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct().

{
$this->enabledinternallinks = $a_enabledinternallinks;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledMaps (   $a_enabledmaps)

Set Enable Maps Content Component.

Parameters
boolean$a_enabledmapsEnable Maps Content Component

Definition at line 558 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), and ilPageObjectGUI().

{
$this->enabledmaps = $a_enabledmaps;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledPageFocus (   $a_enabledpagefocus)

Set Enable page focus.

Parameters
boolean$a_enabledpagefocusEnable page focus

Definition at line 618 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledpagefocus = $a_enabledpagefocus;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledPCTabs (   $a_enabledpctabs)

Set Enable Tabs Content Component.

Parameters
boolean$a_enabledpctabsEnable Tabs Content Component

Definition at line 578 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledpctabs = $a_enabledpctabs;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledRepositoryObjects (   $a_enabledrepositoryobjects)

Set Enable Repository Objects Content Component.

Parameters
boolean$a_enabledrepositoryobjectsEnable Repository Objects Content Component

Definition at line 538 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI().

{
$this->enabledrepositoryobjects = $a_enabledrepositoryobjects;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnabledTabs (   $a_enabledtabs)

Set Output tabs.

Parameters
boolean$a_enabledtabsOutput tabs

Definition at line 518 of file class.ilPageObjectGUI.php.

{
$this->enabledtabs = $a_enabledtabs;
}
ilPageObjectGUI::setEnabledWikiLinks (   $a_enablewikilinks)

Set Enable Wiki Links.

Parameters
boolean$a_enablewikilinksEnable Wiki Links

Definition at line 670 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), and ilPageObjectGUI().

{
$this->enablewikilinks = $a_enablewikilinks;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setEnableEditing (   $a_enableediting)

Set Enable Editing.

Parameters
boolean$a_enableeditingEnable Editing

Definition at line 690 of file class.ilPageObjectGUI.php.

{
$this->enableediting = $a_enableediting;
}
ilPageObjectGUI::setExplorerUpdater (   $a_exp_frame,
  $a_exp_id,
  $a_exp_target_script 
)

Set Explorer Updater.

Parameters
object$a_treeTree Object

Definition at line 638 of file class.ilPageObjectGUI.php.

{
$this->exp_frame = $a_exp_frame;
$this->exp_id = $a_exp_id;
$this->exp_target_script = $a_exp_target_script;
}
ilPageObjectGUI::setFileDownloadLink (   $a_download_link)

Definition at line 338 of file class.ilPageObjectGUI.php.

{
$this->file_download_link = $a_download_link;
}
ilPageObjectGUI::setFullscreenLink (   $a_fullscreen_link)

Definition at line 348 of file class.ilPageObjectGUI.php.

{
$this->fullscreen_link = $a_fullscreen_link;
}
ilPageObjectGUI::setHeader (   $a_title = "")

Definition at line 211 of file class.ilPageObjectGUI.php.

{
$this->header = $a_title;
}
ilPageObjectGUI::setIntLinkHelpDefault (   $a_type,
  $a_id 
)

Definition at line 358 of file class.ilPageObjectGUI.php.

Referenced by ilPaymentObjectGUI\forwardToPageObject(), ilContainerGUI\forwardToPageObject(), ilObjPaymentSettingsGUI\forwardToPageObject(), and ilContainerGUI\getContainerPageHTML().

{
$this->int_link_def_type = $a_type;
$this->int_link_def_id = $a_id;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setIntLinkReturn (   $a_return)

Definition at line 364 of file class.ilPageObjectGUI.php.

{
$this->int_link_return = $a_return;
}
ilPageObjectGUI::setLinkFrame (   $l_frame = "")

Definition at line 231 of file class.ilPageObjectGUI.php.

Referenced by ilLMPresentationGUI\showPrintView().

{
$this->link_frame = $l_frame;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setLinkParams (   $l_params = "")

Definition at line 221 of file class.ilPageObjectGUI.php.

{
$this->link_params = $l_params;
}
ilPageObjectGUI::setLinkXML (   $link_xml)

Definition at line 241 of file class.ilPageObjectGUI.php.

Referenced by setDefaultLinkXml().

{
$this->link_xml = $link_xml;
$this->link_xml_set = true;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setLocator ( $a_locator)

Definition at line 323 of file class.ilPageObjectGUI.php.

{
$this->locator =& $a_locator;
}
ilPageObjectGUI::setOfflineDirectory (   $offdir)

set offline directory to offdir

Parameters
offdircontains diretory where to store files

Definition at line 384 of file class.ilPageObjectGUI.php.

{
$this->offline_directory = $offdir;
}
ilPageObjectGUI::setOutputMode (   $a_mode = IL_PAGE_PRESENTATION)

Set Output Mode.

Parameters
stringMode IL_PAGE_PRESENTATION | IL_PAGE_EDIT | IL_PAGE_PREVIEW

Definition at line 181 of file class.ilPageObjectGUI.php.

Referenced by edit(), ilPageObjectGUI(), presentation(), and preview().

{
$this->output_mode = $a_mode;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setOutputSubmode (   $a_mode)

Definition at line 293 of file class.ilPageObjectGUI.php.

{
// USED FOR TRANSLATION PRESENTATION OF dbk OBJECTS
$this->output_submode = $a_mode;
}
ilPageObjectGUI::setPageBackTitle (   $a_title)

Definition at line 333 of file class.ilPageObjectGUI.php.

{
$this->page_back_title = $a_title;
}
ilPageObjectGUI::setPageObject (   $a_pg_obj)

Set Page Object.

Parameters
objectPage Object

Definition at line 161 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\initPageObject(), initPageObject(), and ilWikiPageGUI\setWikiPage().

{
$this->obj = $a_pg_obj;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setPrependingHtml (   $a_prependinghtml)

Set Prepending HTML.

Parameters
string$a_prependinghtmlPrepending HTML

Definition at line 650 of file class.ilPageObjectGUI.php.

{
$this->prependinghtml = $a_prependinghtml;
}
ilPageObjectGUI::setPresentationTitle (   $a_title = "")

Definition at line 201 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\showPage().

{
$this->presentation_title = $a_title;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setPreventHTMLUnmasking (   $a_preventhtmlunmasking)

Set Prevent HTML Unmasking (true/false).

Parameters
boolean$a_preventhtmlunmaskingPrevent HTML Unmasking (true/false)

Definition at line 498 of file class.ilPageObjectGUI.php.

Referenced by ilWikiPageGUI\__construct(), and ilPageObjectGUI().

{
$this->preventhtmlunmasking = $a_preventhtmlunmasking;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setQuestionHTML (   $question_html)

Definition at line 257 of file class.ilPageObjectGUI.php.

References $question_html.

{
$this->question_html = $question_html;
}
ilPageObjectGUI::setQuestionXML (   $question_xml)

Definition at line 252 of file class.ilPageObjectGUI.php.

{
$this->question_xml = $question_xml;
}
ilPageObjectGUI::setRawPageContent (   $a_rawpagecontent)

Set Get raw page content only.

Parameters
boolean$a_rawpagecontentGet raw page content only

Definition at line 710 of file class.ilPageObjectGUI.php.

{
$this->rawpagecontent = $a_rawpagecontent;
}
ilPageObjectGUI::setSourcecodeDownloadScript (   $script_name)

Definition at line 305 of file class.ilPageObjectGUI.php.

References $script_name.

{
$this->sourcecode_download_script = $script_name;
}
ilPageObjectGUI::setTabs (   $a_tabs)

Definition at line 328 of file class.ilPageObjectGUI.php.

{
$this->tabs_gui = $a_tabs;
}
ilPageObjectGUI::setTemplateOutput (   $a_output = true)

Definition at line 191 of file class.ilPageObjectGUI.php.

Referenced by ilGlossaryTermGUI\confirmDefinitionDeletion(), ilObjGlossaryGUI\confirmDefinitionDeletion(), ilLMPresentationGUI\ilPage(), ilPageObjectGUI(), and ilWikiPageGUI\showPage().

{
$this->output2template = $a_output;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setTemplateOutputVar (   $a_value)

Definition at line 282 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 272 of file class.ilPageObjectGUI.php.

Referenced by assQuestionGUI\getILIASPage(), and assQuestionGUI\outQuestionPage().

{
$this->target_var = $a_variable;
}

+ Here is the caller graph for this function:

ilPageObjectGUI::setViewPageLink (   $a_link,
  $a_target = "" 
)

set link for "view page" button

Parameters
stringlink target
stringtarget frame

Definition at line 404 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 1781 of file class.ilPageObjectGUI.php.

References $_GET, ilObject\_lookupTitle(), ilPageObject\buildDom(), ilUtil\getStyleSheetLocation(), ilUtil\getWebspaceDir(), IL_MODE_ALIAS, IL_MODE_OUTPUT, xslt_create(), xslt_error(), xslt_free(), and xslt_process().

{
$this->tpl = new ilTemplate("tpl.fullscreen.html", true, true, "Services/COPage");
$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("./Services/MediaObjects/classes/class.ilObjMediaObject.php");
$media_obj =& new ilObjMediaObject($_GET["mob_id"]);
if (!empty ($_GET["pg_id"]))
{
require_once("./Services/COPage/classes/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("./Services/COPage/xsl/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 ( )

Reimplemented in ilWikiPageGUI.

Definition at line 867 of file class.ilPageObjectGUI.php.

References $_GET, $_SESSION, $GLOBALS, $ilBench, $ilCtrl, $ilias, $ilSetting, $link_params, $lng, $sourcecode_download_script, $tpl, ilPageEditorGUI\_doJSEditing(), ilObject\_exists(), ilInternalLink\_getTargetsOfSource(), ilPageEditorGUI\_isBrowserJSEditCapable(), ilObjUser\_lookupLogin(), ilObjUser\_lookupName(), ilObject\_lookupTitle(), ilObject\_lookupType(), ilUtil\buildLatexImages(), displayValidationError(), exit, ilDatePresentation\formatDate(), ilUtil\formSelect(), getActivated(), getBibId(), getEnabledActivation(), getEnabledFileLists(), getEnabledMaps(), getEnabledPageFocus(), getEnabledPCTabs(), getEnabledRepositoryObjects(), getFileDownloadLink(), getFullscreenLink(), ilUtil\getImagePath(), getLinkXML(), getOfflineDirectory(), getOutputMode(), getOutputSubmode(), getPageObject(), getPrependingHtml(), getPresentationTitle(), getPreventHTMLUnmasking(), getQuestionHTML(), getRawPageContent(), getTemplateOutputVar(), getTemplateTargetVar(), getViewPageLink(), getViewPageTarget(), ilUtil\getWebspaceDir(), ilObjContentObject\hasSuccessorPage(), IL_CAL_DATETIME, IL_PAGE_OFFLINE, IL_PAGE_PRESENTATION, IL_PAGE_PREVIEW, IL_PAGE_PRINT, ILIAS_VERSION, ilYuiUtil\initConnection(), ilYuiUtil\initDragDrop(), ilYuiUtil\initTabView(), insertHelp(), ilUtil\insertLatexImages(), insertMaps(), isEnabledChangeComments(), isEnabledCitation(), outputToTemplate(), postOutputProcessing(), ilUtil\sendInfo(), setDefaultLinkXml(), xslt_create(), xslt_free(), and xslt_process().

Referenced by edit(), getHTML(), presentation(), and preview().

{
global $tree, $ilUser, $ilias, $lng, $ilCtrl, $ilBench, $ilSetting;
$ilBench->start("ContentPresentation", "ilPageObjectGUI_showPage");
// init template
//if($this->outputToTemplate())
//{
if($this->getOutputMode() == "edit")
{
//echo ":".$this->getTemplateTargetVar().":";
$tpl = new ilTemplate("tpl.page_edit_wysiwyg.html", true, true, "Services/COPage");
//$this->tpl->addBlockFile($this->getTemplateTargetVar(), "adm_content", "tpl.page_edit_wysiwyg.html", "Services/COPage");
// to do: status dependent class
$tpl->setVariable("CLASS_PAGE_TD", "ilc_Page");
// user comment
{
$tpl->setCurrentBlock("change_comment");
$tpl->setVariable("TXT_ADD_COMMENT", $this->lng->txt("cont_add_change_comment"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("adm_content");
}
// explorer updater
if ($this->exp_frame != "")
{
$tpl->setCurrentBlock("updater");
$tpl->setVariable("UPDATER_FRAME", $this->exp_frame);
$tpl->setVariable("EXP_ID_UPDATER", $this->exp_id);
$tpl->setVariable("HREF_UPDATER", $this->exp_target_script);
$tpl->parseCurrentBlock();
}
/* $tpl->setVariable("TXT_INSERT_BEFORE", $this->lng->txt("cont_set_before"));
$tpl->setVariable("TXT_INSERT_AFTER", $this->lng->txt("cont_set_after"));
$tpl->setVariable("TXT_INSERT_CANCEL", $this->lng->txt("cont_set_cancel"));
$tpl->setVariable("TXT_CONFIRM_DELETE", $this->lng->txt("cont_confirm_delete"));
*/
$tpl->setVariable("WYSIWYG_ACTION",
$ilCtrl->getFormActionByClass("ilpageeditorgui", "", "", true));
{
$tpl->setVariable("TXT_JAVA_SCRIPT_CAPABLE", "<br />".$this->lng->txt("cont_browser_not_js_capable"));
}
$tpl->setVariable("TXT_CHANGE_EDIT_MODE", $this->lng->txt("cont_set_edit_mode"));
if ($this->getEnabledActivation())
{
$tpl->setCurrentBlock("de_activate_page");
if ($this->getActivated())
{
$tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_deactivate_page"));
$tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "deactivatePage");
}
else
{
$tpl->setVariable("TXT_DE_ACTIVATE_PAGE", $this->lng->txt("cont_activate_page"));
$tpl->setVariable("CMD_DE_ACTIVATE_PAGE", "activatePage");
}
$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"));
$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";
if (!$this->getPreventHTMLUnmasking())
{
$tpl->setVariable("SEL_HTML_MODE",
ilUtil::formSelect($sel_html_mode, "html_mode", $html_mode, false, true,
0, "ilEditSelect"));
}
$tpl->setVariable("PREPENDING_HTML", $this->getPrependingHtml());
$tpl->setVariable("TXT_CONFIRM_DELETE", $lng->txt("cont_confirm_delete"));
if ($this->getViewPageLink() != "")
{
$tpl->setCurrentBlock("view_link");
$tpl->setVariable("LINK_VIEW_PAGE",
$this->getViewPageLink());
$tpl->setVariable("TARGET_VIEW_PAGE",
$this->getViewPageTarget());
$tpl->setVariable("TXT_VIEW_PAGE", $this->lng->txt("view"));
$tpl->parseCurrentBlock();
}
// javascript activation
$sel_js_mode = "disable";
if($ilSetting->get("enable_js_edit", 1))
{
$sel_js_mode = (ilPageEditorGUI::_doJSEditing())
? "enable"
: "disable";
}
// get js files for JS enabled editing
if ($sel_js_mode == "enable")
{
$this->insertHelp($tpl);
include_once("./Services/YUI/classes/class.ilYuiUtil.php");
$GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilcopagecallback.js");
//$GLOBALS["tpl"]->addJavaScript("./Services/RTE/tiny_mce/tiny_mce.js");
$GLOBALS["tpl"]->addJavaScript("./Services/COPage/js/ilpageedit.js");
//$GLOBALS["tpl"]->addJavascript("Services/COPage/js/wz_dragdrop.js");
$GLOBALS["tpl"]->addJavascript("Services/COPage/js/page_editing.js");
$tpl->touchBlock("init_dragging");
}
if($ilias->getSetting("enable_js_edit"))
{
$tpl->setVariable("SEL_JAVA_SCRIPT",
ilUtil::formSelect($sel_js_mode, "js_mode", $js_mode, false, true,
0, "ilEditSelect"));
}
// multiple actions
$tpl->setCurrentBlock("multi_actions");
if ($sel_js_mode == "enable")
{
$tpl->setVariable("ONCLICK_DE_ACTIVATE_SELECTED", 'onclick="return ilEditMultiAction(\'activateSelected\');"');
$tpl->setVariable("ONCLICK_DELETE_SELECTED", 'onclick="return ilEditMultiAction(\'deleteSelected\');"');
}
$tpl->setVariable("TXT_DE_ACTIVATE_SELECTED", $this->lng->txt("cont_ed_enable"));
$tpl->setVariable("TXT_DELETE_SELECTED", $this->lng->txt("cont_delete_selected"));
$tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
}
else
{
if($this->getOutputSubmode() == 'translation')
{
$tpl = new ilTemplate("tpl.page_translation_content.html", true, true, "Services/COPage");
}
else
{
// presentation
if ($this->getOutputMode() != IL_PAGE_PREVIEW)
{
$tpl = new ilTemplate("tpl.page_content.html", true, true, "Services/COPage");
if ($this->getEnabledPageFocus())
{
$tpl->touchBlock("page_focus");
}
}
else // preview
{
$tpl = new ilTemplate("tpl.page_preview.html", true, true, "Services/COPage");
//
if ($_GET["old_nr"] > 0)
{
$hist_info =
$this->getPageObject()->getHistoryInfo($_GET["old_nr"]);
// previous revision
if (is_array($hist_info["previous"]))
{
$tpl->setCurrentBlock("previous_rev");
$tpl->setVariable("TXT_PREV_REV", $lng->txt("cont_previous_rev"));
$ilCtrl->setParameter($this, "old_nr", $hist_info["previous"]["nr"]);
$tpl->setVariable("HREF_PREV",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
}
else
{
$tpl->setCurrentBlock("previous_rev_disabled");
$tpl->setVariable("TXT_PREV_REV", $lng->txt("cont_previous_rev"));
$tpl->parseCurrentBlock();
}
// next revision
$tpl->setCurrentBlock("next_rev");
$tpl->setVariable("TXT_NEXT_REV", $lng->txt("cont_next_rev"));
$ilCtrl->setParameter($this, "old_nr", $hist_info["next"]["nr"]);
$tpl->setVariable("HREF_NEXT",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
// latest revision
$tpl->setCurrentBlock("latest_rev");
$tpl->setVariable("TXT_LATEST_REV", $lng->txt("cont_latest_rev"));
$ilCtrl->setParameter($this, "old_nr", "");
$tpl->setVariable("HREF_LATEST",
$ilCtrl->getLinkTarget($this, "preview"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("hist_nav");
$tpl->setVariable("TXT_REVISION", $lng->txt("cont_revision"));
$tpl->setVariable("VAL_REVISION_DATE",
ilDatePresentation::formatDate(new ilDateTime($hist_info["current"]["hdate"], IL_CAL_DATETIME)));
$login = ilObjUser::_lookupLogin($hist_info["current"]["user"]);
$name = ilObjUser::_lookupName($hist_info["current"]["user"]);
$tpl->setVariable("VAL_REV_USER",
$name["lastname"].", ".$name["firstname"]." [".$login."]");
$tpl->parseCurrentBlock();
}
}
}
}
{
$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"]) && ilObject::_lookupType($link["id"]) == "mob")
{
$mob_links[$link["id"]] = ilObject::_lookupTitle($link["id"])." [".$link["id"]."]";
}
}
}
if (count($mob_links) > 0)
{
$tpl->setCurrentBlock("med_link");
$tpl->setVariable("TXT_LINKED_MOBS", $this->lng->txt("cont_linked_mobs"));
$tpl->setVariable("SEL_MED_LINKS",
ilUtil::formSelect(0, "mob_id", $mob_links, false, true));
$tpl->setVariable("TXT_EDIT_MEDIA", $this->lng->txt("cont_edit_mob"));
$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"));
$tpl->parseCurrentBlock();
}
}
if ($_GET["reloadTree"] == "y")
{
$tpl->setCurrentBlock("reload_tree");
if ($this->obj->getParentType() == "dbk")
{
$tpl->setVariable("LINK_TREE",
$this->ctrl->getLinkTargetByClass("ilobjdlbookgui", "explorer"));
}
else
{
$tpl->setVariable("LINK_TREE",
$this->ctrl->getLinkTargetByClass("ilobjlearningmodulegui", "explorer"));
}
$tpl->parseCurrentBlock();
}
// }
// get content
$builded = $this->obj->buildDom();
// manage hierarchical ids
if($this->getOutputMode() == "edit")
{
// add pc ids, if necessary
if (!$this->obj->checkPCIds())
{
$this->obj->insertPCIds();
$this->obj->update(true, true);
}
$this->obj->addFileSizes();
$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)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_".$hid);
$tpl->parseCurrentBlock();
}
// column menues for tables
foreach($col1_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_r".$hid);
$tpl->parseCurrentBlock();
}
// row menues for tables
foreach($row1_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_c".$hid);
$tpl->parseCurrentBlock();
}
// list item menues
foreach($litem_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid);
$tpl->parseCurrentBlock();
}
// file item menues
foreach($fitem_ids as $hid)
{
$tpl->setCurrentBlock("add_dhtml");
$tpl->setVariable("CONTEXTMENU", "contextmenu_i".$hid);
$tpl->parseCurrentBlock();
}
}
else
{
$this->obj->addFileSizes();
}
//echo "<br>-".htmlentities($this->obj->getXMLContent())."-<br><br>";
//echo "<br>-".htmlentities($this->getLinkXML())."-";
// set default link xml, if nothing was set yet
if (!$this->link_xml_set)
{
}
//$content = $this->obj->getXMLFromDom(false, true, true,
// $this->getLinkXML().$this->getQuestionXML().$this->getComponentPluginsXML());
$link_xml = $this->getLinkXML();
$content = $this->obj->getXMLFromDom(false, true, true,
$link_xml.$this->getQuestionXML());
// get page component plugins
// 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"]))
{
ilUtil::sendInfo($this->lng->txt("cont_citation_selection_not_valid"));
session_unregister("citation_error");
unset($_SESSION["citation_error"]);
}
// get title
$pg_title = $this->getPresentationTitle();
$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 ();
{
$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.":";
if ($this->getEnabledPCTabs())
{
include_once("./Services/YUI/classes/class.ilYuiUtil.php");
}
// default values for various parameters (should be used by
// all instances in the future)
$file_download_link = $this->getFileDownloadLink();
if ($this->getFileDownloadLink() == "" && $this->getOutputMode() != "offline")
{
$file_download_link = $ilCtrl->getLinkTarget($this, "downloadFile");
}
$fullscreen_link = $this->getFullscreenLink();
if ($this->getFullscreenLink() == "" && $this->getOutputMode() != "offline")
{
$fullscreen_link = $ilCtrl->getLinkTarget($this, "displayMediaFullscreen");
}
if ($this->sourcecode_download_script == "" && $this->getOutputMode() != "offline")
{
$this->sourcecode_download_script = $ilCtrl->getLinkTarget($this, "");
}
$media_mode = ($this->getOutputMode() == "edit")
? $ilUser->getPref("ilPageEditor_MediaMode")
: "enable";
// 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' => $file_download_link,
'fullscreen_link' => $fullscreen_link,
'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'),
'enable_rep_objects' => $this->getEnabledRepositoryObjects() ? "y" : "n",
'enable_map' => $this->getEnabledMaps() ? "y" : "n",
'enable_tabs' => $this->getEnabledPCTabs() ? "n" : "n",
'enable_file_list' => $this->getEnabledFileLists() ? "y" : "n",
'media_mode' => $media_mode,
'javascript' => $sel_js_mode,
'paragraph_plugins' => $paragraph_plugin_string);
if($this->link_frame != "") // todo other link types
$params["pg_frame"] = $this->link_frame;
//$content = str_replace("&nbsp;", "", $content);
// this ensures that cache is emptied with every update
$params["version"] = ILIAS_VERSION;
// ensure no cache hit, if included files/media objects have been changed
$params["incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
// run xslt
$md5 = md5(serialize($params).$link_xml);
//$a = microtime();
// check cache (same parameters, non-edit mode and rendered time
// > last change
if (($this->getOutputMode() == "preview" || $this->getOutputMode() == "presentation") &&
$md5 == $this->obj->getRenderMd5() &&
($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
$this->obj->getRenderedTime() != "0000-00-00 00:00:00" &&
$this->obj->old_nr == 0)
{
// cache hit
$output = $this->obj->getRenderedContent();
}
else
{
$xsl = file_get_contents("./Services/COPage/xsl/page.xsl");
$args = array( '/_xml' => $content, '/_xsl' => $xsl );
$xh = xslt_create();
// echo "<b>XSLT</b>:".htmlentities($xsl).":<br>";
// echo "mode:".$this->getOutputMode().":<br>";
$output = xslt_process($xh, "arg:/_xml","arg:/_xsl", NULL, $args, $params);
if (($this->getOutputMode() == "presentation" || $this->getOutputMode() == "preview")
&& $this->obj->old_nr == 0)
{
//echo "writerenderedcontent";
$this->obj->writeRenderedContent($output, $md5);
}
//echo xslt_error($xh);
xslt_free($xh);
}
//$b = microtime();
//echo "$a - $b";
//echo "<pre>".htmlentities($output)."</pre>";
// unmask user html
if (($this->getOutputMode() != "edit" ||
$ilUser->getPref("ilPageEditor_HTMLMode") != "disable")
{
$output = str_replace("&lt;","<",$output);
$output = str_replace("&gt;",">",$output);
}
$output = str_replace("&amp;", "&", $output);
// replace latex code: todo: finish
if ($this->getOutputMode() != "offline")
{
$output = ilUtil::insertLatexImages($output);
}
else
{
$output = ilUtil::buildLatexImages($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("{", "&#123;", $output);
$output = str_replace("}", "&#125;", $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);
$output = str_replace("[[[[[Question;]]]]]", $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);
}
//echo htmlentities($output);
$output = $this->postOutputProcessing($output);
//echo htmlentities($output);
if($this->getOutputMode() == "edit" && !$this->getActivated())
{
$output = '<div class="il_editarea_disabled">'.$output.'</div>';
}
$output = $this->insertMaps($output);
$output = $this->obj->insertSourceCodeParagraphs($output, $this->getOutputMode());
$ilBench->stop("ContentPresentation", "ilPageObjectGUI_showPage");
// output
if ($ilCtrl->isAsynch())
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
echo $tpl->get();
$tpl->setVariable($this->getTemplateOutputVar(), $output);
$tpl->setCurrentBlock("adm_content");
$tpl->parseCurrentBlock();
echo $tpl->get("adm_content");
}
if ($this->outputToTemplate())
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
$this->tpl->setVariable($this->getTemplateTargetVar(), $tpl->get());
return $output;
}
else
{
if ($this->getRawPageContent()) // e.g. needed in glossaries
{
return $output;
}
else
{
$tpl->setVariable($this->getTemplateOutputVar(), $output);
return $tpl->get();
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilPageObjectGUI::$activated = true

Definition at line 74 of file class.ilPageObjectGUI.php.

Referenced by getActivated().

ilPageObjectGUI::$activation = false

Definition at line 73 of file class.ilPageObjectGUI.php.

Referenced by getEnabledActivation().

ilPageObjectGUI::$bib_id

Definition at line 68 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$change_comments

Definition at line 71 of file class.ilPageObjectGUI.php.

Referenced by isEnabledChangeComments().

ilPageObjectGUI::$citation

Definition at line 69 of file class.ilPageObjectGUI.php.

Referenced by isEnabledCitation().

ilPageObjectGUI::$ctrl

Definition at line 57 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$editpreview = false

Definition at line 76 of file class.ilPageObjectGUI.php.

Referenced by getEditPreview().

ilPageObjectGUI::$enabledinternallinks = true

Definition at line 75 of file class.ilPageObjectGUI.php.

Referenced by getEnabledInternalLinks().

ilPageObjectGUI::$enabledpctabs = false

Definition at line 79 of file class.ilPageObjectGUI.php.

Referenced by getEnabledPCTabs().

ilPageObjectGUI::$enabledtabs = true

Definition at line 78 of file class.ilPageObjectGUI.php.

Referenced by getEnabledTabs().

ilPageObjectGUI::$enableediting = true

Definition at line 81 of file class.ilPageObjectGUI.php.

Referenced by getEnableEditing().

ilPageObjectGUI::$ilias

Definition at line 54 of file class.ilPageObjectGUI.php.

Referenced by ilPageObjectGUI(), and showPage().

ilPageObjectGUI::$link_params

Definition at line 67 of file class.ilPageObjectGUI.php.

Referenced by getLinkParams(), and showPage().

ilPageObjectGUI::$link_xml_set = false

Definition at line 80 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$obj

Definition at line 58 of file class.ilPageObjectGUI.php.

Referenced by getPageObject().

ilPageObjectGUI::$output2template

Definition at line 66 of file class.ilPageObjectGUI.php.

Referenced by outputToTemplate().

ilPageObjectGUI::$output_mode

Definition at line 59 of file class.ilPageObjectGUI.php.

Referenced by getOutputMode().

ilPageObjectGUI::$output_submode

Definition at line 60 of file class.ilPageObjectGUI.php.

Referenced by getOutputSubmode().

ilPageObjectGUI::$presentation_title

Definition at line 61 of file class.ilPageObjectGUI.php.

Referenced by getPresentationTitle().

ilPageObjectGUI::$question_html

Definition at line 72 of file class.ilPageObjectGUI.php.

Referenced by getQuestionHTML(), and setQuestionHTML().

ilPageObjectGUI::$rawpagecontent = false

Definition at line 82 of file class.ilPageObjectGUI.php.

Referenced by getRawPageContent().

ilPageObjectGUI::$return_location

Definition at line 63 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$sourcecode_download_script

Definition at line 70 of file class.ilPageObjectGUI.php.

Referenced by getSourcecodeDownloadScript(), and showPage().

ilPageObjectGUI::$target_script

Definition at line 62 of file class.ilPageObjectGUI.php.

ilPageObjectGUI::$target_var

Definition at line 64 of file class.ilPageObjectGUI.php.

Referenced by getTemplateTargetVar().

ilPageObjectGUI::$template_output_var

Definition at line 65 of file class.ilPageObjectGUI.php.

Referenced by getTemplateOutputVar().

ilPageObjectGUI::$use_meta_data = false

Definition at line 77 of file class.ilPageObjectGUI.php.


The documentation for this class was generated from the following file: