24 $this->portfolio_gui = $a_portfolio_gui;
25 $this->
object = $a_object;
39 include_once(
"./Services/Export/classes/class.ilExport.php");
43 $this->subdir = $this->
object->getType().
"_".$this->
object->getId();
44 $this->export_dir = $exp_dir.
"/".$this->subdir;
51 include_once(
"./Services/Style/classes/class.ilSystemStyleHTMLExport.php");
54 $this->sys_style_html_export->export();
57 include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
61 $this->co_page_html_export->createDirectories();
62 $this->co_page_html_export->exportStyles();
63 $this->co_page_html_export->exportSupportScripts();
67 if($prfa_set->get(
"banner"))
69 $banner = $this->
object->getImageFullPath();
70 copy($banner, $this->export_dir.
"/".basename($banner));
75 $ppic = array_shift(explode(
"?", $ppic));
76 copy($ppic, $this->export_dir.
"/".basename($ppic));
88 "/".$date.
"__".IL_INST_ID.
"__".
89 $this->object->getType().
"_".$this->
object->getId().
".zip";
104 require_once
"Services/Portfolio/classes/class.ilPortfolioPage.php";
107 $this->tabs = array();
108 foreach($pages as $page)
113 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
117 $this->tabs[$page[
"id"]] = $page[
"title"];
121 $tpl_callback = array($this,
"buildExportTemplate");
123 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
124 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
126 foreach ($pages as $page)
130 $this->active_tab =
"user_page_".$page[
"id"];
134 $link_template =
"prtf_".$page[
"id"].
"_bl{TYPE}_{ID}.html";
136 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
138 $blog->exportHTMLPages($this->export_dir.
"/", $link_template, $tpl_callback, $this->co_page_html_export,
"prtf_".$page[
"id"].
".html");
143 $this->co_page_html_export->collectPageElements(
"prtf:pg", $page[
"id"]);
148 copy($this->export_dir.
"/prtf_".$page[
"id"].
".html",
149 $this->export_dir.
"/index.html");
154 $this->co_page_html_export->exportPageElements();
161 $this->tpl = $this->co_page_html_export->getPreparedMainTemplate();
162 $this->tpl->getStandardTemplate();
163 $this->tpl->addOnLoadCode(
'il.Tooltip.init();', 3);
166 $this->tpl->setVariable(
"MAINMENU",
"<div style='min-height:40px;'></div>");
167 $this->tpl->setTitle($this->object->getTitle());
169 $ilTabs->clearTargets();
172 foreach($this->tabs as $id => $caption)
174 $ilTabs->addTab(
"user_page_".$id, $caption,
"prtf_".$id.
".html");
177 $ilTabs->activateTab($this->active_tab);
180 include_once
"Services/Portfolio/classes/class.ilObjPortfolioGUI.php";
182 $this->tpl->setFrameFixedWidth(
true);
189 $file = $this->export_dir.
"/".$a_file;
197 $ep_tpl =
new ilTemplate(
"tpl.export_page.html",
true,
true,
198 "Services/Portfolio");
199 $ep_tpl->setVariable(
"PAGE_CONTENT", $a_content);
202 $this->tpl->setContent($ep_tpl->get());
204 if(is_array($a_onload))
206 foreach($a_onload as $item)
208 $this->tpl->addOnLoadCode($item);
213 $content = $this->tpl->get(
"DEFAULT",
false,
false,
false,
217 if (!file_put_contents(
$file, $content))
219 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
220 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
237 include_once
"Services/Portfolio/classes/class.ilPortfolioPageGUI.php";
240 $pgui->setFullscreenLink(
"fullscreen.html");
241 $page_content = $pgui->showPage();
243 $this->
writeExportFile(
"prtf_".$a_post_id.
".html", $page_content, $pgui->getJsOnloadCode());