5 require_once
"./Services/Object/classes/class.ilObject2GUI.php";
6 include_once(
"./Modules/Blog/classes/class.ilBlogPosting.php");
24 function __construct($a_id = 0, $a_id_type = self::REPOSITORY_NODE_ID, $a_parent_node_id = 0)
39 if(!$this->month || !$this->items[$this->month])
41 $this->month = array_keys($this->items);
42 $this->month = array_shift($this->month);
46 $ilCtrl->setParameter($this,
"bmn", $this->month);
49 $lng->loadLanguageModule(
"blog");
50 $ilCtrl->saveParameter($this,
"prvm");
62 unset($forms[self::CFORM_IMPORT]);
63 unset($forms[self::CFORM_CLONE]);
73 $ilCtrl->redirect($this,
"");
87 if($blga_set->get(
"banner"))
89 $dimensions =
" (".$blga_set->get(
"banner_width").
"x".
90 $blga_set->get(
"banner_height").
")";
96 $file = $this->
object->getImageFullPath(
true);
112 $a_values[
"notes"] = $this->
object->getNotesStatus();
113 $a_values[
"ppic"] = $this->
object->hasProfilePicture();
114 $a_values[
"bg_color"] = $this->
object->getBackgroundColor();
115 $a_values[
"font_color"] = $this->
object->getFontColor();
116 $a_values[
"banner"] = $this->
object->getImage();
121 $this->
object->setNotesStatus($a_form->
getInput(
"notes"));
122 $this->
object->setProfilePicture($a_form->
getInput(
"ppic"));
123 $this->
object->setBackgroundColor($a_form->
getInput(
"bg_color"));
124 $this->
object->setFontColor($a_form->
getInput(
"font_color"));
130 if($_FILES[
"banner"][
"tmp_name"])
132 $this->
object->uploadImage($_FILES[
"banner"]);
134 else if($banner->getDeletionFlag())
136 $this->
object->deleteImage();
145 $this->ctrl->setParameter($this,
"wsp_id",$this->node_id);
149 $this->tabs_gui->addTab(
"content",
150 $lng->txt(
"content"),
151 $this->ctrl->getLinkTarget($this,
""));
156 $this->tabs_gui->addTab(
"id_info",
157 $lng->txt(
"info_short"),
158 $this->ctrl->getLinkTargetByClass(array(
"ilobjbloggui",
"ilinfoscreengui"),
"showSummary"));
163 $this->tabs_gui->addTab(
"settings",
164 $lng->txt(
"settings"),
165 $this->ctrl->getLinkTarget($this,
"edit"));
167 $this->tabs_gui->addNonTabbedLink(
"preview", $lng->txt(
"blog_preview"),
168 $this->ctrl->getLinkTarget($this,
"preview"));
182 $ilCtrl->setCmdClass(
"ilblogpostinggui");
184 $ilCtrl->setCmd(
"previewFullscreen");
187 $next_class = $ilCtrl->getNextClass($this);
188 $cmd = $ilCtrl->getCmd();
192 case 'ilblogpostinggui':
193 $ilTabs->setBackTarget($lng->txt(
"back"),
194 $ilCtrl->getLinkTarget($this,
""));
196 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
198 $_GET[
"blpg"],
$_GET[
"old_nr"], $this->object->getNotesStatus() && !$this->disable_notes);
205 $bpost_gui->setEnableEditing(
false);
212 case "previewFullscreen":
213 $ilCtrl->setParameter($this,
"prvm",
"fsc");
217 case "previewEmbedded":
218 $ilCtrl->setParameter($this,
"prvm",
"emb");
223 $this->ctrl->setParameterByClass(
"ilblogpostinggui",
"blpg",
$_GET[
"blpg"]);
224 $this->tabs_gui->addNonTabbedLink(
"preview", $lng->txt(
"blog_preview"),
225 $this->ctrl->getLinkTargetByClass(
"ilblogpostinggui",
"previewFullscreen"));
226 $this->ctrl->setParameterByClass(
"ilblogpostinggui",
"blpg",
"");
230 $ret = $ilCtrl->forwardCommand($bpost_gui);
236 $cmd =
"preview".(($_REQUEST[
"prvm"] ==
"fsc") ?
"Fullscreen" :
"Embedded");
239 $is_owner = $this->
object->getOwner() == $ilUser->getId();
240 $is_active = $bpost_gui->getBlogPosting()->getActive();
243 if((
$cmd ==
"previewFullscreen" ||
$cmd ==
"previewEmbedded")
244 && !$is_owner && !$is_active)
246 $this->ctrl->redirect($this,
"preview");
252 case "previewFullscreen":
259 case "previewEmbedded":
270 $info[] = $lng->txt(
"blog_draft_info");
272 if(
$cmd !=
"history" && !$bpost_gui->getBlogPosting()->getFirstParagraphText())
274 $info[] = $lng->txt(
"blog_new_posting_info");
281 $tpl->setContent(
$ret);
283 $tpl->setRightContent($nav);
289 case "ilinfoscreengui":
298 case "ilcommonactiondispatchergui":
299 include_once(
"Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
301 $this->ctrl->forwardCommand($gui);
305 if(
$cmd !=
"gethtml")
322 $this->ctrl->setCmd(
"showSummary");
323 $this->ctrl->setCmdClass(
"ilinfoscreengui");
334 $ilTabs->activateTab(
"id_info");
338 $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"));
341 include_once(
"./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
344 $info->enablePrivateNotes();
352 $info->enableNewsEditing(
false);
356 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
358 if ($enable_internal_rss)
360 $info->setBlockProperty(
"news",
"settings",
true);
361 $info->setBlockProperty(
"news",
"public_notifications_option",
true);
366 $info->addMetaDataSections($this->object->getId(), 0, $this->
object->getType());
370 $this->ctrl->forwardCommand($info);
384 include_once(
"./Modules/Blog/classes/class.ilBlogPosting.php");
386 $posting->setTitle(
$title);
387 $posting->setBlogId($this->object->getId());
388 $posting->setActive(
false);
392 $ilCtrl->setParameter($this,
"bmn", date(
"Y-m"));
394 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"blpg", $posting->getId());
395 $ilCtrl->redirectByClass(
"ilblogpostinggui",
"edit");
399 $ilCtrl->redirect($this,
"render");
419 $ilTabs->activateTab(
"content");
424 $ilToolbar->setFormAction($ilCtrl->getFormAction($this,
"createPosting"));
426 include_once
"Services/Form/classes/class.ilPropertyFormGUI.php";
428 $ilToolbar->addInputItem(
$title, $lng->txt(
"title"));
430 $ilToolbar->addFormButton($lng->txt(
"blog_add_posting"),
"createPosting");
433 include_once
"Modules/Exercise/classes/class.ilObjExercise.php";
438 foreach($exercises as $exercise)
444 if(!$tree->isSaved($ref_id))
467 if($this->items[$this->month])
469 $is_owner = ($this->
object->getOwner() == $ilUser->getId());
470 $list = $this->
renderList($this->items[$this->month], $this->month,
"preview", null, $is_owner);
471 $nav = $this->
renderNavigation($this->items,
"render",
"preview", null, $is_owner);
474 $tpl->setContent($list);
475 $tpl->setRightContent($nav);
482 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
484 $exercise_id = $ass->getExerciseId();
492 if($ass->getDeadline() && $ass->getDeadline() - time() <= 0)
498 include_once
"classes/class.ilLink.php";
502 $info = sprintf($lng->txt(
"blog_exercise_info"),
504 "<a href=\"".$exc_link.
"\">".
510 $ilCtrl->setParameter($this,
"exc", $exercise_id);
511 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
512 $submit_link = $ilCtrl->getLinkTarget($this,
"finalize");
513 $ilCtrl->setParameter($this,
"ass",
"");
514 $ilCtrl->setParameter($this,
"exc",
"");
515 $info .=
" <a class=\"submit\" href=\"".$submit_link.
"\">".$lng->txt(
"blog_finalize_blog").
"</a>";
522 $submitted = array_pop($submitted);
524 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
525 $dl_link = $ilCtrl->getLinkTarget($this,
"downloadExcSubFile");
526 $ilCtrl->setParameter($this,
"ass",
"");
531 $info .=
"<br />".sprintf($lng->txt(
"blog_exercise_submitted_info"),
533 "<a href=\"".$dl_link.
"\">".$lng->txt(
"download").
"</a>");
543 $ass = $ass->getInstruction();
546 $tooltip .= nl2br($ass);
550 if (count($ass_files) > 0)
552 $tooltip .=
"<br /><br />";
554 foreach($ass_files as
$file)
556 $ilCtrl->setParameter($this,
"ass", $a_assignment_id);
557 $ilCtrl->setParameter($this,
"file", urlencode($file[
"name"]));
558 $dl_link = $ilCtrl->getLinkTarget($this,
"downloadExcAssFile");
559 $ilCtrl->setParameter($this,
"file",
"");
560 $ilCtrl->setParameter($this,
"ass",
"");
562 $tooltip .= $file[
"name"].
": <a href=\"".$dl_link.
"\">".
563 $lng->txt(
"download").
"</a>";
569 $ol_id =
"exc_ass_".$a_assignment_id;
571 include_once
"Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
575 $overlay->setAnchor($ol_id.
"_tr");
576 $overlay->setTrigger($ol_id.
"_tr",
"click", $ol_id.
"_tr");
577 $overlay->setAutoHide(
false);
582 $overlay->addTrigger($ol_id.
"_tr",
"click", $ol_id.
"_tr");
584 $info .=
"<div id=\"".$ol_id.
"_tr\"><a href=\"#\">".$lng->txt(
"exc_instruction").
"</a></div>".
585 "<div id=\"".$ol_id.
"\" style=\"display:none; background-color:white; border: 1px solid #bbb; padding: 10px;\">".$tooltip.
"</div>";
588 return "<div>".$info.
"</div>";
595 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
599 if (count($ass_files) > 0)
601 foreach($ass_files as
$file)
603 if($file[
"name"] == $_GET[
"file"])
618 include_once
"Modules/Exercise/classes/class.ilExAssignment.php";
622 if (count($submitted) > 0)
624 $submitted = array_pop($submitted);
628 $ass->getTitle().
" - ".
629 $user_data[
"firstname"].
" ".
630 $user_data[
"lastname"].
" (".
631 $user_data[
"login"].
").zip";
650 if($this->items[$this->month])
652 $list = $this->
renderList($this->items[$this->month], $this->month,
"previewEmbedded");
675 if($this->items[$this->month])
677 $list = $this->
renderList($this->items[$this->month], $this->month,
"previewFullscreen");
678 $nav = $this->
renderNavigation($this->items,
"preview",
"previewFullscreen");
706 $wtpl =
new ilTemplate(
"tpl.blog_embedded.html",
true,
true,
"Modules/Blog");
707 $wtpl->setVariable(
"VAL_LIST", $a_content);
708 $wtpl->setVariable(
"VAL_NAVIGATION", $a_nav);
720 global
$tpl, $ilUser, $ilTabs, $ilLocator;
722 $owner = $this->
object->getOwner();
724 $ilTabs->clearTargets();
725 $ilLocator->clearItems();
729 if($owner == $ilUser->getId())
732 if(
$_GET[
"baseClass"] ==
"ilPersonalDesktopGUI")
734 $prvm =
$_GET[
"prvm"];
735 $this->ctrl->setParameter($this,
"prvm",
"");
738 $back = $this->ctrl->getLinkTarget($this,
"");
742 $this->ctrl->setParameterByClass(
"ilblogpostinggui",
"bmn", $this->month);
743 $this->ctrl->setParameterByClass(
"ilblogpostinggui",
"blpg",
$_GET[
"blpg"]);
744 $back = $this->ctrl->getLinkTargetByClass(
"ilblogpostinggui",
"preview");
746 $this->ctrl->setParameter($this,
"prvm", $prvm);
751 $back =
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&wsp_id=".$this->node_id;
756 else if($ilUser->getId() && $ilUser->getId() != ANONYMOUS_USER_ID)
758 $back =
"ilias.php?baseClass=ilPersonalDesktopGUI&cmd=jumpToWorkspace&dsh=".$owner;
760 $tpl->setTopBar($back);
765 $tpl->setContent($a_content);
766 $tpl->setRightContent($a_navigation);
767 $tpl->setFrameFixedWidth(
true);
769 echo $tpl->show(
"DEFAULT",
true,
true);
783 $name = $name[
"lastname"].
", ".(
$t = $name[
"title"] ?
$t .
" " :
"").$name[
"firstname"];
788 if($blga_set->get(
"banner"))
790 $banner = $this->
object->getImageFullPath();
791 $banner_width = $blga_set->get(
"banner_width");
792 $banner_height = $blga_set->get(
"banner_height");
795 $banner = basename($banner);
800 if($this->object->hasProfilePicture())
805 $ppic = basename($ppic);
809 include_once(
"./Services/User/classes/class.ilUserUtil.php");
810 $a_tpl->setFullscreenHeader($this->object->getTitle(),
814 $this->
object->getBackgroundColor(),
815 $this->
object->getFontColor(),
848 function renderList(array
$items, $a_month, $a_cmd =
"preview", $a_link_template = null, $a_show_inactive =
false)
852 include_once
"Services/Calendar/classes/class.ilCalendarUtil.php";
853 $wtpl =
new ilTemplate(
"tpl.blog_list.html",
true,
true,
"Modules/Blog");
855 include_once
"Services/Calendar/classes/class.ilCalendarUtil.php";
857 " ".substr($a_month, 0, 4);
858 $wtpl->setVariable(
"TXT_CURRENT_MONTH",
$title);
860 foreach($items as $item)
863 if(!$is_active && !$a_show_inactive)
868 if(!$a_link_template)
870 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"bmn", $this->month);
871 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"blpg", $item[
"id"]);
872 $preview = $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", $a_cmd);
882 include_once(
"./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php");
884 $alist->setId($item[
"id"]);
885 $alist->setListTitle($lng->txt(
"actions"));
886 $alist->addItem($lng->txt(
"edit_content"),
"edit",
887 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui",
"edit"));
888 $alist->addItem($lng->txt(
"rename"),
"rename",
889 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui",
"edittitle"));
890 $alist->addItem($lng->txt(
"delete"),
"delete",
891 $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui",
"deleteBlogPostingConfirmationScreen"));
893 $wtpl->setCurrentBlock(
"actions");
894 $wtpl->setVariable(
"ACTION_SELECTOR", $alist->getHTML());
895 $wtpl->parseCurrentBlock();
899 if($this->object->getNotesStatus() && !$a_link_template && !$this->disable_notes)
902 include_once(
"Services/Notes/classes/class.ilNote.php");
906 if($a_cmd !=
"preview")
908 $wtpl->setCurrentBlock(
"comments");
909 $wtpl->setVariable(
"TEXT_COMMENTS", $lng->txt(
"blog_comments"));
910 $wtpl->setVariable(
"URL_COMMENTS",
$preview);
911 $wtpl->setVariable(
"COUNT_COMMENTS", $count);
912 $wtpl->parseCurrentBlock();
925 if($a_cmd !=
"preview" && $a_cmd !=
"previewEmbedded")
927 $goto = $this->
getAccessHandler()->getGotoLink($this->node_id, $this->obj_id,
"_".$item[
"id"]);
928 $wtpl->setCurrentBlock(
"permalink");
929 $wtpl->setVariable(
"URL_PERMALINK", $goto);
930 $wtpl->setVariable(
"TEXT_PERMALINK", $lng->txt(
"blog_permanent_link"));
931 $wtpl->parseCurrentBlock();
934 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
936 $bpgui->setRawPageContent(
true);
937 $bpgui->setAbstractOnly(
true);
940 $bpgui->setFileDownloadLink(
".");
941 $bpgui->setFullscreenLink(
".");
942 $bpgui->setSourcecodeDownloadScript(
".");
944 $snippet = $bpgui->showPage();
948 $wtpl->setCurrentBlock(
"more");
949 $wtpl->setVariable(
"URL_MORE",
$preview);
950 $wtpl->setVariable(
"TEXT_MORE", $lng->txt(
"blog_list_more"));
951 $wtpl->parseCurrentBlock();
955 $wtpl->setCurrentBlock(
"posting");
959 $wtpl->setVariable(
"DRAFT_CLASS",
" ilBlogListItemDraft");
963 $wtpl->setVariable(
"URL_TITLE",
$preview);
964 $wtpl->setVariable(
"TITLE", $item[
"title"]);
965 $wtpl->setVariable(
"DATETIME",
969 $wtpl->setVariable(
"CONTENT", $snippet);
971 $wtpl->parseCurrentBlock();
983 if($a_cmd ==
"previewFullscreen")
1030 function renderNavigation(array
$items, $a_list_cmd =
"render", $a_posting_cmd =
"preview", $a_link_template = null, $a_show_inactive =
false)
1034 $max_detail_postings = 10;
1036 $wtpl =
new ilTemplate(
"tpl.blog_list_navigation.html",
true,
true,
1039 $wtpl->setVariable(
"NAVIGATION_TITLE", $this->lng->txt(
"blog_navigation"));
1041 $ilCtrl->setParameter($this,
"blpg",
"");
1043 include_once
"Services/Calendar/classes/class.ilCalendarUtil.php";
1045 foreach($items as
$month => $postings)
1048 " ".substr(
$month, 0, 4);
1050 if(!$a_link_template)
1052 $ilCtrl->setParameter($this,
"bmn",
$month);
1053 $month_url = $ilCtrl->getLinkTarget($this, $a_list_cmd);
1061 if($counter < $max_detail_postings)
1064 foreach($postings as $id => $posting)
1067 if(!$is_active && !$a_show_inactive)
1077 if(!$a_link_template)
1079 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"bmn",
$month);
1080 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"blpg", $id);
1081 $url = $ilCtrl->getLinkTargetByClass(
"ilblogpostinggui", $a_posting_cmd);
1090 $wtpl->setCurrentBlock(
"navigation_item_draft");
1091 $wtpl->setVariable(
"NAV_ITEM_DRAFT", $this->lng->txt(
"blog_draft"));
1092 $wtpl->parseCurrentBlock();
1095 $wtpl->setCurrentBlock(
"navigation_item");
1096 $wtpl->setVariable(
"NAV_ITEM_URL", $url);
1097 $wtpl->setVariable(
"NAV_ITEM_CAPTION", $caption);
1098 $wtpl->parseCurrentBlock();
1101 $wtpl->setCurrentBlock(
"navigation_month_details");
1102 $wtpl->setVariable(
"NAV_MONTH", $month_name);
1103 $wtpl->setVariable(
"URL_MONTH", $month_url);
1104 $wtpl->parseCurrentBlock();
1109 $wtpl->setCurrentBlock(
"navigation_month");
1110 $wtpl->setVariable(
"MONTH_NAME", $month_name);
1111 $wtpl->setVariable(
"URL_MONTH", $month_url);
1112 $wtpl->setVariable(
"MONTH_COUNT",
sizeof($postings));
1113 $wtpl->parseCurrentBlock();
1117 $ilCtrl->setParameter($this,
"bmn", $this->month);
1118 $ilCtrl->setParameterByClass(
"ilblogpostinggui",
"bmn",
"");
1120 return $wtpl->get();
1131 include_once(
"./Services/Export/classes/class.ilExport.php");
1135 $subdir = $this->
object->getType().
"_".$this->
object->getId();
1136 $export_dir = $exp_dir.
"/".$subdir;
1143 include_once(
"./Services/Style/classes/class.ilSystemStyleHTMLExport.php");
1145 $this->sys_style_html_export->addImage(
"icon_blog_b.gif");
1146 $this->sys_style_html_export->export();
1149 include_once(
"./Services/COPage/classes/class.ilCOPageHTMLExport.php");
1151 $this->co_page_html_export->createDirectories();
1152 $this->co_page_html_export->exportStyles();
1153 $this->co_page_html_export->exportSupportScripts();
1157 if($blga_set->get(
"banner"))
1159 $banner = $this->
object->getImageFullPath();
1160 copy($banner, $export_dir.
"/".basename($banner));
1165 $ppic = array_shift(explode(
"?", $ppic));
1166 copy($ppic, $export_dir.
"/".basename($ppic));
1178 "/".$date.
"__".IL_INST_ID.
"__".
1179 $this->object->getType().
"_".$this->
object->getId().
".zip";
1196 function exportHTMLPages($a_target_directory, $a_link_template = null, $a_tpl_callback = null, $a_co_page_html_export = null, $a_index_name =
"index.html")
1198 if(!$a_link_template)
1200 $a_link_template =
"bl{TYPE}_{ID}.html";
1203 if($a_co_page_html_export)
1205 $this->co_page_html_export = $a_co_page_html_export;
1212 foreach(array_keys($this->items) as
$month)
1215 $list = $this->
renderList($this->items[$month], $month,
"render", $a_link_template);
1217 if(!$a_tpl_callback)
1223 $tpl = call_user_func($a_tpl_callback);
1231 copy(
$file, $a_target_directory.
"/".$a_index_name);
1237 include_once(
"./Services/COPage/classes/class.ilPageContentUsage.php");
1238 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
1240 foreach ($pages as $page)
1244 include_once(
"./Modules/Blog/classes/class.ilBlogPostingGUI.php");
1246 $blp_gui->setOutputMode(
"offline");
1247 $blp_gui->add_date =
true;
1248 $page_content = $blp_gui->showPage();
1251 substr($page[
"created"]->
get(
IL_CAL_DATE), 0, 7));
1255 if(!$a_tpl_callback)
1261 $tpl = call_user_func($a_tpl_callback);
1265 $page_content, $nav, $back);
1267 $this->co_page_html_export->collectPageElements(
"blp:pg", $page[
"id"]);
1270 $this->co_page_html_export->exportPageElements();
1283 if($a_type ==
"list")
1291 $link = str_replace(
"{TYPE}", $a_type, $a_template);
1292 return str_replace(
"{ID}", $a_id, $link);
1303 global $ilTabs,
$lng;
1305 $tpl = $this->co_page_html_export->getPreparedMainTemplate();
1307 $tpl->getStandardTemplate();
1316 $ilTabs->clearTargets();
1319 $ilTabs->setBackTarget($lng->txt(
"back"), $a_back_url);
1323 $tpl->setFrameFixedWidth(
true);
1338 protected function writeExportFile($a_target_directory, $a_file, $a_tpl, $a_content, $a_right_content = null)
1340 $file = $a_target_directory.
"/".$a_file;
1342 if (@is_file(
$file))
1348 $ep_tpl =
new ilTemplate(
"tpl.export_page.html",
true,
true,
1350 $ep_tpl->setVariable(
"PAGE_CONTENT", $a_content);
1353 if($a_right_content)
1355 $ep_tpl->setVariable(
"RIGHT_CONTENT", $a_right_content);
1358 $a_tpl->setContent($ep_tpl->get());
1360 $content = $a_tpl->get(
"DEFAULT",
false,
false,
false,
1364 if (!file_put_contents(
$file, $content))
1366 die (
"<b>Error</b>: Could not open \"".
$file.
"\" for writing".
1367 " in <b>".__FILE__.
"</b> on line <b>".__LINE__.
"</b><br />");
1386 include_once
"Modules/Exercise/classes/class.ilObjExerciseGUI.php";
1388 $exc_gui->submitBlog($this->node_id);
1391 $ilCtrl->redirect($this,
"render");
1405 $this->disable_notes = (bool)$a_value;
1413 if($a_cmd ==
"preview" ||
$_GET[
"prvm"])
1416 if($ilUser->getId() != ANONYMOUS_USER_ID)
1436 $sub_type = $sub_id = null;
1440 $sub_id =
$_GET[
"blpg"];
1447 $lg->enableComments(
false);
1448 $lg->enableNotes(
false);
1449 $lg->enableTags(
false);
1451 include_once
"./Services/Notification/classes/class.ilNotification.php";
1454 $ilCtrl->setParameter($this,
"ntf", 1);
1455 $link = $ilCtrl->getLinkTarget($this,
"setNotification");
1456 $lg->addCustomCommand($link,
"blog_notification_toggle_off");
1458 $lg->addHeaderIcon(
"not_icon",
1460 $this->lng->txt(
"blog_notification_activated"));
1464 $ilCtrl->setParameter($this,
"ntf", 2);
1465 $link = $ilCtrl->getLinkTarget($this,
"setNotification");
1466 $lg->addCustomCommand($link,
"blog_notification_toggle_on");
1468 $lg->addHeaderIcon(
"not_icon",
1470 $this->lng->txt(
"blog_notification_deactivated"));
1481 include_once
"./Services/Notification/classes/class.ilNotification.php";
1482 switch(
$_GET[
"ntf"])
1493 $ilCtrl->redirect($this,
"preview");
1506 include_once
"Modules/Blog/classes/class.ilBlogPosting.php";
1508 if($post->getBlogId() == $a_blog_id)
1510 return $post->getTitle();
1521 foreach($this->items as
$month => $postings)
1523 foreach(array_keys($postings) as $id)
1527 unset($this->items[
$month][$id]);
1530 if(!
sizeof($this->items[
$month]))
1532 unset($this->items[$month]);
1536 if($this->items && !isset($this->items[$this->month]))
1538 $this->month = array_shift(array_keys($this->items));
1551 $id = explode(
"_", $a_target);
1553 $_GET[
"baseClass"] =
"ilsharedresourceGUI";
1554 $_GET[
"wsp_id"] = $id[0];
1555 if(
sizeof($id) == 3)
1557 $_GET[
"gtp"] = $id[1];
1559 include(
"ilias.php");