24 define (
"IL_PAGE_PRESENTATION",
"presentation");
25 define (
"IL_PAGE_EDIT",
"edit");
26 define (
"IL_PAGE_PREVIEW",
"preview");
27 define (
"IL_PAGE_OFFLINE",
"offline");
28 define (
"IL_PAGE_PRINT",
"print");
30 include_once (
"./Services/COPage/classes/class.ilPageEditorGUI.php");
31 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
32 include_once(
"./Services/Clipboard/classes/class.ilEditClipboardGUI.php");
33 include_once(
"./Services/COPage/classes/class.ilParagraphPlugins.php");
34 include_once(
"./Services/COPage/classes/class.ilParagraphPlugin.php");
35 include_once(
"./Services/Utilities/classes/class.ilDOMUtil.php");
94 if ($a_old_nr == 0 &&
$_GET[
"old_nr"] > 0)
96 $a_old_nr =
$_GET[
"old_nr"];
116 $this->output2template =
true;
117 $this->question_xml =
"";
118 $this->question_html =
"";
119 $this->tabs_gui =& $ilTabs;
122 $this->template_output_var =
"PAGE_CONTENT";
123 $this->citation =
false;
124 $this->change_comments =
false;
125 $this->page_back_title = $this->lng->txt(
"page");
126 $lng->loadLanguageModule(
"content");
135 $page =
new ilPageObject($a_parent_type, $a_id, $a_old_nr);
145 $this->bib_id = $a_id;
153 return $this->bib_id ? $this->bib_id : 0;
163 $this->obj = $a_pg_obj;
183 $this->output_mode = $a_mode;
193 $this->output2template = $a_output;
203 $this->presentation_title = $a_title;
213 $this->header = $a_title;
218 return $this->header;
223 $this->link_params = $l_params;
233 $this->link_frame = $l_frame;
238 return $this->link_frame;
243 $this->link_xml = $link_xml;
244 $this->link_xml_set =
true;
249 return $this->link_xml;
254 $this->question_xml = $question_xml;
264 return $this->question_xml;
274 $this->target_var = $a_variable;
285 $this->template_output_var = $a_value;
296 $this->output_submode = $a_mode;
315 $this->citation = $a_enabled;
325 $this->locator =& $a_locator;
330 $this->tabs_gui = $a_tabs;
335 $this->page_back_title = $a_title;
340 $this->file_download_link = $a_download_link;
345 return $this->file_download_link;
350 $this->fullscreen_link = $a_fullscreen_link;
355 return $this->fullscreen_link;
360 $this->int_link_def_type = $a_type;
361 $this->int_link_def_id = $a_id;
366 $this->int_link_return = $a_return;
371 $this->change_comments = $a_enabled;
385 $this->offline_directory = $offdir;
394 return $this->offline_directory;
406 $this->view_page_link = $a_link;
407 $this->view_page_target = $a_target;
415 return $this->view_page_link;
423 return $this->view_page_target;
428 $this->act_obj =& $a_obj;
429 $this->act_meth = $a_meth;
434 $this->activated = $a_act;
444 $this->activation = $a_act;
460 $this->enabledinternallinks = $a_enabledinternallinks;
480 $this->editpreview = $a_editpreview;
500 $this->preventhtmlunmasking = $a_preventhtmlunmasking;
510 return $this->preventhtmlunmasking;
520 $this->enabledtabs = $a_enabledtabs;
540 $this->enabledrepositoryobjects = $a_enabledrepositoryobjects;
550 return $this->enabledrepositoryobjects;
560 $this->enabledmaps = $a_enabledmaps;
570 return $this->enabledmaps;
580 $this->enabledpctabs = $a_enabledpctabs;
600 $this->enabledfilelists = $a_enabledfilelists;
610 return $this->enabledfilelists;
620 $this->enabledpagefocus = $a_enabledpagefocus;
630 return $this->enabledpagefocus;
640 $this->exp_frame = $a_exp_frame;
641 $this->exp_id = $a_exp_id;
642 $this->exp_target_script = $a_exp_target_script;
652 $this->prependinghtml = $a_prependinghtml;
662 return $this->prependinghtml;
672 $this->enablewikilinks = $a_enablewikilinks;
682 return $this->enablewikilinks;
692 $this->enableediting = $a_enableediting;
712 $this->rawpagecontent = $a_rawpagecontent;
735 $a_observer_obj = NULL, $a_observer_func =
"")
737 $this->use_meta_data =
true;
738 $this->meta_data_rep_obj_id = $a_rep_obj_id;
739 $this->meta_data_sub_obj_id = $a_sub_obj_id;
740 $this->meta_data_type = $a_type;
741 $this->meta_data_observer_obj = $a_observer_obj;
742 $this->meta_data_observer_func = $a_observer_func;
753 global $ilPluginAdmin;
757 foreach ($pl_names as $pl_name)
760 "COPage",
"pgcp", $pl_name);
761 if ($plugin->isValidParentType($this->getPageObject()->getParentType()))
763 $xml =
'<ComponentPlugin Name="'.$plugin->getPluginName().
770 $xml =
"<ComponentPlugins>".$xml.
"</ComponentPlugins>";
784 $next_class = $this->ctrl->getNextClass($this);
786 $cmd = $this->ctrl->getCmd();
791 $ilCtrl->setReturn($this,
"edit");
795 case 'ilmdeditorgui':
797 $ilTabs->setTabActive(
"meta_data");
798 include_once
'Services/MetaData/classes/class.ilMDEditorGUI.php';
800 $this->meta_data_sub_obj_id, $this->meta_data_type);
801 if (is_object($this->meta_data_observer_obj))
803 $md_gui->addObserver($this->meta_data_observer_obj,
804 $this->meta_data_observer_func,
"General");
806 $this->ctrl->forwardCommand($md_gui);
809 case "ileditclipboardgui":
813 $clip_gui->setPageBackTitle($this->page_back_title);
815 $ret =& $this->ctrl->forwardCommand($clip_gui);
818 case 'ilpublicuserprofilegui':
819 require_once
'./Services/User/classes/class.ilPublicUserProfileGUI.php';
821 $ret = $this->ctrl->forwardCommand($profile_gui);
824 case "ilpageeditorgui":
828 $ilCtrl->redirect($this,
"preview");
831 $page_editor->setLocator($this->locator);
832 $page_editor->setHeader($this->
getHeader());
833 $page_editor->setPageBackTitle($this->page_back_title);
834 $page_editor->setIntLinkHelpDefault($this->int_link_def_type,
835 $this->int_link_def_id);
836 $page_editor->setIntLinkReturn($this->int_link_return);
838 $ret =& $this->ctrl->forwardCommand($page_editor);
842 $cmd = $this->ctrl->getCmd(
"preview");
852 $act_meth = $this->act_meth;
853 $this->act_obj->$act_meth(
false);
854 $this->ctrl->redirectByClass(
"illmpageobjectgui",
"edit");
859 $act_meth = $this->act_meth;
860 $this->act_obj->$act_meth(
true);
861 $this->ctrl->redirectByClass(
"illmpageobjectgui",
"edit");
871 $ilBench->start(
"ContentPresentation",
"ilPageObjectGUI_showPage");
879 $tpl =
new ilTemplate(
"tpl.page_edit_wysiwyg.html",
true,
true,
"Services/COPage");
883 $tpl->setVariable(
"CLASS_PAGE_TD",
"ilc_Page");
888 $tpl->setCurrentBlock(
"change_comment");
889 $tpl->setVariable(
"TXT_ADD_COMMENT", $this->lng->txt(
"cont_add_change_comment"));
890 $tpl->parseCurrentBlock();
891 $tpl->setCurrentBlock(
"adm_content");
895 if ($this->exp_frame !=
"")
897 $tpl->setCurrentBlock(
"updater");
898 $tpl->setVariable(
"UPDATER_FRAME", $this->exp_frame);
899 $tpl->setVariable(
"EXP_ID_UPDATER", $this->exp_id);
900 $tpl->setVariable(
"HREF_UPDATER", $this->exp_target_script);
901 $tpl->parseCurrentBlock();
909 $tpl->setVariable(
"WYSIWYG_ACTION",
910 $ilCtrl->getFormActionByClass(
"ilpageeditorgui",
"",
"",
true));
914 $tpl->setVariable(
"TXT_JAVA_SCRIPT_CAPABLE",
"<br />".$this->lng->txt(
"cont_browser_not_js_capable"));
916 $tpl->setVariable(
"TXT_CHANGE_EDIT_MODE", $this->lng->txt(
"cont_set_edit_mode"));
920 $tpl->setCurrentBlock(
"de_activate_page");
923 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_deactivate_page"));
924 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"deactivatePage");
928 $tpl->setVariable(
"TXT_DE_ACTIVATE_PAGE", $this->lng->txt(
"cont_activate_page"));
929 $tpl->setVariable(
"CMD_DE_ACTIVATE_PAGE",
"activatePage");
931 $tpl->parseCurrentBlock();
934 $med_mode = array(
"enable" => $this->lng->txt(
"cont_enable_media"),
935 "disable" => $this->lng->txt(
"cont_disable_media"));
936 $sel_media_mode = ($ilUser->getPref(
"ilPageEditor_MediaMode") ==
"disable")
940 $js_mode = array(
"enable" => $this->lng->txt(
"cont_enable_js"),
941 "disable" => $this->lng->txt(
"cont_disable_js"));
943 $tpl->setVariable(
"SEL_MEDIA_MODE",
948 $html_mode = array(
"enable" => $this->lng->txt(
"cont_enable_html"),
949 "disable" => $this->lng->txt(
"cont_disable_html"));
950 $sel_html_mode = ($ilUser->getPref(
"ilPageEditor_HTMLMode") ==
"disable")
955 $tpl->setVariable(
"SEL_HTML_MODE",
961 $tpl->setVariable(
"TXT_CONFIRM_DELETE", $lng->txt(
"cont_confirm_delete"));
965 $tpl->setCurrentBlock(
"view_link");
966 $tpl->setVariable(
"LINK_VIEW_PAGE",
968 $tpl->setVariable(
"TARGET_VIEW_PAGE",
970 $tpl->setVariable(
"TXT_VIEW_PAGE", $this->lng->txt(
"view"));
971 $tpl->parseCurrentBlock();
975 $sel_js_mode =
"disable";
976 if($ilSetting->get(
"enable_js_edit", 1))
984 if ($sel_js_mode ==
"enable")
987 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
990 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilcopagecallback.js");
992 $GLOBALS[
"tpl"]->addJavaScript(
"./Services/COPage/js/ilpageedit.js");
994 $GLOBALS[
"tpl"]->addJavascript(
"Services/COPage/js/page_editing.js");
995 $tpl->touchBlock(
"init_dragging");
998 if($ilias->getSetting(
"enable_js_edit"))
1000 $tpl->setVariable(
"SEL_JAVA_SCRIPT",
1002 0,
"ilEditSelect"));
1006 $tpl->setCurrentBlock(
"multi_actions");
1007 if ($sel_js_mode ==
"enable")
1009 $tpl->setVariable(
"ONCLICK_DE_ACTIVATE_SELECTED",
'onclick="return ilEditMultiAction(\'activateSelected\');"');
1010 $tpl->setVariable(
"ONCLICK_DELETE_SELECTED",
'onclick="return ilEditMultiAction(\'deleteSelected\');"');
1012 $tpl->setVariable(
"TXT_DE_ACTIVATE_SELECTED", $this->lng->txt(
"cont_ed_enable"));
1013 $tpl->setVariable(
"TXT_DELETE_SELECTED", $this->lng->txt(
"cont_delete_selected"));
1015 $tpl->parseCurrentBlock();
1021 $tpl =
new ilTemplate(
"tpl.page_translation_content.html",
true,
true,
"Services/COPage");
1028 $tpl =
new ilTemplate(
"tpl.page_content.html",
true,
true,
"Services/COPage");
1031 $tpl->touchBlock(
"page_focus");
1036 $tpl =
new ilTemplate(
"tpl.page_preview.html",
true,
true,
"Services/COPage");
1039 if (
$_GET[
"old_nr"] > 0)
1045 if (is_array($hist_info[
"previous"]))
1047 $tpl->setCurrentBlock(
"previous_rev");
1048 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1049 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"previous"][
"nr"]);
1050 $tpl->setVariable(
"HREF_PREV",
1051 $ilCtrl->getLinkTarget($this,
"preview"));
1052 $tpl->parseCurrentBlock();
1056 $tpl->setCurrentBlock(
"previous_rev_disabled");
1057 $tpl->setVariable(
"TXT_PREV_REV", $lng->txt(
"cont_previous_rev"));
1058 $tpl->parseCurrentBlock();
1062 $tpl->setCurrentBlock(
"next_rev");
1063 $tpl->setVariable(
"TXT_NEXT_REV", $lng->txt(
"cont_next_rev"));
1064 $ilCtrl->setParameter($this,
"old_nr", $hist_info[
"next"][
"nr"]);
1065 $tpl->setVariable(
"HREF_NEXT",
1066 $ilCtrl->getLinkTarget($this,
"preview"));
1067 $tpl->parseCurrentBlock();
1070 $tpl->setCurrentBlock(
"latest_rev");
1071 $tpl->setVariable(
"TXT_LATEST_REV", $lng->txt(
"cont_latest_rev"));
1072 $ilCtrl->setParameter($this,
"old_nr",
"");
1073 $tpl->setVariable(
"HREF_LATEST",
1074 $ilCtrl->getLinkTarget($this,
"preview"));
1075 $tpl->parseCurrentBlock();
1077 $tpl->setCurrentBlock(
"hist_nav");
1078 $tpl->setVariable(
"TXT_REVISION", $lng->txt(
"cont_revision"));
1079 $tpl->setVariable(
"VAL_REVISION_DATE",
1083 $tpl->setVariable(
"VAL_REV_USER",
1084 $name[
"lastname"].
", ".$name[
"firstname"].
" [".$login.
"]");
1085 $tpl->parseCurrentBlock();
1095 $tpl->setVariable(
"FORMACTION", $this->ctrl->getFormActionByClass(
"ilpageeditorgui"));
1102 $this->obj->getId());
1103 $mob_links = array();
1104 foreach($links as $link)
1106 if ($link[
"type"] ==
"mob")
1115 if (count($mob_links) > 0)
1117 $tpl->setCurrentBlock(
"med_link");
1118 $tpl->setVariable(
"TXT_LINKED_MOBS", $this->lng->txt(
"cont_linked_mobs"));
1119 $tpl->setVariable(
"SEL_MED_LINKS",
1121 $tpl->setVariable(
"TXT_EDIT_MEDIA", $this->lng->txt(
"cont_edit_mob"));
1122 $tpl->setVariable(
"TXT_COPY_TO_CLIPBOARD", $this->lng->txt(
"cont_copy_to_clipboard"));
1124 $tpl->parseCurrentBlock();
1128 if (
$_GET[
"reloadTree"] ==
"y")
1130 $tpl->setCurrentBlock(
"reload_tree");
1131 if ($this->obj->getParentType() ==
"dbk")
1133 $tpl->setVariable(
"LINK_TREE",
1134 $this->ctrl->getLinkTargetByClass(
"ilobjdlbookgui",
"explorer"));
1138 $tpl->setVariable(
"LINK_TREE",
1139 $this->ctrl->getLinkTargetByClass(
"ilobjlearningmodulegui",
"explorer"));
1141 $tpl->parseCurrentBlock();
1146 $builded = $this->obj->buildDom();
1153 if (!$this->obj->checkPCIds())
1155 $this->obj->insertPCIds();
1156 $this->obj->update(
true,
true);
1159 $this->obj->addFileSizes();
1160 $this->obj->addHierIDs();
1162 $hids = $this->obj->getHierIds();
1163 $row1_ids = $this->obj->getFirstRowIds();
1164 $col1_ids = $this->obj->getFirstColumnIds();
1165 $litem_ids = $this->obj->getListItemIds();
1166 $fitem_ids = $this->obj->getFileItemIds();
1169 $hids = $this->obj->getHierIds();
1170 foreach($hids as $hid)
1172 $tpl->setCurrentBlock(
"add_dhtml");
1173 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_".$hid);
1174 $tpl->parseCurrentBlock();
1178 foreach($col1_ids as $hid)
1180 $tpl->setCurrentBlock(
"add_dhtml");
1181 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_r".$hid);
1182 $tpl->parseCurrentBlock();
1186 foreach($row1_ids as $hid)
1188 $tpl->setCurrentBlock(
"add_dhtml");
1189 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_c".$hid);
1190 $tpl->parseCurrentBlock();
1194 foreach($litem_ids as $hid)
1196 $tpl->setCurrentBlock(
"add_dhtml");
1197 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1198 $tpl->parseCurrentBlock();
1202 foreach($fitem_ids as $hid)
1204 $tpl->setCurrentBlock(
"add_dhtml");
1205 $tpl->setVariable(
"CONTEXTMENU",
"contextmenu_i".$hid);
1206 $tpl->parseCurrentBlock();
1211 $this->obj->addFileSizes();
1218 if (!$this->link_xml_set)
1226 $content = $this->obj->getXMLFromDom(
false,
true,
true,
1227 $link_xml.$this->getQuestionXML());
1232 if($builded !==
true)
1245 session_unregister(
"citation_error");
1265 $enlarge_path =
"images/enlarge.gif";
1269 ?
"ilc_PrintPageTitle"
1274 $enable_split_new = ($this->obj->getParentType() ==
"lm" ||
1275 $this->obj->getParentType() ==
"dbk")
1281 if (($this->obj->getParentType() ==
"lm" ||
1282 $this->obj->getParentType() ==
"dbk") &&
1284 $this->obj->getId()))
1286 $enable_split_next =
"y";
1290 $enable_split_next =
"n";
1295 $paragraph_plugins->initialize ();
1299 $paragraph_plugin_string = $paragraph_plugins->serializeToString();
1300 $_SESSION [
"paragraph_plugins"] = $paragraph_plugins;
1310 include_once(
"./Services/YUI/classes/class.ilYuiUtil.php");
1319 $file_download_link = $ilCtrl->getLinkTarget($this,
"downloadFile");
1325 $fullscreen_link = $ilCtrl->getLinkTarget($this,
"displayMediaFullscreen");
1328 if ($this->sourcecode_download_script ==
"" && $this->
getOutputMode() !=
"offline")
1330 $this->sourcecode_download_script = $ilCtrl->getLinkTarget($this,
"");
1333 ? $ilUser->getPref(
"ilPageEditor_MediaMode")
1337 $params = array (
'mode' => $this->
getOutputMode(),
'pg_title' => htmlentities($pg_title,ENT_QUOTES,
"UTF-8"),
1338 'pg_id' => $this->obj->getId(),
'pg_title_class' => $pg_title_class,
1339 'webspace_path' => $wb_path,
'enlarge_path' => $enlarge_path,
1340 'img_add' => $add_path,
1341 'img_col' => $col_path,
1342 'img_row' => $row_path,
1343 'img_item' => $item_path,
1344 'enable_split_new' => $enable_split_new,
1345 'enable_split_next' => $enable_split_next,
1347 'file_download_link' => $file_download_link,
1348 'fullscreen_link' => $fullscreen_link,
1349 'med_disabled_path' => $med_disabled_path,
1350 'img_path' => $img_path,
1351 'parent_id' => $this->obj->getParentId(),
1353 'encoded_download_script' => urlencode($this->sourcecode_download_script),
1356 'pagebreak' => $this->lng->txt(
'dgl_pagebreak'),
1357 'page' => $this->lng->txt(
'page'),
1358 'citate_page' => $this->lng->txt(
'citate_page'),
1359 'citate_from' => $this->lng->txt(
'citate_from'),
1360 'citate_to' => $this->lng->txt(
'citate_to'),
1361 'citate' => $this->lng->txt(
'citate'),
1366 'media_mode' => $media_mode,
1367 'javascript' => $sel_js_mode,
1368 'paragraph_plugins' => $paragraph_plugin_string);
1370 if($this->link_frame !=
"")
1371 $params[
"pg_frame"] = $this->link_frame;
1379 $params[
"incl_elements_date"] = $this->obj->getLastUpdateOfIncludedElements();
1383 $md5 = md5(serialize($params).$link_xml);
1390 $md5 == $this->obj->getRenderMd5() &&
1391 ($this->obj->getLastChange() < $this->obj->getRenderedTime()) &&
1392 $this->obj->getRenderedTime() !=
"0000-00-00 00:00:00" &&
1393 $this->obj->old_nr == 0)
1396 $output = $this->obj->getRenderedContent();
1400 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1401 $args = array(
'/_xml' => $content,
'/_xsl' => $xsl );
1405 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl", NULL, $args, $params);
1408 && $this->obj->old_nr == 0)
1411 $this->obj->writeRenderedContent($output, $md5);
1422 $ilUser->getPref(
"ilPageEditor_HTMLMode") !=
"disable")
1425 $output = str_replace(
"<",
"<",$output);
1426 $output = str_replace(
">",
">",$output);
1428 $output = str_replace(
"&",
"&", $output);
1443 $output = str_replace(
"{",
"{", $output);
1444 $output = str_replace(
"}",
"}", $output);
1450 $output = str_replace(
"\n",
"", $output);
1459 $output = str_replace(
"[[[[[Question;]]]]]", $qhtml, $output);
1469 $output =
'<div class="il_editarea_disabled">'.$output.
'</div>';
1473 $output = $this->obj->insertSourceCodeParagraphs($output, $this->
getOutputMode());
1475 $ilBench->stop(
"ContentPresentation",
"ilPageObjectGUI_showPage");
1478 if ($ilCtrl->isAsynch())
1485 $tpl->setCurrentBlock(
"adm_content");
1486 $tpl->parseCurrentBlock();
1487 echo
$tpl->get(
"adm_content");
1517 $link_info =
"<IntLinkInfos>";
1518 $targetframe =
"None";
1519 foreach ($int_links as $int_link)
1521 $target = $int_link[
"Target"];
1522 if (substr($target, 0, 4) ==
"il__")
1526 $type = $int_link[
"Type"];
1531 case "StructureObject":
1534 if ($type ==
"PageObject")
1536 $href =
"./goto.php?target=pg_".$target_id;
1540 $href =
"./goto.php?target=st_".$target_id;
1544 case "GlossaryItem":
1546 $href =
"./goto.php?target=git_".$target_id;
1554 case "RepositoryItem":
1558 $href =
"./goto.php?target=".$obj_type.
"_".
$target_id;
1562 $link_info.=
"<IntLinkInfo Target=\"$target\" Type=\"$type\" ".
1563 "TargetFrame=\"$targetframe\" LinkHref=\"$href\" LinkTarget=\"$ltarget\" />";
1566 $link_info.=
"</IntLinkInfos>";
1576 require_once(
"./Modules/File/classes/class.ilObjFile.php");
1578 $fileObj->sendFile();
1587 $tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Modules/LearningModule");
1588 $tpl->setCurrentBlock(
"ilMedia");
1596 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1598 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
1600 $pg_obj->buildDom();
1605 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
1610 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1611 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
1618 $params = array (
'mode' =>
"fullscreen",
'enlarge_path' => $enlarge_path,
1619 'link_params' =>
"ref_id=".
$_GET[
"ref_id"],
'fullscreen_link' =>
"",
1620 'ref_id' =>
$_GET[
"ref_id"],
'webspace_path' => $wb_path);
1621 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
1626 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
1629 $tpl->setVariable(
"MEDIA_CONTENT", $output);
1640 $pg_obj->send_paragraph(
$_GET[
"par_id"],
$_GET[
"downloadtitle"]);
1649 $start = strpos($a_html,
"[[[[[Map;");
1652 $end = strpos($a_html,
"]]]]]", $start);
1657 $param = substr($a_html, $start + 9, $end - $start - 9);
1659 $param = explode(
";", $param);
1660 if (is_numeric($param[0]) && is_numeric($param[1]) && is_numeric($param[2]))
1662 include_once(
"./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
1664 $map_gui->setMapId(
"map_".$i);
1665 $map_gui->setLatitude($param[0]);
1666 $map_gui->setLongitude($param[1]);
1667 $map_gui->setZoom($param[2]);
1668 $map_gui->setWidth($param[3].
"px");
1669 $map_gui->setHeight($param[4].
"px");
1670 $map_gui->setEnableTypeControl(
true);
1671 $map_gui->setEnableNavigationControl(
true);
1672 $map_gui->setEnableCentralMarker(
true);
1673 $h2 = substr($a_html, 0, $start).
1674 $map_gui->getHtml().
1675 substr($a_html, $end + 5);
1679 $start = strpos($a_html,
"[[[[[Map;", $start + 5);
1683 $end = strpos($a_html,
"]]]]]", $start);
1706 $a_tpl->setCurrentBlock(
"help_img");
1708 $a_tpl->parseCurrentBlock();
1709 $a_tpl->setCurrentBlock(
"help_item");
1710 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_add_elements"));
1711 $a_tpl->parseCurrentBlock();
1713 $a_tpl->setCurrentBlock(
"help_img");
1715 $a_tpl->parseCurrentBlock();
1716 $a_tpl->setCurrentBlock(
"help_img");
1718 $a_tpl->parseCurrentBlock();
1719 $a_tpl->setCurrentBlock(
"help_item");
1720 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_drag_and_drop_elements"));
1721 $a_tpl->parseCurrentBlock();
1723 $a_tpl->setCurrentBlock(
"help_img");
1725 $a_tpl->parseCurrentBlock();
1726 $a_tpl->setCurrentBlock(
"help_item");
1727 $a_tpl->setVariable(
"TXT_HELP", $lng->txt(
"cont_double_click_to_delete"));
1728 $a_tpl->parseCurrentBlock();
1730 $a_tpl->setCurrentBlock(
"help");
1731 $a_tpl->parseCurrentBlock();
1754 $ilCtrl->redirect($this,
"preview");
1783 $this->tpl =
new ilTemplate(
"tpl.fullscreen.html",
true,
true,
"Services/COPage");
1784 $this->tpl->setCurrentBlock(
"ContentStyle");
1785 $this->tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET", 0);
1786 $this->tpl->parseCurrentBlock();
1790 $this->tpl->setCurrentBlock(
"ilMedia");
1792 require_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1794 if (!empty (
$_GET[
"pg_id"]))
1796 require_once(
"./Services/COPage/classes/class.ilPageObject.php");
1803 $xml.= $pg_obj->getMediaAliasElement(
$_GET[
"mob_id"]);
1817 $xsl = file_get_contents(
"./Services/COPage/xsl/page.xsl");
1818 $args = array(
'/_xml' => $xml,
'/_xsl' => $xsl );
1826 $mode =
"fullscreen";
1827 $params = array (
'mode' => $mode,
'webspace_path' => $wb_path);
1828 $output =
xslt_process($xh,
"arg:/_xml",
"arg:/_xsl",NULL,$args, $params);
1833 $this->tpl->setVariable(
"MEDIA_CONTENT", $output);
1843 if(is_array($a_error))
1845 $error_str =
"<b>Validation Error(s):</b><br>";
1846 foreach ($a_error as $error)
1848 $err_mess = implode($error,
" - ");
1849 if (!is_int(strpos($err_mess,
":0:")))
1851 $error_str .= htmlentities($err_mess).
"<br />";
1854 $this->tpl->setVariable(
"MESSAGE", $error_str);
1865 $tpl->addJavaScript(
"./Services/COPage/js/page_history.js");
1867 include_once(
"./Services/COPage/classes/class.ilPageHistoryTableGUI.php");
1869 $table_gui->setId(
"hist_table");
1871 $entries[] = array(
'page_id' => $this->
getPageObject()->getId(),
1876 'sortkey' => 999999,
1878 $table_gui->setData($entries);
1879 return $table_gui->getHTML();
1889 include_once(
"Services/Utilities/classes/class.ilConfirmationGUI.php");
1893 $ilCtrl->setParameter($this,
"rollback_nr",
$_GET[
"old_nr"]);
1894 $c_gui->setFormAction($ilCtrl->getFormAction($this,
"rollback"));
1895 $c_gui->setHeaderText($lng->txt(
"cont_rollback_confirmation"));
1896 $c_gui->setCancel($lng->txt(
"cancel"),
"history");
1897 $c_gui->setConfirm($lng->txt(
"confirm"),
"rollback");
1899 $hentry = $this->obj->getHistoryEntry(
$_GET[
"old_nr"]);
1901 $c_gui->addItem(
"id[]",
$_GET[
"old_nr"],
1904 $tpl->setContent($c_gui->getHTML());
1914 $hentry = $this->obj->getHistoryEntry(
$_GET[
"rollback_nr"]);
1916 if ($hentry[
"content"] !=
"")
1918 $this->obj->setXMLContent($hentry[
"content"]);
1919 $this->obj->buildDom(
true);
1920 if ($this->obj->update())
1922 $ilCtrl->redirect($this,
"history");
1925 $ilCtrl->redirect($this,
"history");
1947 $ilTabs->addTarget(
"pg", $ilCtrl->getLinkTarget($this,
"preview")
1948 , array(
"",
"preview"));
1952 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
1953 , array(
"",
"edit"));
1960 $ilTabs->addTarget(
"edit", $ilCtrl->getLinkTarget($this,
"edit")
1961 , array(
"",
"edit"));
1964 $ilTabs->addTarget(
"cont_preview", $ilCtrl->getLinkTarget($this,
"preview")
1965 , array(
"",
"preview"));
1971 if ($this->use_meta_data)
1973 $ilTabs->addTarget(
"meta_data",
1974 $this->ctrl->getLinkTargetByClass(
'ilmdeditorgui',
''),
1975 "",
"ilmdeditorgui");
1980 $ilTabs->addTarget(
"history", $this->ctrl->getLinkTarget($this,
"history")
1981 ,
"history", get_class($this));
1993 $ilTabs->addTarget(
"clipboard", $this->ctrl->getLinkTargetByClass(
"ilEditClipboardGUI",
"view")
1994 ,
"view",
"ilEditClipboardGUI");
2007 $tpl =
new ilTemplate(
"tpl.page_compare.html",
true,
true,
"Services/COPage");
2008 $compare = $this->obj->compareVersion($_POST[
"left"], $_POST[
"right"]);
2011 $lpage = $compare[
"l_page"];
2014 $lpage_gui->setPageObject($lpage);
2015 $lpage_gui->setPreventHTMLUnmasking(
true);
2016 $lhtml = $lpage_gui->showPage();
2018 $lhtml = str_replace(
"<br />",
"<br />", $lhtml);
2019 $tpl->setVariable(
"LEFT", $lhtml);
2022 $rpage = $compare[
"r_page"];
2025 $rpage_gui->setPageObject($rpage);
2026 $rpage_gui->setPreventHTMLUnmasking(
true);
2027 $rhtml = $rpage_gui->showPage();
2029 $rhtml = str_replace(
"<br />",
"<br />", $rhtml);
2030 $tpl->setVariable(
"RIGHT", $rhtml);
2032 $tpl->setVariable(
"TXT_NEW", $lng->txt(
"cont_pc_new"));
2033 $tpl->setVariable(
"TXT_MODIFIED", $lng->txt(
"cont_pc_modified"));
2034 $tpl->setVariable(
"TXT_DELETED", $lng->txt(
"cont_pc_deleted"));
2044 $a_html = str_replace(
"[ilDiffInsStart]",
'<span class="ilDiffIns">', $a_html);
2045 $a_html = str_replace(
"[ilDiffDelStart]",
'<span class="ilDiffDel">', $a_html);
2046 $a_html = str_replace(
"[ilDiffInsEnd]",
'</span>', $a_html);
2047 $a_html = str_replace(
"[ilDiffDelEnd]",
'</span>', $a_html);