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");
59 $this->co_page_html_export->setContentStyleId($this->object->getStyleSheetId());
60 $this->co_page_html_export->createDirectories();
61 $this->co_page_html_export->exportStyles();
62 $this->co_page_html_export->exportSupportScripts();
66 if($prfa_set->get(
"banner"))
68 $banner = $this->
object->getImageFullPath();
71 copy($banner, $this->export_dir.
"/".basename($banner));
77 $ppic = array_shift(explode(
"?", $ppic));
78 copy($ppic, $this->export_dir.
"/".basename($ppic));
90 "/".$date.
"__".IL_INST_ID.
"__".
91 $this->object->getType().
"_".$this->
object->getId().
".zip";
106 require_once
"Modules/Portfolio/classes/class.ilPortfolioPage.php";
109 $this->tabs = array();
110 foreach($pages as $page)
115 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
119 $this->tabs[$page[
"id"]] = $page[
"title"];
123 $tpl_callback = array($this,
"buildExportTemplate");
125 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
126 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
127 include_once(
"./Modules/Portfolio/classes/class.ilPortfolioPage.php");
129 foreach ($pages as $page)
133 $this->active_tab =
"user_page_".$page[
"id"];
137 $link_template =
"prtf_".$page[
"id"].
"_bl{TYPE}_{ID}.html";
139 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
141 $blog->exportHTMLPages($this->export_dir.
"/", $link_template, $tpl_callback, $this->co_page_html_export,
"prtf_".$page[
"id"].
".html");
146 $this->co_page_html_export->collectPageElements(
"prtf:pg", $page[
"id"]);
151 copy($this->export_dir.
"/prtf_".$page[
"id"].
".html",
152 $this->export_dir.
"/index.html");
157 $this->co_page_html_export->exportPageElements();
164 $this->tpl = $this->co_page_html_export->getPreparedMainTemplate();
165 $this->tpl->getStandardTemplate();
166 $this->tpl->addOnLoadCode(
'il.Tooltip.init();', 3);
169 $this->tpl->setVariable(
"MAINMENU",
"<div style='min-height:40px;'></div>");
170 $this->tpl->setTitle($this->object->getTitle());
172 $ilTabs->clearTargets();
175 foreach($this->tabs as $id => $caption)
177 $ilTabs->addTab(
"user_page_".$id, $caption,
"prtf_".$id.
".html");
180 $ilTabs->activateTab($this->active_tab);
183 include_once
"Modules/Portfolio/classes/class.ilObjPortfolioGUI.php";
185 $this->tpl->setFrameFixedWidth(
true);
192 $file = $this->export_dir.
"/".$a_file;
200 $ep_tpl =
new ilTemplate(
"tpl.export_page.html",
true,
true,
201 "Modules/Portfolio");
202 $ep_tpl->setVariable(
"PAGE_CONTENT", $a_content);
205 $this->tpl->setContent($ep_tpl->get());
207 if(is_array($a_onload))
209 foreach($a_onload as $item)
211 $this->tpl->addOnLoadCode($item);
216 $content = $this->tpl->get(
"DEFAULT",
false,
false,
false,
220 if (!file_put_contents(
$file, $content))
222 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
223 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
240 include_once
"Modules/Portfolio/classes/class.ilPortfolioPageGUI.php";
243 $pgui->setFullscreenLink(
"fullscreen.html");
244 $page_content = $pgui->showPage();
246 $this->
writeExportFile(
"prtf_".$a_post_id.
".html", $page_content, $pgui->getJsOnloadCode());
static _lookupTitle($a_id)
Portfolio HTML exporter class.
exportHTMLPages()
Export all pages.
HTML export class for pages.
HTML export class for system styles.
_createExportDirectory($a_obj_id, $a_export_type="xml", $a_obj_type="")
Create export directory.
__construct($a_portfolio_gui, $a_object)
Constructor.
Portfolio page gui class.
writeExportFile($a_file, $a_content, $a_onload=null)
static _exists($a_parent_type, $a_id, $a_lang="")
Checks whether page exists.
buildExportFile()
Build export file.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static zip($a_dir, $a_file, $compress_content=false)
zips given directory/file into given zip.file
const WORKSPACE_OBJECT_ID
static makeDir($a_dir)
creates a new directory and inherits all filesystem permissions of the parent directory You may pass ...
static getAllPages($a_portfolio_id)
Get pages of portfolio.
exportPageHTML($a_post_id)
Export page html.
static renderFullscreenHeader($a_portfolio, $a_tpl, $a_user_id, $a_export=false)
Render banner, user name.
static _getPersonalPicturePath($a_usr_id, $a_size="small", $a_force_pic=false, $a_prevent_no_photo_image=false)
Get path to personal picture.
static _getExportDirectory($a_obj_id, $a_type="xml", $a_obj_type="", $a_entity="")
Get export directory for an repository object.
static delDir($a_dir, $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
setOutputMode($a_mode=IL_PAGE_PRESENTATION)
Set Output Mode.