4define(
"IL_PAGE_PRESENTATION",
"presentation");
5define(
"IL_PAGE_EDIT",
"edit");
6define(
"IL_PAGE_PREVIEW",
"preview");
7define(
"IL_PAGE_OFFLINE",
"offline");
8define(
"IL_PAGE_PRINT",
"print");
10include_once(
"./Services/COPage/classes/class.ilPageEditorGUI.php");
11include_once(
"./Services/COPage/classes/class.ilPageObject.php");
12include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
13include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
136 $a_prevent_get_id =
false,
142 $this->tpl =
$DIC[
"tpl"];
143 $this->ctrl =
$DIC->ctrl();
144 $this->lng =
$DIC->language();
145 $this->tabs_gui =
$DIC->tabs();
146 $this->plugin_admin =
$DIC[
"ilPluginAdmin"];
147 $this->access =
$DIC->access();
148 $this->
user = $DIC->user();
149 $this->help =
$DIC[
"ilHelp"];
150 $this->ui =
$DIC->ui();
154 if ($a_old_nr == 0 && !$a_prevent_get_id &&
$_GET[
"old_nr"] > 0) {
155 $a_old_nr =
$_GET[
"old_nr"];
159 if ($a_lang ==
"" &&
$_GET[
"transl"] !=
"") {
174 $this->output2template =
true;
175 $this->question_xml =
"";
176 $this->question_html =
"";
178 $this->template_output_var =
"PAGE_CONTENT";
179 $this->change_comments =
false;
180 $this->page_back_title = $this->lng->txt(
"page");
181 $this->lng->loadLanguageModule(
"content");
182 $this->lng->loadLanguageModule(
"copg");
186 $this->ctrl->saveParameter($this,
"transl");
204 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
221 $this->parent_type = $a_val;
261 $this->old_nr = $a_val;
271 return $this->old_nr;
281 $this->language = $a_val;
291 if ($this->language ==
"") {
325 $this->page_config = $a_val;
345 $this->obj = $a_pg_obj;
365 $this->output_mode = $a_mode;
375 $this->output2template = $a_output;
385 $this->presentation_title = $a_title;
395 $this->header = $a_title;
405 $this->link_params = $l_params;
415 $this->link_frame = $l_frame;
420 return $this->link_frame;
425 $this->link_xml = $link_xml;
426 $this->link_xml_set =
true;
431 return $this->link_xml;
436 $this->question_xml = $question_xml;
446 return $this->question_xml;
456 $this->target_var = $a_variable;
466 $this->template_output_var = $a_value;
481 $this->sourcecode_download_script = $script_name;
496 $this->locator = $a_locator;
501 $this->tabs_gui = $a_tabs;
506 $this->page_back_title = $a_title;
516 $this->file_download_link = $a_download_link;
526 return $this->file_download_link;
536 $this->fullscreen_link = $a_fullscreen_link;
546 return $this->fullscreen_link;
551 $this->int_link_return = $a_return;
556 $this->change_comments = $a_enabled;
566 $this->notes_enabled = $a_enabled;
567 $this->notes_parent_id = $a_parent_id;
572 return $this->notes_enabled;
582 $this->offline_directory = $offdir;
592 return $this->offline_directory;
604 $this->view_page_link = $a_link;
605 $this->view_page_target = $a_target;
613 return $this->view_page_link;
621 return $this->view_page_target;
631 return $this->lng->txt(
"cont_presentation_view");
636 $this->act_obj = $a_obj;
637 $this->act_meth = $a_meth;
645 public function setEnabledNews($a_enabled, $a_news_obj_id = 0, $a_news_obj_type = 0)
647 $this->enabled_news = $a_enabled;
648 $this->news_obj_id = $a_news_obj_id;
649 $this->news_obj_type = $a_news_obj_type;
659 return $this->enabled_news;
667 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
677 $this->editpreview = $a_editpreview;
697 $this->tabs_enabled = $a_enabledtabs;
717 $this->enabledpagefocus = $a_enabledpagefocus;
727 return $this->enabledpagefocus;
738 $this->exp_frame = $a_exp_frame;
739 $this->exp_id = $a_exp_id;
740 $this->exp_target_script = $a_exp_target_script;
750 $this->prependinghtml = $a_prependinghtml;
760 return $this->prependinghtml;
770 $this->enableediting = $a_enableediting;
790 $this->rawpagecontent = $a_rawpagecontent;
810 $this->styleid = $a_styleid;
820 return $this->styleid;
830 $this->compare_mode = $a_val;
850 $this->abstract_only = $a_val;
870 $this->render_page_container = $a_val;
891 return $this->lng->txt(
"inactive");
908 $a_observer_obj =
null,
909 $a_observer_func =
""
911 $this->use_meta_data =
true;
912 $this->meta_data_rep_obj = $a_rep_obj;
913 $this->meta_data_sub_obj_id = $a_sub_obj_id;
914 $this->meta_data_type =
$a_type;
915 $this->meta_data_observer_obj = $a_observer_obj;
916 $this->meta_data_observer_func = $a_observer_func;
928 $file_download_link = $this->ctrl->getLinkTarget($this,
"downloadFile");
930 return $file_download_link;
942 $fullscreen_link = $this->ctrl->getLinkTarget($this,
"displayMediaFullscreen",
"",
false,
false);
944 return $fullscreen_link;
955 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline") {
956 $l = $this->ctrl->getLinkTarget($this,
"");
968 $pl_names = $this->plugin_admin->getActivePluginsForSlot(
973 foreach ($pl_names as $pl_name) {
974 $plugin = $this->plugin_admin->getPluginObject(
980 if ($plugin->isValidParentType($this->getPageObject()->getParentType())) {
981 $xml .=
'<ComponentPlugin Name="' . $plugin->getPluginName() .
987 $xml =
"<ComponentPlugins>" .
$xml .
"</ComponentPlugins>";
1000 $this->ctrl->setReturn($this,
"edit");
1002 $next_class = $this->ctrl->getNextClass($this);
1003 $this->log->debug(
"next_class: " . $next_class);
1004 switch ($next_class) {
1005 case 'ilobjectmetadatagui':
1006 $this->tabs_gui->activateTab(
"meta_data");
1007 include_once
'Services/Object/classes/class.ilObjectMetaDataGUI.php';
1008 $md_gui =
new ilObjectMetaDataGUI($this->meta_data_rep_obj, $this->meta_data_type, $this->meta_data_sub_obj_id);
1009 if (is_object($this->meta_data_observer_obj)) {
1010 $md_gui->addMDObserver(
1011 $this->meta_data_observer_obj,
1012 $this->meta_data_observer_func,
1016 $this->ctrl->forwardCommand($md_gui);
1019 case "ileditclipboardgui":
1021 $clip_gui->setPageBackTitle($this->page_back_title);
1022 $ret = $this->ctrl->forwardCommand($clip_gui);
1027 switch (
$_GET[
"notes_mode"]) {
1030 $this->tabs_gui->setTabActive(
"edit");
1035 case 'ilpublicuserprofilegui':
1036 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
1038 $ret = $this->ctrl->forwardCommand($profile_gui);
1041 case "ilpageeditorgui":
1044 $this->ctrl->redirect($this,
"preview");
1047 $page_editor->setLocator($this->locator);
1048 $page_editor->setHeader($this->
getHeader());
1049 $page_editor->setPageBackTitle($this->page_back_title);
1050 $page_editor->setIntLinkReturn($this->int_link_return);
1052 $ret = $this->ctrl->forwardCommand($page_editor);
1055 case 'ilnewsitemgui':
1056 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
1058 $news_item_gui->setEnableEdit(
true);
1059 $news_item_gui->setContextObjId($this->news_obj_id);
1060 $news_item_gui->setContextObjType($this->news_obj_type);
1061 $news_item_gui->setContextSubObjId($this->obj->getId());
1062 $news_item_gui->setContextSubObjType(
"pg");
1064 $ret = $this->ctrl->forwardCommand($news_item_gui);
1068 $ret = $this->ctrl->forwardCommand($profile_gui);
1071 case "ilpropertyformgui":
1072 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
1074 $this->ctrl->forwardCommand(
$form);
1077 case "ilinternallinkgui":
1078 $this->lng->loadLanguageModule(
"content");
1079 require_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1082 $link_gui->filterLinkType(
"PageObject_FAQ");
1083 $link_gui->filterLinkType(
"GlossaryItem");
1084 $link_gui->filterLinkType(
"Media_Media");
1085 $link_gui->filterLinkType(
"Media_FAQ");
1087 $link_gui->setFilterWhiteList(
true);
1088 $this->ctrl->forwardCommand($link_gui);
1091 case "ilquestioneditgui":
1093 include_once(
"./Modules/TestQuestionPool/classes/class.ilQuestionEditGUI.php");
1097 $edit_gui->setSelfAssessmentEditingMode(
true);
1098 $ret = $this->ctrl->forwardCommand($edit_gui);
1099 $this->tpl->setContent(
$ret);
1102 case 'ilassquestionfeedbackeditinggui':
1110 $this->lng->loadLanguageModule(
"assessment");
1113 require_once
'Modules/TestQuestionPool/classes/class.assQuestionGUI.php';
1114 require_once
'Modules/TestQuestionPool/classes/class.assQuestion.php';
1116 $questionGUI->object->setObjId(0);
1117 $questionGUI->object->setSelfAssessmentEditingMode(
true);
1118 $questionGUI->object->setPreventRteUsage($this->
getPageConfig()->getPreventRteUsage());
1121 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1123 $this->ctrl->forwardCommand($gui);
1137 case 'ilLearninghistorygui':
1143 $hist_gui->setUserId($user_id);
1144 $this->ctrl->forwardCommand($hist_gui);
1148 $cmd = $this->ctrl->getCmd(
"preview");
1149 $ret = $this->$cmd();
1164 include_once(
"./Modules/TestQuestionPool/classes/class.assQuestion.php");
1166 $this->tabs_gui->clearTargets();
1168 $this->tabs_gui->setBackTarget(
1169 $this->lng->txt(
"back"),
1170 $this->ctrl->getLinkTarget($this,
"edit")
1173 $this->ctrl->setParameterByClass(
"ilquestioneditgui",
"q_id",
$_GET[
"q_id"]);
1174 $this->tabs_gui->addTab(
1176 $this->lng->txt(
"question"),
1177 $this->ctrl->getLinkTargetByClass(
"ilquestioneditgui",
"editQuestion")
1180 require_once
'Modules/TestQuestionPool/classes/class.ilAssQuestionFeedbackEditingGUI.php';
1181 $this->ctrl->setParameterByClass(
"ilAssQuestionFeedbackEditingGUI",
"q_id",
$_GET[
"q_id"]);
1182 $this->tabs_gui->addTab(
1184 $this->lng->txt(
"feedback"),
1188 $this->tabs_gui->activateTab($a_active);
1205 $this->ctrl->redirect($this,
"edit");
1214 $this->ctrl->redirect($this,
"edit");
1223 include_once(
"./Services/jQuery/classes/class.iljQueryUtil.php");
1229 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
1232 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilCOPagePres.js");
1235 include_once(
"./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php");
1238 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1245 $this->log->debug(
"ilPageObjectGUI, showPage() in edit mode.");
1248 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1252 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1256 $tpl->setCurrentBlock(
"change_comment");
1257 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1258 $tpl->parseCurrentBlock();
1263 $this->ctrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true)
1267 $sel_media_mode = ($this->
user->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1270 $sel_html_mode = ($this->
user->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1273 $sel_js_mode =
"disable";
1283 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $this->lng->txt(
"cont_confirm_delete"));
1287 $this->tabs_gui->addNonTabbedLink(
1299 if ($sel_js_mode ==
"enable") {
1301 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1305 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1306 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
1308 include_once(
"./Services/UIComponent/Modal/classes/class.ilModalGUI.php");
1310 $this->lng->toJS(
"cont_error");
1311 $this->lng->toJS(
"cont_sel_el_cut_use_paste");
1312 $this->lng->toJS(
"cont_sel_el_copied_use_paste");
1314 include_once
'./Services/Style/Content/classes/class.ilObjStyleSheet.php';
1315 $GLOBALS[
"tpl"]->addOnloadCode(
"var preloader = new Image();
1316 preloader.src = './templates/default/images/loader.svg';
1317 ilCOPage.setUser('" . $this->
user->getLogin() .
"');
1318 ilCOPage.setContentCss('" .
1321 ", ./Services/COPage/css/tiny_extra.css" .
1323 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
1325 $GLOBALS[
"tpl"]->addOnloadCode(
"ilCOPage.addTextFormat('" .
$c .
"');");
1328 $GLOBALS[
"tpl"]->addJavascript(
"./libs/bower/bower_components/tinymce/tinymce.min.js");
1329 $tpl->touchBlock(
"init_dragging");
1336 $cfg->getEnableInternalLinks(),
1337 $cfg->getEnableWikiLinks(),
1338 $cfg->getEnableKeywords(),
1339 $this->getStyleId(),
1342 $cfg->getEnableAnchors(),
1344 $cfg->getEnableUserLinks()
1349 include_once(
"./Services/Link/classes/class.ilInternalLinkGUI.php");
1350 $tpl->setCurrentBlock(
"int_link_prep");
1352 $this->ctrl->getLinkTargetByClass(
1353 array(
"ilpageeditorgui",
"ilinternallinkgui"),
1360 $tpl->parseCurrentBlock();
1362 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1364 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/UIComponent/Explorer/js/ilExplorer.js");
1371 $tpl->setCurrentBlock(
"multi_actions");
1372 if ($sel_js_mode ==
"enable") {
1373 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1374 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1375 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1376 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1377 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1378 $tpl->setVariable(
"TXT_SELECT_ALL", $this->lng->txt(
"select_all"));
1379 $tpl->setVariable(
"ONCLICK_SELECT_ALL",
'onclick="return ilEditMultiAction(\'selectAll\');"');
1381 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1382 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1383 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1384 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1385 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1387 $tpl->parseCurrentBlock();
1392 $tpl =
new ilTemplate(
"tpl.page.html",
true,
true,
"Services/COPage");
1394 $tpl->touchBlock(
"page_focus");
1397 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1401 $tpl->touchBlock(
"page_container_1");
1402 $tpl->touchBlock(
"page_container_2");
1403 $tpl->touchBlock(
"page_container_3");
1413 $this->ctrl->setParameter($this,
"history_mode",
"1");
1416 if (is_array($hist_info[
"previous"])) {
1417 $tpl->setCurrentBlock(
"previous_rev");
1418 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1419 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1422 $this->ctrl->getLinkTarget($this,
"preview")
1424 $tpl->parseCurrentBlock();
1426 $tpl->setCurrentBlock(
"previous_rev_disabled");
1427 $tpl->setVariable(
"TXT_PREV_REV", $this->lng->txt(
"cont_previous_rev"));
1428 $tpl->parseCurrentBlock();
1432 if ($c_old_nr > 0) {
1433 $tpl->setCurrentBlock(
"next_rev");
1434 $tpl->setVariable(
"TXT_NEXT_REV", $this->lng->txt(
"cont_next_rev"));
1435 $this->ctrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1438 $this->ctrl->getLinkTarget($this,
"preview")
1440 $tpl->parseCurrentBlock();
1443 $tpl->setCurrentBlock(
"latest_rev");
1444 $tpl->setVariable(
"TXT_LATEST_REV", $this->lng->txt(
"cont_latest_rev"));
1445 $this->ctrl->setParameter($this,
"old_nr",
"");
1448 $this->ctrl->getLinkTarget($this,
"preview")
1450 $tpl->parseCurrentBlock();
1453 $this->ctrl->setParameter($this,
"history_mode",
"");
1456 if ($c_old_nr > 0 && $this->
user->getId() != ANONYMOUS_USER_ID) {
1457 $tpl->setCurrentBlock(
"rollback");
1458 $this->ctrl->setParameter($this,
"old_nr", $c_old_nr);
1461 $this->ctrl->getLinkTarget($this,
"rollbackConfirmation")
1463 $this->ctrl->setParameter($this,
"old_nr",
"");
1466 $this->lng->txt(
"cont_rollback")
1468 $tpl->parseCurrentBlock();
1472 $tpl->setCurrentBlock(
"hist_nav");
1473 $tpl->setVariable(
"TXT_REVISION", $this->lng->txt(
"cont_revision"));
1475 "VAL_REVISION_DATE",
1482 $tpl->parseCurrentBlock();
1489 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1495 $this->obj->getParentType() .
":pg",
1496 $this->obj->getId(),
1497 $this->obj->getLanguage()
1499 $mob_links = array();
1500 foreach (
$links as $link) {
1501 if ($link[
"type"] ==
"mob") {
1509 if (count($mob_links) > 0) {
1510 $tpl->setCurrentBlock(
"med_link");
1511 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1516 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1517 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1519 $tpl->parseCurrentBlock();
1523 include_once(
"./Services/COPage/classes/class.ilPCContentInclude.php");
1528 if (count($snippets) > 0) {
1529 foreach ($snippets as
$s) {
1530 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1533 $tpl->setCurrentBlock(
"med_link");
1534 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1539 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1540 $tpl->parseCurrentBlock();
1547 $tpl->setCurrentBlock(
"activation_txt");
1548 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $this->lng->txt(
"cont_scheduled_activation"));
1567 $tpl->parseCurrentBlock();
1571 if (
$_GET[
"reloadTree"] ==
"y") {
1572 $tpl->setCurrentBlock(
"reload_tree");
1575 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer",
"",
false,
false)
1577 $tpl->parseCurrentBlock();
1581 $builded = $this->obj->buildDom();
1587 if (!$this->obj->checkPCIds()) {
1588 $this->obj->insertPCIds();
1589 $this->obj->update(
true,
true);
1592 $this->obj->addFileSizes();
1593 $this->obj->addHierIDs();
1595 $hids = $this->obj->getHierIds();
1596 $row1_ids = $this->obj->getFirstRowIds();
1597 $col1_ids = $this->obj->getFirstColumnIds();
1598 $litem_ids = $this->obj->getListItemIds();
1599 $fitem_ids = $this->obj->getFileItemIds();
1602 $hids = $this->obj->getHierIds();
1603 foreach ($hids as $hid) {
1604 $tpl->setCurrentBlock(
"add_dhtml");
1605 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_" . $hid);
1606 $tpl->parseCurrentBlock();
1610 foreach ($col1_ids as $hid) {
1611 $tpl->setCurrentBlock(
"add_dhtml");
1612 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r" . $hid);
1613 $tpl->parseCurrentBlock();
1617 foreach ($row1_ids as $hid) {
1618 $tpl->setCurrentBlock(
"add_dhtml");
1619 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c" . $hid);
1620 $tpl->parseCurrentBlock();
1624 foreach ($litem_ids as $hid) {
1625 $tpl->setCurrentBlock(
"add_dhtml");
1626 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1627 $tpl->parseCurrentBlock();
1631 foreach ($fitem_ids as $hid) {
1632 $tpl->setCurrentBlock(
"add_dhtml");
1633 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i" . $hid);
1634 $tpl->parseCurrentBlock();
1637 $this->obj->addFileSizes();
1644 if (!$this->link_xml_set) {
1655 include_once(
"./Services/Style/Content/classes/class.ilObjStyleSheet.php");
1657 $template_xml =
$style->getTemplateXML();
1658 $disable_auto_margins =
"n";
1659 if (
$style->lookupStyleSetting(
"disable_auto_margins")) {
1660 $disable_auto_margins =
"y";
1666 $content =
"<dummy><PageObject><PageContent><Paragraph>" .
1667 $this->obj->getFirstParagraphText() . $link_xml .
1668 "</Paragraph></PageContent></PageObject></dummy>";
1670 $content = $this->obj->getXMLFromDom(
1679 if ($builded !==
true) {
1700 $enlarge_path =
"images/enlarge.svg";
1704 ?
"ilc_PrintPageTitle"
1709 $enable_split_new = ($this->obj->getParentType() ==
"lm")
1715 if (($this->obj->getParentType() ==
"lm") &&
1717 $this->obj->getParentId(),
1720 $enable_split_next =
"y";
1722 $enable_split_next =
"n";
1731 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1743 ? $this->
user->getPref(
"ilPageEditor_MediaMode")
1746 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1750 include_once(
"./Services/MediaObjects/classes/class.ilPlayerUtil.php");
1758 $current_ts = time();
1759 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1762 include_once(
"./Services/Maps/classes/class.ilMapUtil.php");
1763 $params = array(
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title, ENT_QUOTES,
"UTF-8"),
1764 'enable_placeholder' =>
$cfg->getEnablePCType(
"PlaceHolder") ?
"y" :
"n",
1765 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1766 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1767 'img_col' => $col_path,
1768 'img_row' => $row_path,
1769 'img_cell' => $cell_path,
1770 'img_item' => $item_path,
1771 'compare_mode' => $this->getCompareMode() ?
"y" :
"n",
1772 'enable_split_new' => $enable_split_new,
1773 'enable_split_next' => $enable_split_next,
1774 'link_params' => $this->link_params,
1775 'file_download_link' => $file_download_link,
1776 'fullscreen_link' => $fullscreen_link,
1777 'img_path' => $img_path,
1778 'parent_id' => $this->obj->getParentId(),
1779 'download_script' => $this->sourcecode_download_script,
1780 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1781 'enable_rep_objects' =>
$cfg->getEnablePCType(
"Resources") ?
"y" :
"n",
1782 'enable_login_page' =>
$cfg->getEnablePCType(
"LoginPageElement") ?
"y" :
"n",
1784 'enable_tabs' =>
$cfg->getEnablePCType(
"Tabs") ?
"y" :
"n",
1785 'enable_sa_qst' =>
$cfg->getEnableSelfAssessment() ?
"y" :
"n",
1786 'enable_file_list' =>
$cfg->getEnablePCType(
"FileList") ?
"y" :
"n",
1787 'enable_content_includes' =>
$cfg->getEnablePCType(
"ContentInclude") ?
"y" :
"n",
1788 'enable_content_templates' => (count($this->
getPageObject()->getContentTemplates()) > 0) ?
"y" :
"n",
1789 'paste' => $paste ?
"y" :
"n",
1790 'media_mode' => $media_mode,
1791 'javascript' => $sel_js_mode,
1792 'paragraph_plugins' => $paragraph_plugin_string,
1793 'disable_auto_margins' => $disable_auto_margins,
1794 'page_toc' =>
$cfg->getEnablePageToc() ?
"y" :
"n",
1795 'enable_profile' =>
$cfg->getEnablePCType(
"Profile") ?
"y" :
"n",
1796 'enable_verification' =>
$cfg->getEnablePCType(
"Verification") ?
"y" :
"n",
1797 'enable_blog' =>
$cfg->getEnablePCType(
"Blog") ?
"y" :
"n",
1798 'enable_skills' =>
$cfg->getEnablePCType(
"Skills") ?
"y" :
"n",
1799 'enable_learning_history' =>
$cfg->getEnablePCType(
"LearningHistory") ?
"y" :
"n",
1800 'enable_qover' =>
$cfg->getEnablePCType(
"QuestionOverview") ?
"y" :
"n",
1801 'enable_consultation_hours' =>
$cfg->getEnablePCType(
"ConsultationHours") ?
"y" :
"n",
1802 'enable_my_courses' =>
$cfg->getEnablePCType(
"MyCourses") ?
"y" :
"n",
1803 'enable_amd_page_list' =>
$cfg->getEnablePCType(
"AMDPageList") ?
"y" :
"n",
1804 'current_ts' => $current_ts,
1806 'flv_video_player' => $flv_video_player,
1807 'page_perma_link' => $this->getPagePermaLink()
1809 if ($this->link_frame !=
"") {
1810 $params[
"pg_frame"] = $this->link_frame;
1818 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1822 include_once(
"./Services/COPage/classes/class.ilPCSection.php");
1826 $md5 = md5(serialize(
$params) . $link_xml . $template_xml . $md5_adds);
1836 $md5 == $this->obj->getRenderMd5() &&
1837 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1838 $this->obj->getRenderedTime() !=
"" &&
1839 $this->obj->old_nr == 0) {
1841 $output = $this->obj->getRenderedContent();
1843 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1845 $this->log->debug(
"Calling XSLT, content: " . substr($content, 0, 100));
1847 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1849 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args,
$params);
1850 }
catch (Exception $e) {
1853 $output =
"<pre>".$e->getMessage().
"<br>".htmlentities($content).
"</pre>";
1859 && $this->obj->old_nr == 0) {
1860 $this->obj->writeRenderedContent(
$output, $md5);
1868 $this->
user->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1869 && !$this->getPageConfig()->getPreventHTMLUnmasking()) {
1876 include_once
'./Services/MathJax/classes/class.ilMathJax.php';
1910 include_once(
"./Services/COPage/classes/class.ilCOPagePCDef.php");
1912 foreach ($defs as
$def) {
1914 $pc_class =
$def[
"pc_class"];
1924 $js_files = $pc_obj->getJavascriptFiles($this->
getOutputMode());
1925 foreach ($js_files as
$js) {
1931 foreach ($css_files as $css) {
1936 $onload_code = $pc_obj->getOnloadCode($this->
getOutputMode());
1937 foreach ($onload_code as
$code) {
1946 if ($this->ctrl->isAsynch() && !$this->getRawPageContent() &&
1947 $this->getOutputMode() ==
"edit") {
1949 if (
$_GET[
"updated_pc_id_str"] !=
"") {
1950 echo
$_GET[
"updated_pc_id_str"];
1953 $tpl->setCurrentBlock(
"edit_page");
1954 $tpl->parseCurrentBlock();
1955 echo
$tpl->get(
"edit_page");
1982 while (is_int(
$start = strpos(
$output,
"<!--ParStart-->")) &&
1987 array(
"{",
"}"),
2004 return array(
"deactivatePage" => $this->lng->txt(
"cont_deactivate_page"),
2005 "activatePage" => $this->lng->txt(
"cont_activate_page"));
2011 public function addActionsMenu($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
2018 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2022 $list->setListTitle($this->lng->txt(
"actions"));
2023 $list->setId(
"copage_act");
2031 $captions[
"deactivatePage"],
2033 $this->ctrl->getLinkTarget($this,
"deactivatePage")
2037 $captions[
"activatePage"],
2039 $this->ctrl->getLinkTarget($this,
"activatePage")
2043 $a_tpl->setVariable(
"PAGE_ACTIONS",
$list->getHTML());
2050 $this->lng->txt(
"cont_initial_attached_content"),
2052 $this->ctrl->getLinkTarget($this,
"initialOpenedContent")
2062 $items =
$list->getItems();
2063 if (count($items) > 1) {
2064 $a_tpl->setVariable(
"PAGE_ACTIONS",
$list->getHTML());
2065 } elseif (count($items) == 1) {
2066 $b =
$ui->factory()->button()->standard($items[0][
"title"], $items[0][
"link"]);
2067 $a_tpl->setVariable(
"PAGE_ACTIONS",
$ui->renderer()->render($b));
2071 $this->lng->loadLanguageModule(
"content");
2073 $list->setListTitle($this->lng->txt(
"cont_edit_mode"));
2074 $list->setId(
"copage_ed_mode");
2077 if ($sel_media_mode ==
"enable") {
2078 $this->ctrl->setParameter($this,
"media_mode",
"disable");
2080 $this->lng->txt(
"cont_deactivate_media"),
2082 $this->ctrl->getLinkTarget($this,
"setEditMode")
2085 $this->ctrl->setParameter($this,
"media_mode",
"enable");
2087 $this->lng->txt(
"cont_activate_media"),
2089 $this->ctrl->getLinkTarget($this,
"setEditMode")
2092 $this->ctrl->setParameter($this,
"media_mode",
"");
2096 if ($sel_html_mode ==
"enable") {
2097 $this->ctrl->setParameter($this,
"html_mode",
"disable");
2099 $this->lng->txt(
"cont_deactivate_html"),
2101 $this->ctrl->getLinkTarget($this,
"setEditMode")
2104 $this->ctrl->setParameter($this,
"html_mode",
"enable");
2106 $this->lng->txt(
"cont_activate_html"),
2108 $this->ctrl->getLinkTarget($this,
"setEditMode")
2112 $this->ctrl->setParameter($this,
"html_mode",
"");
2115 if ($sel_js_mode ==
"enable") {
2116 $this->ctrl->setParameter($this,
"js_mode",
"disable");
2118 $this->lng->txt(
"cont_deactivate_js"),
2120 $this->ctrl->getLinkTarget($this,
"setEditMode")
2123 $this->ctrl->setParameter($this,
"js_mode",
"enable");
2125 $this->lng->txt(
"cont_activate_js"),
2127 $this->ctrl->getLinkTarget($this,
"setEditMode")
2130 $this->ctrl->setParameter($this,
"js_mode",
"");
2132 $a_tpl->setVariable(
"EDIT_MODE",
$list->getHTML());
2148 if (
$cfg->getMultiLangSupport()) {
2153 include_once(
"./Services/Object/classes/class.ilObjectTranslation.php");
2156 if (!$ot->getContentActivated()) {
2165 $this->lng->loadLanguageModule(
"meta");
2168 $l = $ot->getMasterLanguage();
2170 $this->lng->txt(
"cont_edit_language_version") .
": " .
2171 $this->lng->txt(
"meta_l_" .
$l),
2173 $this->ctrl->getLinkTarget($this,
"editMasterLanguage")
2177 foreach ($ot->getLanguages() as $al =>
$lang) {
2179 $al != $ot->getMasterLanguage()) {
2180 $this->ctrl->setParameter($this,
"totransl", $al);
2182 $this->lng->txt(
"cont_edit_language_version") .
": " .
2183 $this->lng->txt(
"meta_l_" . $al),
2185 $this->ctrl->getLinkTarget($this,
"switchToLanguage")
2187 $this->ctrl->setParameter($this,
"totransl",
$_GET[
"totransl"]);
2197 include_once(
"./Services/COPage/classes/class.ilPageMultiLangGUI.php");
2202 $a_tpl->setVariable(
"MULTI_LANG_INFO", $ml_gui->getMultiLangInfo($this->getPageObject()->getLanguage()));
2217 if (
$_GET[
"media_mode"] !=
"") {
2218 if (
$_GET[
"media_mode"] ==
"disable") {
2219 $this->
user->writePref(
"ilPageEditor_MediaMode",
"disable");
2221 $this->
user->writePref(
"ilPageEditor_MediaMode",
"");
2224 if (
$_GET[
"html_mode"] !=
"") {
2225 if (
$_GET[
"html_mode"] ==
"disable") {
2226 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"disable");
2228 $this->
user->writePref(
"ilPageEditor_HTMLMode",
"");
2231 if (
$_GET[
"js_mode"] !=
"") {
2232 if (
$_GET[
"js_mode"] ==
"disable") {
2233 $this->
user->writePref(
"ilPageEditor_JavaScript",
"disable");
2235 $this->
user->writePref(
"ilPageEditor_JavaScript",
"");
2239 $this->ctrl->redirect($this,
"edit");
2248 $a_int_links =
false,
2249 $a_wiki_links =
false,
2250 $a_keywords =
false,
2252 $a_paragraph_styles =
true,
2253 $a_save_return =
true,
2256 $a_user_links =
false
2265 include_once(
"./Services/COPage/classes/class.ilPageEditorSettings.php");
2267 include_once(
"./Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php");
2269 $btpl =
new ilTemplate(
"tpl.tiny_menu.html",
true,
true,
"Services/COPage");
2273 $btpl->touchBlock(
"debug_ghost");
2277 $btpl->touchBlock(
"blist_button");
2280 $lng->txt(
"cont_blist"),
2285 $btpl->touchBlock(
"nlist_button");
2288 $lng->txt(
"cont_nlist"),
2293 $btpl->touchBlock(
"list_indent");
2296 $lng->txt(
"cont_list_indent"),
2301 $btpl->touchBlock(
"list_outdent");
2304 $lng->txt(
"cont_list_outdent"),
2309 $btpl->touchBlock(
"bb_ilink_button");
2311 "iosEditInternalLinkTrigger",
2312 $lng->txt(
"cont_link_to_internal"),
2318 $lng->txt(
"cont_link_to_external"),
2322 if ($a_user_links) {
2323 $btpl->touchBlock(
"bb_ulink_button");
2327 $btpl->touchBlock(
"rformat_button");
2330 $lng->txt(
"cont_remove_format"),
2334 if ($a_paragraph_styles) {
2336 $btpl->setCurrentBlock(
"new_par");
2337 $btpl->setVariable(
"IMG_NEWPAR",
"+");
2338 $btpl->parseCurrentBlock();
2341 $lng->txt(
"cont_insert_new_paragraph"),
2345 $btpl->setCurrentBlock(
"par_edit");
2346 $btpl->setVariable(
"TXT_PAR_FORMAT",
$lng->txt(
"cont_par_format"));
2347 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2355 "ilAdvSelListAnchorText_style_selection",
2356 $lng->txt(
"cont_paragraph_styles"),
2360 $btpl->parseCurrentBlock();
2364 $btpl->setCurrentBlock(
"bb_kw_button");
2365 $btpl->setVariable(
"CC_KW",
"kw");
2366 $btpl->parseCurrentBlock();
2369 $lng->txt(
"cont_text_keyword"),
2374 if ($a_wiki_links) {
2375 $btpl->setCurrentBlock(
"bb_wikilink_button2");
2376 $btpl->setVariable(
"TXT_WIKI_BUTTON2",
$lng->txt(
"obj_wiki"));
2377 $btpl->setVariable(
"WIKI_BUTTON2_URL",
$ctrl->getLinkTargetByClass(
"ilwikipagegui",
""));
2378 $btpl->parseCurrentBlock();
2381 $lng->txt(
"cont_wiki_link_dialog"),
2385 $btpl->setCurrentBlock(
"bb_wikilink_button");
2386 $btpl->setVariable(
"TXT_WLN2",
$lng->txt(
"obj_wiki"));
2387 $btpl->parseCurrentBlock();
2390 $lng->txt(
"cont_link_to_wiki"),
2397 include_once(
"./Services/COPage/classes/class.ilPageContentGUI.php");
2400 if (in_array(
$c, array(
"com",
"quot",
"acc",
"code"))) {
2409 if ($aset->get(
"use_physical")) {
2410 $cc_code = str_replace(array(
"str",
"emp",
"imp"), array(
"B",
"I",
"U"), $cc_code);
2414 $btpl->setCurrentBlock(
"bb_" .
$c .
"_button");
2415 $btpl->setVariable(
"CC_" . strtoupper(
$c), $cc_code);
2416 $btpl->parseCurrentBlock();
2419 $lng->txt(
"cont_cc_" .
$c),
2431 $lng->txt(
"cont_tex"),
2437 $lng->txt(
"cont_fn"),
2441 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
2443 $sdd->setPullRight(
false);
2444 $sdd->setListTitle(
$lng->txt(
"save") .
"...");
2446 if ($a_save_return) {
2447 $btpl->setCurrentBlock(
"save_return");
2448 $btpl->setVariable(
"TXT_SAVE_RETURN",
$lng->txt(
"save_return"));
2449 $btpl->parseCurrentBlock();
2450 $sdd->addItem(
$lng->txt(
"save_return"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSaveReturn(false); return false;");
2454 $btpl->setCurrentBlock(
"save_new");
2455 $btpl->setVariable(
"TXT_SAVE_NEW",
$lng->txt(
"save_new"));
2456 $btpl->parseCurrentBlock();
2457 $sdd->addItem(
$lng->txt(
"save_new"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSaveReturn(true); return false;");
2460 $sdd->addItem(
$lng->txt(
"save"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdSave(null); return false;");
2461 $sdd->addItem(
$lng->txt(
"cancel"),
"",
"#",
"",
"",
"",
"",
"",
"ilCOPage.cmdCancel(); return false;");
2464 $btpl->setCurrentBlock(
"bb_anc_button");
2465 $btpl->setVariable(
"CC_ANC",
"anc");
2466 $btpl->parseCurrentBlock();
2469 $lng->txt(
"cont_anchor"),
2474 $btpl->setVariable(
"SAVE_DROPDOWN", $sdd->getHTML());
2483 $btpl->setVariable(
"TXT_SAVE",
$lng->txt(
"save"));
2484 $btpl->setVariable(
"TXT_CANCEL",
$lng->txt(
"cancel"));
2486 $btpl->setVariable(
"TXT_CHAR_FORMAT",
$lng->txt(
"cont_char_format"));
2487 $btpl->setVariable(
"TXT_LISTS",
$lng->txt(
"cont_lists"));
2488 $btpl->setVariable(
"TXT_LINKS",
$lng->txt(
"cont_links"));
2489 $btpl->setVariable(
"TXT_MORE_FUNCTIONS",
$lng->txt(
"cont_more_functions"));
2490 $btpl->setVariable(
"TXT_SAVING",
$lng->txt(
"cont_saving"));
2492 include_once(
"./Services/COPage/classes/class.ilPCParagraphGUI.php");
2496 "ilAdvSelListAnchorElement_char_style_selection",
2497 $lng->txt(
"cont_more_character_styles"),
2501 return $btpl->get();
2511 $link_info =
"<IntLinkInfos>";
2512 $targetframe =
"None";
2513 foreach ($int_links as $int_link) {
2514 $target = $int_link[
"Target"];
2515 if (substr(
$target, 0, 4) ==
"il__") {
2518 $type = $int_link[
"Type"];
2520 $targetframe = ($int_link[
"TargetFrame"] !=
"")
2521 ? $int_link[
"TargetFrame"]
2525 if ($targetframe !=
"None") {
2526 $ltarget =
"_blank";
2530 $anc = $anc_add =
"";
2531 if ($int_link[
"Anchor"] !=
"") {
2532 $anc = $int_link[
"Anchor"];
2533 $anc_add =
"_" . rawurlencode($int_link[
"Anchor"]);
2540 case "StructureObject":
2542 if (
$type ==
"PageObject") {
2543 $href =
"./goto.php?target=pg_" .
$target_id . $anc_add;
2545 $href =
"./goto.php?target=st_" .
$target_id;
2552 case "GlossaryItem":
2553 if ($targetframe ==
"None") {
2554 $targetframe =
"Glossary";
2556 $href =
"./goto.php?target=git_" .
$target_id;
2560 $this->ctrl->setParameter($this,
"mob_id",
$target_id);
2562 $href = $this->ctrl->getLinkTarget($this,
"displayMedia");
2563 $this->ctrl->setParameter($this,
"mob_id",
"");
2567 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
2571 case "PortfolioPage":
2572 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPage.php");
2576 case "RepositoryItem":
2579 $href =
"./goto.php?target=" . $obj_type .
"_" .
$target_id;
2584 if ($obj_type ==
"usr") {
2585 include_once(
"./Services/User/classes/class.ilUserUtil.php");
2588 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id",
$target_id);
2589 if (strlen($back)) {
2590 $this->ctrl->setParameterByClass(
2591 "ilpublicuserprofilegui",
2597 include_once(
"./Services/User/classes/class.ilUserUtil.php");
2599 $href = $this->ctrl->getLinkTargetByClass([
"ilpersonaldesktopgui",
"ilpublicuserprofilegui"],
"getHTML");
2601 $this->ctrl->setParameterByClass(
"ilpublicuserprofilegui",
"user_id",
"");
2603 $lcontent = str_replace(
"&",
"&", htmlentities($lcontent));
2609 $anc_par =
'Anchor="' . $anc .
'"';
2610 $link_info .=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" " . $anc_par .
" " .
2611 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" LinkContent=\"$lcontent\" />";
2615 $link_info .=
"</IntLinkInfos>";
2624 return $this->ctrl->getLinkTargetByClass(strtolower(get_class($this)),
"preview");
2633 $download_ok =
false;
2635 require_once(
"./Modules/File/classes/class.ilObjFile.php");
2637 $pg_obj->buildDom();
2638 $int_links = $pg_obj->getInternalLinks();
2639 foreach ($int_links as $il) {
2640 if ($il[
"Target"] == str_replace(
"_file_",
"_dfile_",
$_GET[
"file_id"])) {
2641 $file = explode(
"_",
$_GET[
"file_id"]);
2642 $file_id = (int) $file[count($file) - 1];
2643 $download_ok =
true;
2646 if (in_array(
$_GET[
"file_id"], $pg_obj->getAllFileObjIds())) {
2647 $file = explode(
"_",
$_GET[
"file_id"]);
2648 $file_id = (int) $file[count($file) - 1];
2649 $download_ok =
true;
2653 foreach ($pcs as $pc) {
2655 $file = explode(
"_",
$_GET[
"file_id"]);
2656 $file_id = (int) $file[count($file) - 1];
2657 if (in_array($file_id,
$files)) {
2658 $download_ok =
true;
2663 $fileObj =
new ilObjFile($file_id,
false);
2664 $fileObj->sendFile();
2684 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
2685 $tpl->setCurrentBlock(
"ilMedia");
2693 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2695 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2697 $pg_obj->buildDom();
2699 if (!empty(
$_GET[
"pg_id"])) {
2701 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2713 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2714 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
2718 if ($a_fullscreen) {
2719 $mode =
"fullscreen";
2726 $params = array(
'mode' => $mode,
'enlarge_path' => $enlarge_path,
2727 'link_params' =>
"ref_id=" .
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
2728 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
2729 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args,
$params);
2735 require_once(
'./Services/Style/Content/classes/class.ilObjStyleSheet.php');
2737 "LOCATION_CONTENT_STYLESHEET",
2744 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObjectGUI.php");
2746 $tpl->fillJavaScriptFiles();
2747 $tpl->fillCssFiles();
2759 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
2770 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2774 $page_heads = array();
2775 foreach ($offsets as $os) {
2776 $level = (int) substr($a_output, $os + 10, 1);
2777 if (in_array($level, array(1,2,3))) {
2778 $anchor = str_replace(
2781 substr($a_output, $os, strpos($a_output,
"<", $os) - $os - 4)
2785 $tag_start = stripos($a_output,
"<h" . $level .
" ", $os);
2786 $tag_end = stripos($a_output,
"</h" . $level .
">", $tag_start);
2787 $head = substr($a_output, $tag_start, $tag_end - $tag_start);
2790 $text_start = stripos($head,
">") + 1;
2791 $text_end = strripos($head,
"<!--", $text_start);
2792 $text = substr($head, $text_start, $text_end - $text_start);
2793 $page_heads[] = array(
"level" => $level,
"text" =>
$text,
2794 "anchor" => $anchor);
2798 if (count($page_heads) > 1) {
2799 include_once(
"./Services/UIComponent/NestedList/classes/class.ilNestedList.php");
2801 $list->setAutoNumbering(
true);
2802 $list->setListClass(
"ilc_page_toc_PageTOCList");
2803 $list->setItemClass(
"ilc_page_toc_PageTOCItem");
2811 foreach ($page_heads as $ind =>
$h) {
2817 if (
$h[
"level"] == 2 && $c_par[1] > 0) {
2820 if (
$h[
"level"] == 3 && $c_par[2] > 0) {
2824 $h[
"text"] = str_replace(
"<!--PageTocPH-->",
"",
$h[
"text"]);
2828 "<a href='#" .
$h[
"anchor"] .
"' class='ilc_page_toc_PageTOCLink'>" .
$h[
"text"] .
"</a>",
2834 if (
$h[
"level"] == 1) {
2838 if (
$h[
"level"] == 2) {
2844 "tpl.page_toc.html",
2849 $tpl->setVariable(
"PAGE_TOC",
$list->getHTML());
2850 $tpl->setVariable(
"TXT_PAGE_TOC", $this->lng->txt(
"cont_page_toc"));
2851 $tpl->setVariable(
"TXT_HIDE", $this->lng->txt(
"hide"));
2852 $tpl->setVariable(
"TXT_SHOW", $this->lng->txt(
"show"));
2854 $a_output = str_replace(
2855 "{{{{{PageTOC}}}}}",
2859 $numbers =
$list->getNumbers();
2861 if (count($numbers) > 0) {
2862 include_once(
"./Services/Utilities/classes/class.ilStr.php");
2863 foreach ($numbers as
$n) {
2869 $a_output = str_replace(
2870 "{{{{{PageTOC}}}}}",
2891 include_once(
"./Services/COPage/classes/class.ilPCResourcesGUI.php");
2908 $a_output = str_replace(
2909 "{{{{{LV_show_adv}}}}}",
2910 $this->lng->txt(
"cont_show_adv"),
2913 $a_output = str_replace(
2914 "{{{{{LV_hide_adv}}}}}",
2915 $this->lng->txt(
"cont_hide_adv"),
2919 $a_output = str_replace(
2920 "{{{{{LV_show_adv}}}}}",
2924 $a_output = str_replace(
2925 "{{{{{LV_hide_adv}}}}}",
2949 $a_tpl->setCurrentBlock(
"help");
2950 $a_tpl->setVariable(
"TXT_ADD_EL", $this->lng->txt(
"cont_add_elements"));
2951 include_once(
"./Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php");
2954 $a_tpl->setVariable(
"TXT_DRAG", $this->lng->txt(
"cont_drag_and_drop_elements"));
2955 $a_tpl->setVariable(
"TXT_SEL", $this->lng->txt(
"cont_double_click_to_delete"));
2956 $a_tpl->parseCurrentBlock();
2984 $this->ctrl->redirect($this,
"preview");
2989 if ($ptype ==
"cont" &&
$_GET[
"ref_id"] > 0) {
2992 $this->help->setScreenId(
"edit_" . $ptype);
2994 require_once
'Services/Captcha/classes/class.ilCaptchaUtil.php';
2996 $this->
user->isAnonymous() &&
2997 !$this->user->isCaptchaVerified() &&
2998 ilCaptchaUtil::isActiveForWiki()
3001 if (
$_POST[
'captcha_code'] &&
$form->checkInput()) {
3002 $this->
user->setCaptchaVerified(
true);
3004 return $form->getHTML();
3010 include_once(
"./Services/User/classes/class.ilUserUtil.php");
3011 $info = $this->lng->txt(
"content_no_edit_lock");
3013 $info .=
"</br>" . $this->lng->txt(
"content_until") .
": " .
3015 $info .=
"</br>" . $this->lng->txt(
"obj_usr") .
": " .
3017 if (!$this->ctrl->isAsynch()) {
3021 echo $this->tpl->getMessageHTML(
$info);
3025 if ($this->
getPageObject()->getEffectiveEditLockTime() > 0) {
3038 return $mess .
$html;
3052 $info = $this->lng->txt(
"cont_got_lock_release");
3055 $mbox =
$ui->factory()->messageBox()->info(
$info)
3056 ->withButtons([
$ui->factory()->button()->standard(
$lng->txt(
"cont_finish_editing"),
$ctrl->getLinkTarget($this,
"releasePageLock"))]);
3058 return $ui->renderer()->render($mbox);
3072 if (
$_GET[
"pl_hier_id"] ==
"") {
3073 $this->obj->buildDom();
3074 $this->obj->addHierIDs();
3075 $hid = $this->obj->getHierIdsForPCIds(array(
$_GET[
"pl_pc_id"]));
3076 $_GET[
"pl_hier_id"] = $hid[
$_GET[
"pl_pc_id"]];
3083 $tpl->addOnLoadCode(
"ilCOPage.insertJSAtPlaceholder('" .
3084 $_GET[
"pl_hier_id"] .
":" .
$_GET[
"pl_pc_id"] .
3095 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
3098 require_once
'Services/Captcha/classes/class.ilCaptchaInputGUI.php';
3099 $ci =
new ilCaptchaInputGUI($this->lng->txt(
'cont_captcha_code'),
'captcha_code');
3100 $ci->setRequired(
true);
3101 $form->addItem($ci);
3103 $form->addCommandButton(
'edit', $this->lng->txt(
'ok'));
3105 $form->setTitle($this->lng->txt(
'cont_captcha_verification'));
3106 $form->setFormAction($this->ctrl->getFormAction($this));
3132 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
3133 $this->tpl->setCurrentBlock(
"ContentStyle");
3134 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
3135 $this->tpl->parseCurrentBlock();
3139 $this->tpl->setCurrentBlock(
"ilMedia");
3141 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
3143 if (!empty(
$_GET[
"pg_id"])) {
3144 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3146 $pg_obj->buildDom();
3151 $xml .= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
3163 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
3164 $args = array(
'/_xml' =>
$xml,
'/_xsl' => $xsl );
3171 $mode =
"fullscreen";
3172 $params = array(
'mode' => $mode,
'webspace_path' => $wb_path);
3173 $output = xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",
null, $args,
$params);
3178 $this->tpl->setVariable(
"MEDIA_CONTENT",
$output);
3188 if (is_array($a_error)) {
3189 $error_str =
"<b>Error(s):</b><br>";
3190 foreach ($a_error as $error) {
3191 $err_mess = implode($error,
" - ");
3192 if (!is_int(strpos($err_mess,
":0:"))) {
3193 $error_str .= htmlentities($err_mess) .
"<br />";
3196 $this->tpl->setVariable(
"MESSAGE", $error_str);
3209 $this->tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
3211 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
3213 $table_gui->setId(
"hist_table");
3220 'sortkey' => 999999,
3222 $table_gui->setData($entries);
3223 return $table_gui->getHTML();
3235 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
3239 $this->ctrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
3240 $c_gui->setFormAction($this->ctrl->getFormAction($this,
"rollback"));
3241 $c_gui->setHeaderText($this->lng->txt(
"cont_rollback_confirmation"));
3242 $c_gui->setCancel($this->lng->txt(
"cancel"),
"history");
3243 $c_gui->setConfirm($this->lng->txt(
"confirm"),
"rollback");
3245 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
3253 $this->tpl->setContent($c_gui->getHTML());
3265 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
3267 if ($hentry[
"content"] !=
"") {
3268 $this->obj->setXMLContent($hentry[
"content"]);
3269 $this->obj->buildDom(
true);
3270 if ($this->obj->update()) {
3271 $this->ctrl->redirect($this,
"history");
3274 $this->ctrl->redirect($this,
"history");
3285 $this->help->setScreenIdComponent(
"copg");
3303 $this->tabs_gui->addTarget(
"pg", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3306 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this,
"edit"), array(
"",
"edit"));
3310 $this->tabs_gui->addTarget(
"edit", $this->ctrl->getLinkTarget($this,
"edit"), array(
"",
"edit"));
3313 $this->tabs_gui->addTarget(
"cont_preview", $this->ctrl->getLinkTarget($this,
"preview"), array(
"",
"preview"));
3319 if ($this->use_meta_data) {
3320 include_once
"Services/Object/classes/class.ilObjectMetaDataGUI.php";
3322 $this->meta_data_rep_obj,
3323 $this->meta_data_type,
3324 $this->meta_data_sub_obj_id
3326 $mdtab = $mdgui->getTab();
3328 $this->tabs_gui->addTarget(
3332 "ilobjectmetadatagui"
3340 $this->tabs_gui->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history"),
"history", get_class($this));
3341 if (
$_GET[
"history_mode"] ==
"1" || $this->ctrl->getCmd() ==
"compareVersion") {
3342 $this->tabs_gui->activateTab(
"history");
3354 $this->tabs_gui->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(array(get_class($this),
"ilEditClipboardGUI"),
"view"),
"view",
"ilEditClipboardGUI");
3357 if ($this->
getPageConfig()->getEnableScheduledActivation()) {
3358 $this->tabs_gui->addTarget(
3360 $this->ctrl->getLinkTarget($this,
"editActivation"),
3367 $this->tabs_gui->addTarget(
3369 $this->ctrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
3376 if (is_array($this->tab_hook)) {
3377 $func = $this->tab_hook[
"func"];
3378 $this->tab_hook[
"obj"]->$func();
3392 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
3393 $compare = $this->obj->compareVersion((
int)
$_POST[
"left"], (
int)
$_POST[
"right"]);
3396 $lpage = $compare[
"l_page"];
3398 $cfg->setPreventHTMLUnmasking(
true);
3407 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
3408 $tpl->setVariable(
"LEFT", $lhtml);
3411 $rpage = $compare[
"r_page"];
3419 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
3420 $tpl->setVariable(
"RIGHT", $rhtml);
3422 $tpl->setVariable(
"TXT_NEW", $this->lng->txt(
"cont_pc_new"));
3423 $tpl->setVariable(
"TXT_MODIFIED", $this->lng->txt(
"cont_pc_modified"));
3424 $tpl->setVariable(
"TXT_DELETED", $this->lng->txt(
"cont_pc_deleted"));
3434 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
3435 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
3436 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
3437 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
3447 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
3450 $atpl->setVariable(
"FORM", $this->form->getHTML());
3451 $atpl->setCurrentBlock(
"updater");
3452 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
3453 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
3454 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
3455 $atpl->parseCurrentBlock();
3456 $this->tpl->setContent($atpl->get());
3464 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
3466 $this->form->setFormAction($this->ctrl->getFormAction($this));
3467 $this->form->setTitle($this->lng->txt(
"cont_page_activation"));
3471 $rad_op1 =
new ilRadioOption($this->lng->txt(
"cont_activated"),
"activated");
3473 $rad->addOption($rad_op1);
3474 $rad_op2 =
new ilRadioOption($this->lng->txt(
"cont_deactivated"),
"deactivated");
3475 $rad->addOption($rad_op2);
3476 $rad_op3 =
new ilRadioOption($this->lng->txt(
"cont_scheduled_activation"),
"scheduled");
3479 $dt_prop->setRequired(
true);
3480 $dt_prop->setShowTime(
true);
3481 $rad_op3->addSubItem($dt_prop);
3483 $dt_prop2->setRequired(
true);
3484 $dt_prop2->setShowTime(
true);
3485 $rad_op3->addSubItem($dt_prop2);
3488 $cb =
new ilCheckboxInputGUI($this->lng->txt(
"cont_show_activation_info"),
"show_activation_info");
3489 $cb->setInfo($this->lng->txt(
"cont_show_activation_info_info"));
3490 $rad_op3->addSubItem($cb);
3493 $rad->addOption($rad_op3);
3495 $this->form->addCommandButton(
"saveActivation", $this->lng->txt(
"save"));
3497 $this->form->addItem($rad);
3510 $dt_prop = $this->form->getItemByPostVar(
"start");
3518 $dt_prop = $this->form->getItemByPostVar(
"end");
3527 $this->form->getItemByPostVar(
"activation")->setValue(
$activation);
3528 $this->form->getItemByPostVar(
"show_activation_info")->setChecked($this->
getPageObject()->getShowActivationInfo());
3538 if ($this->form->checkInput()) {
3543 if (
$_POST[
"activation"] ==
"deactivated") {
3546 if (
$_POST[
"activation"] ==
"scheduled") {
3549 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME)
3556 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"),
true);
3557 $this->ctrl->redirect($this,
"editActivation");
3559 $this->form->setValuesByPost();
3560 $this->tpl->setContent($this->form->getHTML());
3572 public function getNotesHTML($a_content_object =
null, $a_enable_private_notes =
true, $a_enable_public_notes =
false, $a_enable_notes_deletion =
false, $a_callback =
null)
3574 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
3577 if (!$a_content_object) {
3579 $this->notes_parent_id,
3580 (
int) $this->obj->getId(),
3584 $a_enable_private_notes =
true;
3585 $a_enable_public_notes =
true;
3586 $a_enable_notes_deletion =
false;
3591 $a_content_object->getParentId(),
3592 $a_content_object->getId(),
3593 $a_content_object->getParentType()
3597 if ($a_enable_private_notes) {
3598 $notes_gui->enablePrivateNotes();
3600 if ($a_enable_public_notes) {
3601 $notes_gui->enablePublicNotes();
3602 if ((
bool) $a_enable_notes_deletion) {
3603 $notes_gui->enablePublicNotesDeletion(
true);
3608 $notes_gui->addObserver($a_callback);
3611 $next_class = $this->ctrl->getNextClass($this);
3612 if ($next_class ==
"ilnotegui") {
3613 $html = $this->ctrl->forwardCommand($notes_gui);
3615 $html = $notes_gui->getNotesHTML();
3625 include_once(
"./Services/COPage/classes/class.ilPageQuestionProcessor.php");
3648 $this->tabs_gui->activateTab(
"edit");
3651 $this->tpl->setContent(
$form->getHTML());
3662 include_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
3666 include_once
'Services/Form/classes/class.ilLinkInputGUI.php';
3667 $ac =
new ilLinkInputGUI($this->lng->txt(
'cont_resource'),
'opened_content');
3669 $ac->setInternalLinkDefault(
"Media_Media", 0);
3670 $ac->setInternalLinkFilterTypes(array(
"PageObject_FAQ",
"GlossaryItem",
"Media_Media",
"Media_FAQ"));
3671 $val = $this->obj->getInitialOpenedContent();
3672 if ($val[
"id"] !=
"" && $val[
"type"] !=
"") {
3673 $ac->setValue($val[
"type"] .
"|" . $val[
"id"] .
"|" . $val[
"target"]);
3676 $form->addItem($ac);
3678 $form->addCommandButton(
"saveInitialOpenedContent", $this->lng->txt(
"save"));
3679 $form->addCommandButton(
"edit", $this->lng->txt(
"cancel"));
3680 $form->setTitle($this->lng->txt(
"cont_initial_attached_content"));
3681 $form->setFormAction($this->ctrl->getFormAction($this));
3694 $this->obj->saveInitialOpenedContent(
3700 ilUtil::sendSuccess($this->lng->txt(
"msg_obj_modified"));
3701 $this->ctrl->redirect($this,
"edit");
3720 $this->ctrl->setParameter($this,
"transl",
$_GET[
"totransl"]);
3721 $this->ctrl->redirect($this,
"edit");
3730 $this->ctrl->setParameter($this,
"totransl",
$l);
3731 $this->lng->loadLanguageModule(
"meta");
3733 include_once(
"./Services/Utilities/classes/class.ilConfirmationGUI.php");
3735 $cgui->setFormAction($this->ctrl->getFormAction($this));
3736 $cgui->setHeaderText($this->lng->txt(
"cont_page_translation_does_not_exist") .
": " .
3737 $this->lng->txt(
"meta_l_" .
$l));
3738 $cgui->setCancel($this->lng->txt(
"cancel"),
"editMasterLanguage");
3739 $cgui->setConfirm($this->lng->txt(
"confirm"),
"createPageTranslation");
3740 $this->tpl->setContent($cgui->getHTML());
3748 $this->ctrl->setParameter($this,
"transl",
"");
3749 $this->ctrl->redirect($this,
"edit");
3759 include_once(
"./Services/COPage/classes/class.ilPageObjectFactory.php");
3766 $p->copyPageToTranslation(
$l);
3767 $this->ctrl->setParameter($this,
"transl",
$l);
3768 $this->ctrl->redirect($this,
"edit");
3777 ilUtil::sendSuccess($this->lng->txt(
"cont_page_lock_released"),
true);
3778 $this->ctrl->redirect($this,
"preview");
if(strpos( $jquery_path, './')===0) elseif(strpos($jquery_path, '.')===0) $mathJaxSetting
An exception for terminatinating execution or to throw for unit testing.
const IL_PAGE_PRESENTATION
static _getQuestionGUI($question_type, $question_id=-1)
Creates a question gui representation and returns the alias to the question gui note: please do not u...
static _getQuestionType($question_id)
Returns the question type of a question with a given id.
static addCss()
Add required css.
static addJavaScript(ilTemplate $main_tpl=null)
Add javascript files that are necessary to run accordion.
User interface class for advanced drop-down selection lists.
const CMD_SHOW
command constants
static getPCDefinitions()
Get PC definitions.
static requirePCClassByName($a_name)
Get instance.
Confirmation screen class.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
@classDescription Date and time handling
Class ilEditClipboardGUI.
static get($a_glyph, $a_text="")
Get glyph html.
static getInitHTML($a_url)
Get initialisation HTML to use interna link editing.
static _getTargetsOfSource($a_source_type, $a_source_id, $a_source_lang="-")
Get all targets of a source object (e.g., a page)
static _lookupContObjID($a_id)
get learning module / digibook id for lm object
Learning history main GUI class.
static getLogger($a_component_id)
Get component logger.
static isActivated()
Checks whether Map feature is activated.
static getInstance()
Singleton: get instance.
static lookupTitle($a_page_id)
Lookup title.
static initJS(ilTemplate $a_main_tpl=null)
Init javascript.
User Interface for NewsItem entities.
static hasSuccessorPage($a_cont_obj_id, $a_page_id)
checks if page has a successor page
static _getFilesOfObject($a_type, $a_id, $a_usage_hist_nr=0, $a_usage_lang="-")
get all files of an object
static getContentStylePath($a_style_id, $add_random=true)
get content style path
static getInstance($a_obj_id)
Get instance.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupOwner($a_id)
lookup object owner
static _lookupType($a_id, $a_reference=false)
lookup object type
static initJavascript()
Init javascript.
static collectContentIncludes($a_page, $a_domdoc)
get all content includes that are used within the page
static _getCharacteristics($a_style_id)
Get characteristics.
static _getTextCharacteristics($a_style_id, $a_include_core=false)
Get text characteristics.
static getStyleSelector($a_selected, $a_chars, $a_use_callback=false)
Get style selector.
static getCharStyleSelector($a_par_type, $a_use_callback=true, $a_style_id=0)
Get character style selector.
static insertResourcesIntoPageContent($a_content)
Insert resources (see also ilContainerContentGUI::determinePageEmbeddedBlocks for presentation)
static getCacheTriggerString($a_page)
Get page cache update trigger string.
static _getCommonBBButtons()
Get common bb buttons.
static getUsagesOfPage($a_usage_id, $a_usage_type, $a_hist_nr=0, $a_all_hist_nrs=false, $a_lang="-")
Get page content usages for page.
static _doJSEditing()
checks if current user has activated js editing and if browser is js capable
static lookupSettingByParentType($a_par_type, $a_name, $a_default=false)
Lookup setting by parent type.
Page History Table GUI Class.
Page multilinguality GUI class.
static getInstance($a_parent_type, $a_id=0, $a_old_nr=0, $a_lang="-")
Get page object instance.
afterConstructor()
After constructor.
getRawPageContent()
Get Get raw page content only.
setTemplateOutputVar($a_value)
setPrependingHtml($a_prependinghtml)
Set Prepending HTML.
onFeedbackEditingForwarding()
On feedback editing forwarding.
setPresentationTitle($a_title="")
getEditPreview()
Get Display first Edit tab, then Preview tab, instead of Page and Edit.
rollback()
Rollback to a previous version.
getTabs($a_activate="")
adds tabs to tab gui object
determineSourcecodeDownloadScript()
Determine source code download script.
setOldNr($a_val)
Set old nr (historic page)
setIntLinkReturn($a_return)
showMediaFullscreen($a_style_id=0)
show fullscreen view of media object
processAnswer()
Process answer.
showPage()
display content of page
getEnablePCType($a_pc_type)
Get enable pc type.
getViewPageText()
get view page text
insertPageToc($a_output)
Insert page toc.
getProfileBackUrl()
Get profile back url.
setRawPageContent($a_rawpagecontent)
Set Get raw page content only.
getDisabledText()
Get disabled text.
setQuestionHTML($question_html)
displayValidationError($a_error)
display validation error
addMultiLangActionsAndInfo($a_list, $a_tpl)
Add multi-language actions to menu.
setEditMode()
Set edit mode.
saveActivation()
Save Activation.
insertResources($a_output)
Insert resources.
setRenderPageContainer($a_val)
Set render page container.
getEnabledNews()
Get enabled news.
getLanguage()
Get language.
setEnabledTabs($a_enabledtabs)
Set Output tabs.
getNotesHTML($a_content_object=null, $a_enable_private_notes=true, $a_enable_public_notes=false, $a_enable_notes_deletion=false, $a_callback=null)
Get html for public and/or private notes.
isPageContainerToBeRendered()
setQuestionXML($question_xml)
getCompareMode()
Get compare mode.
releasePageLock()
Release page lock.
getActivationFormValues()
Get values for activation form.
initOpenedContentForm()
Init form for initially opened content.
enableChangeComments($a_enabled)
setParentType($a_val)
Set parent type.
setPageConfig($a_val)
Set page config object.
initialOpenedContent()
Initially opened content.
addActionsMenu($a_tpl, $sel_media_mode, $sel_html_mode, $sel_js_mode)
Add actions menu.
confirmPageTranslationCreation()
Confirm page translation creation.
editActivation()
Edit activation (only, if scheduled page activation is activated in administration)
getPrependingHtml()
Get Prepending HTML.
determineFullscreenLink()
Determine fullscreen link.
setExplorerUpdater($a_exp_frame, $a_exp_id, $a_exp_target_script)
Set Explorer Updater.
setViewPageLink($a_link, $a_target="")
set link for "view page" button
setEnabledNews($a_enabled, $a_news_obj_id=0, $a_news_obj_type=0)
Set enabled news.
compareVersion()
Compares two revisions of the page.
getParentType()
Get parent type.
displayMedia($a_fullscreen=false)
Display media.
getAbstractOnly()
Get abstract only.
setTabHook($a_object, $a_function)
Set tab hook.
$sourcecode_download_script
setAbstractOnly($a_val)
Set abstract only.
determineFileDownloadLink()
Determine file download link.
getViewPageTarget()
get view page target frame
getPagePermaLink()
Get page perma link.
getPageObject()
Get Page Object.
getFullscreenLink()
Get fullscreen link.
setCompareMode($a_val)
Set compare mode.
insertAdvTrigger($a_output)
Insert adv content trigger.
replaceCurlyBrackets($output)
Replace curly brackets.
__construct( $a_parent_type, $a_id, $a_old_nr=0, $a_prevent_get_id=false, $a_lang="")
Constructor.
activateMetaDataEditor( $a_rep_obj, $a_type, $a_sub_obj_id, $a_observer_obj=null, $a_observer_func="")
Activate meda data editor.
setEnableEditing($a_enableediting)
Set Enable Editing.
getEnabledTabs()
Get Output tabs.
editMasterLanguage()
Edit master language.
setScreenIdComponent()
Set screen id component.
previewHistory()
Preview history.
getStyleId()
Get Style Id.
setEditPreview($a_editpreview)
Set Display first Edit tab, then Preview tab, instead of Page and Edit.
postOutputProcessing($a_output)
Finalizing output processing.
setTemplateOutput($a_output=true)
getPageConfig()
Get page config object.
createPageTranslation()
Create page translation.
initCaptchaForm()
Init captcha form.
setPageBackTitle($a_title)
setFileDownloadLink($a_download_link)
Set file download link.
setEnablePCType($a_pc_type, $a_val)
Set enable pc type.
history()
Get history table as HTML.
displayMediaFullscreen()
Show media in fullscreen mode.
setDefaultLinkXml()
Set standard link xml.
saveInitialOpenedContent()
Save initial opened content.
setFullscreenLink($a_fullscreen_link)
Set fullscreen link.
insertHelp($a_tpl)
Insert help texts.
setStyleId($a_styleid)
Set Style Id.
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.
getOfflineDirectory()
get offline directory
rollbackConfirmation()
Rollback confirmation.
presentation($a_mode=IL_PAGE_PRESENTATION)
static getTinyMenu( $a_par_type, $a_int_links=false, $a_wiki_links=false, $a_keywords=false, $a_style_id=0, $a_paragraph_styles=true, $a_save_return=true, $a_anchors=false, $a_save_new=true, $a_user_links=false)
Get Tiny Menu.
setLanguage($a_val)
Set language.
executeCommand()
execute command
initPageObject()
Init page object.
getEnableEditing()
Get Enable Editing.
setLinkParams($l_params="")
switchToLanguage()
Switch to language.
getEnabledPageFocus()
Get Enable page focus.
getComponentPluginsXML()
Put information about activated plugins into XML.
enableNotes($a_enabled, $a_parent_id)
setLinkFrame($l_frame="")
getFileDownloadLink()
Get file download link.
setSourcecodeDownloadScript($script_name)
Set sourcecode download script.
setPageObject(ilPageObject $a_pg_obj)
Set Page Object.
setTemplateTargetVar($a_variable)
getActivationCaptions()
Get captions for activation action menu entries.
initActivationForm()
Init activation form.
getBlockingInfoMessage()
Get block info message.
insertJSAtPlaceholder()
InsertJS at placeholder.
downloadFile()
Download file of file lists.
getViewPageLink()
get view page link
download_paragraph()
download source code paragraph
setActivationListener(&$a_obj, $a_meth)
edit()
edit ("view" before)
setQEditTabs($a_active)
Set question editing tabs.
getSourcecodeDownloadScript()
Get sourcecode download script.
setOfflineDirectory($offdir)
set offline directory to offdir
isEnabledChangeComments()
setEnabledPageFocus($a_enabledpagefocus)
Set Enable page focus.
getOldNr()
Get old nr (historic page)
getRenderPageContainer()
Get render page container.
static _exists($a_parent_type, $a_id, $a_lang="", $a_no_cache=false)
Checks whether page exists.
static saveQuestionAnswer($a_type, $a_id, $a_answer)
Save question answer.
static getFlashVideoPlayerFilename($a_fullpath=false)
Get flash video player file name.
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
static getGotoForPortfolioPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
GUI class for public user profile presentation.
This class represents an option in a radio group.
static strPosAll($a_haystack, $a_needle)
Get all positions of a string.
static replaceFirsOccurence($a_old, $a_new, $a_str)
Replaces the first occurence of $a_old in $a_str with $a_new.
special template class to simplify handling of ITX/PEAR
static hasPublicProfile($a_user_id)
Has public profile.
static getNamePresentation( $a_user_id, $a_user_image=false, $a_profile_link=false, $a_profile_back_link="", $a_force_first_lastname=false, $a_omit_login=false, $a_sortable=true, $a_return_data_array=false, $a_ctrl_path="ilpublicuserprofilegui")
Default behaviour is:
static getWebspaceDir($mode="filesystem")
get webspace directory
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static formSelect( $selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static getGotoForWikiPageTarget($a_target, $a_offline=false)
Get goto href for internal wiki page link target.
static initDragDrop()
Init YUI Drag and Drop.
static initConnection(ilTemplate $a_main_tpl=null)
Init YUI Connection module.
static initPanel($a_resize=false, ilTemplate $a_main_tpl=null)
Init yui panel.
static initjQueryUI($a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components....
static initjQuery($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if(!array_key_exists('StateId', $_REQUEST)) $id
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
if(isset($_POST['submit'])) $form
if(isset($_REQUEST['delete'])) $list
catch(Exception $e) if(isset( $_POST[ 'cancel'])) if(isset($_POST['continue'])) $cfg