23 $this->wiki_gui = $a_wiki_gui;
24 $this->wiki = $a_wiki_gui->object;
38 include_once(
"./Services/Export/classes/class.ilExport.php");
43 $this->subdir = $this->wiki->getType().
"_".$this->wiki->getId();
44 $this->export_dir = $exp_dir.
"/".$this->subdir;
51 include_once(
"./Services/Style/classes/class.ilSystemStyleHTMLExport.php");
53 $this->sys_style_html_export->addImage(
"icon_wiki_b.png");
54 $this->sys_style_html_export->export();
57 include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
59 $this->co_page_html_export->setContentStyleId(
60 $this->wiki->getStyleSheetId());
61 $this->co_page_html_export->createDirectories();
62 $this->co_page_html_export->exportStyles();
63 $this->co_page_html_export->exportSupportScripts();
74 "/".$date.
"__".IL_INST_ID.
"__".
75 $this->wiki->getType().
"_".$this->wiki->getId().
".zip";
90 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
91 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
92 foreach ($pages as $page)
97 $this->co_page_html_export->collectPageElements(
"wpg:pg", $page[
"id"]);
100 $this->co_page_html_export->exportPageElements();
110 $ilTabs->clearTargets();
112 $this->tpl = $this->co_page_html_export->getPreparedMainTemplate();
114 $this->tpl->getStandardTemplate();
115 $file = $this->export_dir.
"/wpg_".$a_page_id.
".html";
123 include_once(
"./Modules/Wiki/classes/class.ilWikiPageGUI.php");
125 $wpg_gui->setOutputMode(
"offline");
126 $wpg_gui->setPageToc($this->wiki->getPageToc());
127 $page_content = $wpg_gui->showPage();
130 $ep_tpl =
new ilTemplate(
"tpl.export_page.html",
true,
true,
132 $ep_tpl->setVariable(
"PAGE_CONTENT", $page_content);
135 include_once(
"./Modules/Wiki/classes/class.ilWikiImportantPagesBlockGUI.php");
137 $ep_tpl->setVariable(
"RIGHT_CONTENT", $bl->getHTML(
true));
141 $this->tpl->setVariable(
"MAINMENU",
"");
143 $this->tpl->setTitle($this->wiki->getTitle());
144 $this->tpl->setTitleIcon(
"./images/icon_wiki_b.png",
145 $lng->txt(
"obj_wiki"));
147 $this->tpl->setContent($ep_tpl->get());
149 $content = $this->tpl->get(
"DEFAULT",
false,
false,
false,
154 if (!($fp = @fopen(
$file,
"w+")))
156 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
157 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
164 fwrite($fp, $content);
169 if ($this->wiki->getStartPage() == $wpg_gui->getPageObject()->getTitle())
171 copy(
$file, $this->export_dir.
"/index.html");