4 define (
"IL_PAGE_PRESENTATION",
"presentation");
5 define (
"IL_PAGE_EDIT",
"edit");
6 define (
"IL_PAGE_PREVIEW",
"preview");
7 define (
"IL_PAGE_OFFLINE",
"offline");
8 define (
"IL_PAGE_PRINT",
"print");
10 include_once (
"./Services/COPage/classes/class.ilPageEditorGUI.php");
11 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
12 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
13 include_once(
"./Services/COPage/classes/class.ilParagraphPlugins.php");
14 include_once(
"./Services/COPage/classes/class.ilParagraphPlugin.php");
15 include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
77 if ($a_old_nr == 0 &&
$_GET[
"old_nr"] > 0)
79 $a_old_nr =
$_GET[
"old_nr"];
102 $this->output2template =
true;
103 $this->question_xml =
"";
104 $this->question_html =
"";
105 $this->tabs_gui =& $ilTabs;
108 $this->template_output_var =
"PAGE_CONTENT";
109 $this->citation =
false;
110 $this->change_comments =
false;
111 $this->page_back_title = $this->lng->txt(
"page");
112 $lng->loadLanguageModule(
"content");
121 $page =
new ilPageObject($a_parent_type, $a_id, $a_old_nr);
131 $this->bib_id = $a_id;
139 return $this->bib_id ? $this->bib_id : 0;
149 $this->obj = $a_pg_obj;
169 $this->output_mode = $a_mode;
179 $this->output2template = $a_output;
189 $this->presentation_title = $a_title;
199 $this->header = $a_title;
204 return $this->header;
209 $this->link_params = $l_params;
219 $this->link_frame = $l_frame;
224 return $this->link_frame;
229 $this->link_xml = $link_xml;
230 $this->link_xml_set =
true;
235 return $this->link_xml;
240 $this->question_xml = $question_xml;
250 return $this->question_xml;
260 $this->target_var = $a_variable;
271 $this->template_output_var = $a_value;
282 $this->output_submode = $a_mode;
301 $this->citation = $a_enabled;
311 $this->locator =& $a_locator;
316 $this->tabs_gui = $a_tabs;
321 $this->page_back_title = $a_title;
326 $this->file_download_link = $a_download_link;
331 return $this->file_download_link;
336 $this->fullscreen_link = $a_fullscreen_link;
341 return $this->fullscreen_link;
346 $this->int_link_def_type = $a_type;
347 $this->int_link_def_id = $a_id;
352 $this->int_link_return = $a_return;
357 $this->change_comments = $a_enabled;
367 $this->notes_enabled = $a_enabled;
368 $this->notes_parent_id = $a_parent_id;
373 return $this->notes_enabled;
381 $this->enablecontentincludes = $a_enable;
389 return $this->enablecontentincludes;
398 $this->offline_directory = $offdir;
407 return $this->offline_directory;
419 $this->view_page_link = $a_link;
420 $this->view_page_target = $a_target;
428 return $this->view_page_link;
436 return $this->view_page_target;
441 $this->act_obj =& $a_obj;
442 $this->act_meth = $a_meth;
447 $this->activation = $a_act;
457 $this->scheduled_activation = $a_act;
462 return $this->scheduled_activation;
470 $this->tab_hook = array(
"obj" => $a_object,
"func" => $a_function);
481 $this->enabledinternallinks = $a_enabledinternallinks;
501 $this->editpreview = $a_editpreview;
521 $this->preventhtmlunmasking = $a_preventhtmlunmasking;
531 return $this->preventhtmlunmasking;
541 $this->enabledtabs = $a_enabledtabs;
561 $this->enabledrepositoryobjects = $a_enabledrepositoryobjects;
571 return $this->enabledrepositoryobjects;
581 $this->enabledmaps = $a_enabledmaps;
591 return $this->enabledmaps;
601 $this->enabledpctabs = $a_enabledpctabs;
621 $this->enabledfilelists = $a_enabledfilelists;
631 return $this->enabledfilelists;
641 $this->enabledpagefocus = $a_enabledpagefocus;
651 return $this->enabledpagefocus;
661 $this->exp_frame = $a_exp_frame;
662 $this->exp_id = $a_exp_id;
663 $this->exp_target_script = $a_exp_target_script;
673 $this->prependinghtml = $a_prependinghtml;
683 return $this->prependinghtml;
693 $this->enablewikilinks = $a_enablewikilinks;
703 return $this->enablewikilinks;
713 $this->enableediting = $a_enableediting;
733 $this->rawpagecontent = $a_rawpagecontent;
753 $this->layout_mode = $a_layout_mode;
763 return $this->layout_mode;
773 $this->styleid = $a_styleid;
783 return $this->styleid;
793 $this->enabledselfassessment = $a_enabledselfassessment;
803 return $this->enabledselfassessment;
813 $this->compare_mode = $a_val;
836 $a_observer_obj = NULL, $a_observer_func =
"")
838 $this->use_meta_data =
true;
839 $this->meta_data_rep_obj_id = $a_rep_obj_id;
840 $this->meta_data_sub_obj_id = $a_sub_obj_id;
841 $this->meta_data_type = $a_type;
842 $this->meta_data_observer_obj = $a_observer_obj;
843 $this->meta_data_observer_func = $a_observer_func;
858 $file_download_link = $ilCtrl->getLinkTarget($this,
"downloadFile");
860 return $file_download_link;
875 $fullscreen_link = $ilCtrl->getLinkTarget($this,
"displayMediaFullscreen");
877 return $fullscreen_link;
890 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline")
892 $l = $ilCtrl->getLinkTarget($this,
"");
905 global $ilPluginAdmin;
909 foreach ($pl_names as $pl_name)
912 "COPage",
"pgcp", $pl_name);
913 if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
915 $xml =
'<ComponentPlugin Name="'.$plugin->getPluginName().
922 $xml =
"<ComponentPlugins>".$xml.
"</ComponentPlugins>";
936 $next_class = $this->ctrl->getNextClass($this);
938 $cmd = $this->ctrl->getCmd();
943 $ilCtrl->setReturn($this,
"edit");
947 case 'ilmdeditorgui':
949 $ilTabs->setTabActive(
"meta_data");
950 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
952 $this->meta_data_sub_obj_id, $this->meta_data_type);
953 if (is_object($this->meta_data_observer_obj))
955 $md_gui->addObserver($this->meta_data_observer_obj,
956 $this->meta_data_observer_func,
"General");
958 $this->ctrl->forwardCommand($md_gui);
961 case "ileditclipboardgui":
965 $clip_gui->setPageBackTitle($this->page_back_title);
967 $ret =& $this->ctrl->forwardCommand($clip_gui);
972 switch(
$_GET[
"notes_mode"])
975 $html = $this->
edit();
976 $ilTabs->setTabActive(
"edit");
981 case 'ilpublicuserprofilegui':
982 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
984 $ret = $this->ctrl->forwardCommand($profile_gui);
987 case "ilpageeditorgui":
991 $ilCtrl->redirect($this,
"preview");
994 $page_editor->setLocator($this->locator);
995 $page_editor->setHeader($this->
getHeader());
996 $page_editor->setPageBackTitle($this->page_back_title);
997 $page_editor->setIntLinkHelpDefault($this->int_link_def_type,
998 $this->int_link_def_id);
999 $page_editor->setIntLinkReturn($this->int_link_return);
1001 $ret =& $this->ctrl->forwardCommand($page_editor);
1005 $cmd = $this->ctrl->getCmd(
"preview");
1019 $this->ctrl->redirectByClass(
"ilpageobjectgui",
"edit");
1028 $this->ctrl->redirectByClass(
"ilpageobjectgui",
"edit");
1038 $ilBench->start(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1046 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
1050 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
1055 $tpl->setCurrentBlock(
"change_comment");
1056 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
1057 $tpl->parseCurrentBlock();
1058 $tpl->setCurrentBlock(
"adm_content");
1062 if ($this->exp_frame !=
"")
1064 $tpl->setCurrentBlock(
"updater");
1065 $tpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
1066 $tpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
1067 $tpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
1068 $tpl->parseCurrentBlock();
1076 $tpl->setVariable(
"WYSIWYG_ACTION",
1077 $ilCtrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true));
1081 $tpl->setVariable(
"TXT_JAVA_SCRIPT_CAPABLE",
"<br />".$this->lng->txt(
"cont_browser_not_js_capable"));
1083 $tpl->setVariable(
"TXT_CHANGE_EDIT_MODE", $this->lng->txt(
"cont_set_edit_mode"));
1087 $tpl->setCurrentBlock(
"de_activate_page");
1090 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_deactivate_page"));
1091 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"deactivatePage");
1095 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_activate_page"));
1096 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"activatePage");
1098 $tpl->parseCurrentBlock();
1101 $med_mode = array(
"enable" => $this->lng->txt(
"cont_enable_media"),
1102 "disable" => $this->lng->txt(
"cont_disable_media"));
1103 $sel_media_mode = ($ilUser->getPref(
"ilPageEditor_MediaMode") ==
"disable")
1107 $js_mode = array(
"enable" => $this->lng->txt(
"cont_enable_js"),
1108 "disable" => $this->lng->txt(
"cont_disable_js"));
1110 $tpl->setVariable(
"SEL_MEDIA_MODE",
1112 0,
"ilEditSelect"));
1115 $html_mode = array(
"enable" => $this->lng->txt(
"cont_enable_html"),
1116 "disable" => $this->lng->txt(
"cont_disable_html"));
1117 $sel_html_mode = ($ilUser->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
1122 $tpl->setVariable(
"SEL_HTML_MODE",
1124 0,
"ilEditSelect"));
1128 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $lng->txt(
"cont_confirm_delete"));
1132 $tpl->setCurrentBlock(
"view_link");
1133 $tpl->setVariable(
"LINK_VIEW_PAGE",
1135 $tpl->setVariable(
"TARGET_VIEW_PAGE",
1137 $tpl->setVariable(
"TXT_VIEW_PAGE", $this->lng->txt(
"view"));
1138 $tpl->parseCurrentBlock();
1142 $sel_js_mode =
"disable";
1143 if($ilSetting->get(
"enable_js_edit", 1))
1151 if ($sel_js_mode ==
"enable")
1154 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1157 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
1159 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilpageedit.js");
1161 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
1162 $tpl->touchBlock(
"init_dragging");
1165 if($ilias->getSetting(
"enable_js_edit"))
1167 $tpl->setVariable(
"SEL_JAVA_SCRIPT",
1169 0,
"ilEditSelect"));
1173 $tpl->setCurrentBlock(
"multi_actions");
1174 if ($sel_js_mode ==
"enable")
1176 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1177 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1178 $tpl->setVariable(
"ONCLICK_ASSIGN_CHARACTERISTIC",
'onclick="return ilEditMultiAction(\'assignCharacteristicForm\');"');
1179 $tpl->setVariable(
"ONCLICK_COPY_SELECTED",
'onclick="return ilEditMultiAction(\'copySelected\');"');
1180 $tpl->setVariable(
"ONCLICK_CUT_SELECTED",
'onclick="return ilEditMultiAction(\'cutSelected\');"');
1182 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1183 $tpl->setVariable(
"TXT_ASSIGN_CHARACTERISTIC", $this->lng->txt(
"cont_assign_characteristic"));
1184 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1185 $tpl->setVariable(
"TXT_COPY_SELECTED", $this->lng->txt(
"copy"));
1186 $tpl->setVariable(
"TXT_CUT_SELECTED", $this->lng->txt(
"cut"));
1188 $tpl->parseCurrentBlock();
1194 $tpl =
new ilTemplate(
"tpl.page_translation_content.html",
true,
true,
"Services/COPage");
1201 $tpl =
new ilTemplate(
"tpl.page_content.html",
true,
true,
"Services/COPage");
1204 $tpl->touchBlock(
"page_focus");
1209 $tpl =
new ilTemplate(
"tpl.page_preview.html",
true,
true,
"Services/COPage");
1210 include_once(
"./Services/User/classes/class.ilUserUtil.php");
1221 if (is_array($hist_info[
"previous"]))
1223 $tpl->setCurrentBlock(
"previous_rev");
1224 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1225 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1226 $tpl->setVariable(
"HREF_PREV",
1227 $ilCtrl->getLinkTarget($this,
"preview"));
1228 $tpl->parseCurrentBlock();
1232 $tpl->setCurrentBlock(
"previous_rev_disabled");
1233 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1234 $tpl->parseCurrentBlock();
1238 $tpl->setCurrentBlock(
"next_rev");
1239 $tpl->setVariable(
"TXT_NEXT_REV", $lng->txt(
"cont_next_rev"));
1240 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1241 $tpl->setVariable(
"HREF_NEXT",
1242 $ilCtrl->getLinkTarget($this,
"preview"));
1243 $tpl->parseCurrentBlock();
1246 $tpl->setCurrentBlock(
"latest_rev");
1247 $tpl->setVariable(
"TXT_LATEST_REV", $lng->txt(
"cont_latest_rev"));
1248 $ilCtrl->setParameter($this,
"old_nr",
"");
1249 $tpl->setVariable(
"HREF_LATEST",
1250 $ilCtrl->getLinkTarget($this,
"preview"));
1251 $tpl->parseCurrentBlock();
1254 if ($c_old_nr > 0 && $ilUser->getId() != ANONYMOUS_USER_ID)
1256 $tpl->setCurrentBlock(
"rollback");
1257 $ilCtrl->setParameter($this,
"old_nr", $c_old_nr);
1258 $tpl->setVariable(
"HREF_ROLLBACK",
1259 $ilCtrl->getLinkTarget($this,
"rollbackConfirmation"));
1260 $ilCtrl->setParameter($this,
"old_nr",
"");
1261 $tpl->setVariable(
"TXT_ROLLBACK",
1262 $lng->txt(
"cont_rollback"));
1263 $tpl->parseCurrentBlock();
1267 $tpl->setCurrentBlock(
"hist_nav");
1268 $tpl->setVariable(
"TXT_REVISION", $lng->txt(
"cont_revision"));
1269 $tpl->setVariable(
"VAL_REVISION_DATE",
1271 $tpl->setVariable(
"VAL_REV_USER",
1273 $tpl->parseCurrentBlock();
1283 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1290 $this->obj->getId());
1291 $mob_links = array();
1292 foreach($links as $link)
1294 if ($link[
"type"] ==
"mob")
1304 if (count($mob_links) > 0)
1306 $tpl->setCurrentBlock(
"med_link");
1307 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1308 $tpl->setVariable(
"SEL_MED_LINKS",
1310 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1311 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1313 $tpl->parseCurrentBlock();
1317 $snippets = $this->
getPageObject()->collectContentIncludes();
1318 if (count($snippets) > 0)
1320 foreach ($snippets as $s)
1322 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPage.php");
1325 $tpl->setCurrentBlock(
"med_link");
1326 $tpl->setVariable(
"TXT_CONTENT_SNIPPETS_USED", $this->lng->txt(
"cont_snippets_used"));
1327 $tpl->setVariable(
"SEL_SNIPPETS",
1329 $tpl->setVariable(
"TXT_SHOW_INFO", $this->lng->txt(
"cont_show_info"));
1330 $tpl->parseCurrentBlock();
1338 $tpl->setCurrentBlock(
"activation_txt");
1339 $tpl->setVariable(
"TXT_SCHEDULED_ACTIVATION", $lng->txt(
"cont_scheduled_activation"));
1340 $tpl->setVariable(
"SA_FROM",
1344 $tpl->setVariable(
"SA_TO",
1348 $tpl->parseCurrentBlock();
1352 if (
$_GET[
"reloadTree"] ==
"y")
1354 $tpl->setCurrentBlock(
"reload_tree");
1355 if ($this->obj->getParentType() ==
"dbk")
1357 $tpl->setVariable(
"LINK_TREE",
1358 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer"));
1362 $tpl->setVariable(
"LINK_TREE",
1363 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer"));
1365 $tpl->parseCurrentBlock();
1370 $builded = $this->obj->buildDom();
1377 if (!$this->obj->checkPCIds())
1379 $this->obj->insertPCIds();
1380 $this->obj->update(
true,
true);
1383 $this->obj->addFileSizes();
1384 $this->obj->addHierIDs();
1386 $hids = $this->obj->getHierIds();
1387 $row1_ids = $this->obj->getFirstRowIds();
1388 $col1_ids = $this->obj->getFirstColumnIds();
1389 $litem_ids = $this->obj->getListItemIds();
1390 $fitem_ids = $this->obj->getFileItemIds();
1393 $hids = $this->obj->getHierIds();
1394 foreach($hids as $hid)
1396 $tpl->setCurrentBlock(
"add_dhtml");
1397 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_".$hid);
1398 $tpl->parseCurrentBlock();
1402 foreach($col1_ids as $hid)
1404 $tpl->setCurrentBlock(
"add_dhtml");
1405 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r".$hid);
1406 $tpl->parseCurrentBlock();
1410 foreach($row1_ids as $hid)
1412 $tpl->setCurrentBlock(
"add_dhtml");
1413 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c".$hid);
1414 $tpl->parseCurrentBlock();
1418 foreach($litem_ids as $hid)
1420 $tpl->setCurrentBlock(
"add_dhtml");
1421 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1422 $tpl->parseCurrentBlock();
1426 foreach($fitem_ids as $hid)
1428 $tpl->setCurrentBlock(
"add_dhtml");
1429 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1430 $tpl->parseCurrentBlock();
1435 $this->obj->addFileSizes();
1442 if (!$this->link_xml_set)
1455 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
1457 $template_xml = $style->getTemplateXML();
1458 $disable_auto_margins =
"n";
1459 if ($style->lookupStyleSetting(
"disable_auto_margins"))
1461 $disable_auto_margins =
"y";
1465 $content = $this->obj->getXMLFromDom(
false,
true,
true,
1466 $link_xml.$this->getQuestionXML().$template_xml);
1471 if($builded !==
true)
1484 session_unregister(
"citation_error");
1504 $enlarge_path =
"images/enlarge.gif";
1508 ?
"ilc_PrintPageTitle"
1513 $enable_split_new = ($this->obj->getParentType() ==
"lm" ||
1514 $this->obj->getParentType() ==
"dbk")
1520 if (($this->obj->getParentType() ==
"lm" ||
1521 $this->obj->getParentType() ==
"dbk") &&
1523 $this->obj->getId()))
1525 $enable_split_next =
"y";
1529 $enable_split_next =
"n";
1534 $paragraph_plugins->initialize ();
1538 $paragraph_plugin_string = $paragraph_plugins->serializeToString();
1539 $_SESSION [
"paragraph_plugins"] = $paragraph_plugins;
1551 include_once(
"./Services/Accordion/classes/class.ilAccordionGUI.php");
1563 ? $ilUser->getPref(
"ilPageEditor_MediaMode")
1566 include_once(
"./Modules/LearningModule/classes/class.ilEditClipboard.php");
1571 $params = array (
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title,ENT_QUOTES,
"UTF-8"),
1572 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1573 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1574 'img_add' => $add_path,
1575 'img_col' => $col_path,
1576 'img_row' => $row_path,
1577 'img_item' => $item_path,
1578 'enable_split_new' => $enable_split_new,
1579 'enable_split_next' => $enable_split_next,
1581 'file_download_link' => $file_download_link,
1582 'fullscreen_link' => $fullscreen_link,
1583 'med_disabled_path' => $med_disabled_path,
1584 'img_path' => $img_path,
1585 'parent_id' => $this->obj->getParentId(),
1587 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1590 'pagebreak' => $this->lng->txt(
'dgl_pagebreak'),
1591 'page' => $this->lng->txt(
'page'),
1592 'citate_page' => $this->lng->txt(
'citate_page'),
1593 'citate_from' => $this->lng->txt(
'citate_from'),
1594 'citate_to' => $this->lng->txt(
'citate_to'),
1595 'citate' => $this->lng->txt(
'citate'),
1602 'paste' => $paste ?
"y" :
"n",
1603 'media_mode' => $media_mode,
1604 'javascript' => $sel_js_mode,
1605 'paragraph_plugins' => $paragraph_plugin_string,
1606 'disable_auto_margins' => $disable_auto_margins
1608 if($this->link_frame !=
"")
1609 $params[
"pg_frame"] = $this->link_frame;
1617 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1621 $md5 = md5(serialize(
$params).$link_xml.$template_xml);
1628 $md5 == $this->obj->getRenderMd5() &&
1629 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1630 $this->obj->getRenderedTime() !=
"" &&
1631 $this->obj->old_nr == 0)
1634 $output = $this->obj->getRenderedContent();
1639 $xsl = file_get_contents(
"./Services/COPage/xsl/page_layout.xsl");
1641 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1644 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1651 && $this->obj->old_nr == 0)
1654 $this->obj->writeRenderedContent($output, $md5);
1666 $ilUser->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1669 $output = str_replace(
"<",
"<",$output);
1670 $output = str_replace(
">",
">",$output);
1672 $output = str_replace(
"&",
"&", $output);
1690 $output = str_replace(
"{",
"{", $output);
1691 $output = str_replace(
"}",
"}", $output);
1694 $output = str_replace(
"\n",
"", $output);
1698 if (is_array($qhtml))
1700 foreach ($qhtml as $k => $h)
1702 $output = str_replace(
"{{{{{Question;il__qst_$k}}}}}",
" ".$h, $output);
1711 $output =
'<div class="il_editarea_disabled">'.$output.
'</div>';
1715 $output = $this->obj->insertSourceCodeParagraphs($output, $this->
getOutputMode());
1717 $ilBench->stop(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1720 if ($ilCtrl->isAsynch())
1727 $tpl->setCurrentBlock(
"adm_content");
1728 $tpl->parseCurrentBlock();
1729 echo
$tpl->get(
"adm_content");
1759 $link_info =
"<IntLinkInfos>";
1760 $targetframe =
"None";
1761 foreach ($int_links as $int_link)
1763 $target = $int_link[
"Target"];
1764 if (substr($target, 0, 4) ==
"il__")
1768 $type = $int_link[
"Type"];
1771 $anc = $anc_add =
"";
1772 if ($int_link[
"Anchor"] !=
"")
1774 $anc = $int_link[
"Anchor"];
1775 $anc_add =
"_".rawurlencode($int_link[
"Anchor"]);
1781 case "StructureObject":
1784 if (
$type ==
"PageObject")
1786 $href =
"./goto.php?target=pg_".$target_id.$anc_add;
1790 $href =
"./goto.php?target=st_".$target_id;
1794 case "GlossaryItem":
1796 $href =
"./goto.php?target=git_".$target_id;
1804 case "RepositoryItem":
1808 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1812 $anc_par =
'Anchor="'.$anc.
'"';
1813 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".$anc_par.
" ".
1814 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
1817 $link_info.=
"</IntLinkInfos>";
1827 require_once(
"./Modules/File/classes/class.ilObjFile.php");
1829 $fileObj->sendFile();
1838 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
1839 $tpl->setCurrentBlock(
"ilMedia");
1847 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1849 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
1851 $pg_obj->buildDom();
1856 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
1861 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1862 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
1869 $params = array (
'mode' =>
"fullscreen",
'enlarge_path' => $enlarge_path,
1870 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
1871 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
1877 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1880 $tpl->setVariable(
"MEDIA_CONTENT", $output);
1891 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1900 $start = strpos($a_html,
"[[[[[Map;");
1903 $end = strpos($a_html,
"]]]]]",
$start);
1913 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
1915 $map_gui->setMapId(
"map_".$i);
1916 $map_gui->setLatitude(
$param[0]);
1917 $map_gui->setLongitude(
$param[1]);
1918 $map_gui->setZoom(
$param[2]);
1919 $map_gui->setWidth(
$param[3].
"px");
1920 $map_gui->setHeight(
$param[4].
"px");
1921 $map_gui->setEnableTypeControl(
true);
1922 $map_gui->setEnableNavigationControl(
true);
1923 $map_gui->setEnableCentralMarker(
true);
1924 $h2 = substr($a_html, 0,
$start).
1925 $map_gui->getHtml().
1926 substr($a_html, $end + 5);
1934 $end = strpos($a_html,
"]]]]]",
$start);
1949 $start = strpos($a_html,
"{{{{{ContentInclude;");
1952 $end = strpos($a_html,
"}}}}}",
$start);
1962 include_once(
"./Modules/MediaPool/classes/class.ilMediaPoolPageGUI.php");
1978 $html = $page_gui->getRawContent();
1984 $h2 = substr($a_html, 0,
$start).
1986 substr($a_html, $end + 5);
1990 $start = strpos($a_html,
"{{{{{ContentInclude;",
$start + 5);
1994 $end = strpos($a_html,
"}}}}}",
$start);
2016 $a_tpl->setCurrentBlock(
"help_img");
2018 $a_tpl->parseCurrentBlock();
2019 $a_tpl->setCurrentBlock(
"help_item");
2020 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_add_elements"));
2021 $a_tpl->parseCurrentBlock();
2023 $a_tpl->setCurrentBlock(
"help_img");
2025 $a_tpl->parseCurrentBlock();
2026 $a_tpl->setCurrentBlock(
"help_img");
2028 $a_tpl->parseCurrentBlock();
2029 $a_tpl->setCurrentBlock(
"help_item");
2030 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_drag_and_drop_elements"));
2031 $a_tpl->parseCurrentBlock();
2033 $a_tpl->setCurrentBlock(
"help_img");
2035 $a_tpl->parseCurrentBlock();
2036 $a_tpl->setCurrentBlock(
"help_item");
2037 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_double_click_to_delete"));
2038 $a_tpl->parseCurrentBlock();
2040 $a_tpl->setCurrentBlock(
"help");
2041 $a_tpl->parseCurrentBlock();
2064 $ilCtrl->redirect($this,
"preview");
2073 $html.=
"<br /><br />".$this->getNotesHTML($a_mode =
"");
2101 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
2102 $this->tpl->setCurrentBlock(
"ContentStyle");
2103 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
2104 $this->tpl->parseCurrentBlock();
2108 $this->tpl->setCurrentBlock(
"ilMedia");
2110 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
2112 if (!empty (
$_GET[
"pg_id"]))
2114 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
2121 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
2135 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
2136 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
2144 $mode =
"fullscreen";
2145 $params = array (
'mode' => $mode,
'webspace_path' => $wb_path);
2151 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
2161 if(is_array($a_error))
2163 $error_str =
"<b>Validation Error(s):</b><br>";
2164 foreach ($a_error as
$error)
2166 $err_mess = implode($error,
" - ");
2167 if (!is_int(strpos($err_mess,
":0:")))
2169 $error_str .= htmlentities($err_mess).
"<br />";
2172 $this->tpl->setVariable(
"MESSAGE", $error_str);
2188 $tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
2190 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
2192 $table_gui->setId(
"hist_table");
2194 $entries[] = array(
'page_id' => $this->
getPageObject()->getId(),
2199 'sortkey' => 999999,
2201 $table_gui->setData($entries);
2202 return $table_gui->getHTML();
2217 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
2221 $ilCtrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
2222 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"rollback"));
2223 $c_gui->setHeaderText($lng->txt(
"cont_rollback_confirmation"));
2224 $c_gui->setCancel($lng->txt(
"cancel"),
"history");
2225 $c_gui->setConfirm($lng->txt(
"confirm"),
"rollback");
2227 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
2229 $c_gui->addItem(
"id[]",
$_GET[
"old_nr"],
2232 $tpl->setContent($c_gui->getHTML());
2247 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
2249 if ($hentry[
"content"] !=
"")
2251 $this->obj->setXMLContent($hentry[
"content"]);
2252 $this->obj->buildDom(
true);
2253 if ($this->obj->update())
2255 $ilCtrl->redirect($this,
"history");
2258 $ilCtrl->redirect($this,
"history");
2280 $ilTabs->addTarget(
"pg", $ilCtrl->getLinkTarget($this,
"preview")
2281 , array(
"",
"preview"));
2285 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
2286 , array(
"",
"edit"));
2293 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
2294 , array(
"",
"edit"));
2297 $ilTabs->addTarget(
"cont_preview", $ilCtrl->getLinkTarget($this,
"preview")
2298 , array(
"",
"preview"));
2304 if ($this->use_meta_data && !$this->layout_mode)
2306 $ilTabs->addTarget(
"meta_data",
2307 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
2308 "",
"ilmdeditorgui");
2313 $ilTabs->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history")
2314 ,
"history", get_class($this));
2326 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(
"ilEditClipboardGUI",
"view")
2327 ,
"view",
"ilEditClipboardGUI");
2332 $ilTabs->addTarget(
"cont_activation", $this->ctrl->getLinkTarget($this,
"editActivation"),
2333 "editActivation", get_class($this));
2337 if (is_array($this->tab_hook))
2339 $func = $this->tab_hook[
"func"];
2340 $this->tab_hook[
"obj"]->$func();
2357 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
2358 $compare = $this->obj->compareVersion(
$_POST[
"left"],
$_POST[
"right"]);
2361 $lpage = $compare[
"l_page"];
2364 $lpage_gui->setPageObject($lpage);
2365 $lpage_gui->setPreventHTMLUnmasking(
true);
2367 $lpage_gui->setCompareMode(
true);
2368 $lhtml = $lpage_gui->showPage();
2370 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
2371 $tpl->setVariable(
"LEFT", $lhtml);
2374 $rpage = $compare[
"r_page"];
2377 $rpage_gui->setPageObject($rpage);
2378 $rpage_gui->setPreventHTMLUnmasking(
true);
2380 $rpage_gui->setCompareMode(
true);
2381 $rhtml = $rpage_gui->showPage();
2383 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
2384 $tpl->setVariable(
"RIGHT", $rhtml);
2386 $tpl->setVariable(
"TXT_NEW", $lng->txt(
"cont_pc_new"));
2387 $tpl->setVariable(
"TXT_MODIFIED", $lng->txt(
"cont_pc_modified"));
2388 $tpl->setVariable(
"TXT_DELETED", $lng->txt(
"cont_pc_deleted"));
2398 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
2399 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
2400 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
2401 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);
2413 $atpl =
new ilTemplate(
"tpl.page_activation.php",
true,
true,
"Services/COPage");
2416 $atpl->setVariable(
"FORM", $this->form->getHTML());
2417 $atpl->setCurrentBlock(
"updater");
2418 $atpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
2419 $atpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
2420 $atpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
2421 $atpl->parseCurrentBlock();
2422 $tpl->setContent($atpl->get());
2432 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
2434 $this->form->setFormAction($ilCtrl->getFormAction($this));
2435 $this->form->setTitle($lng->txt(
"cont_page_activation"));
2439 $rad_op1 =
new ilRadioOption($lng->txt(
"cont_activated"),
"activated");
2441 $rad->addOption($rad_op1);
2442 $rad_op2 =
new ilRadioOption($lng->txt(
"cont_deactivated"),
"deactivated");
2443 $rad->addOption($rad_op2);
2444 $rad_op3 =
new ilRadioOption($lng->txt(
"cont_scheduled_activation"),
"scheduled");
2447 $dt_prop->setShowTime(
true);
2451 $rad_op3->addSubItem($dt_prop2);
2453 $rad->addOption($rad_op3);
2455 $this->form->addCommandButton(
"saveActivation", $lng->txt(
"save"));
2457 $this->form->addItem($rad);
2466 $values[
"activation"] =
"deactivated";
2469 $values[
"activation"] =
"activated";
2472 $dt_prop = $this->form->getItemByPostVar(
"start");
2475 $values[
"activation"] =
"scheduled";
2479 $dt_prop = $this->form->getItemByPostVar(
"end");
2482 $values[
"activation"] =
"scheduled";
2487 $this->form->setValuesByArray($values);
2499 if ($this->form->checkInput())
2504 if (
$_POST[
"activation"] ==
"deactivated")
2508 if (
$_POST[
"activation"] ==
"scheduled")
2512 $this->form->getItemByPostVar(
"start")->getDate()->get(
IL_CAL_DATETIME));
2514 $this->form->getItemByPostVar(
"end")->getDate()->get(
IL_CAL_DATETIME));
2518 $ilCtrl->redirect($this,
"editActivation");
2520 $this->form->getValuesByPost();
2521 $tpl->setContent($this->form->getHTML());
2532 $ilCtrl->setParameter($this,
"nodes_mode", $a_mode);
2533 include_once(
"Services/Notes/classes/class.ilNoteGUI.php");
2534 $notes_gui =
new ilNoteGUI($this->notes_parent_id,
2535 (
int) $this->obj->getId(),
"pg");
2541 $notes_gui->enablePublicNotes();
2543 $next_class = $ilCtrl->getNextClass($this);
2544 if ($next_class ==
"ilnotegui")
2546 $html = $this->ctrl->forwardCommand($notes_gui);
2550 $html = $notes_gui->getNotesHTML();