5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
32 $lng->loadLanguageModule(
"news");
33 $ilHelp->addHelpSection(
"news_block");
35 include_once(
"./Services/News/classes/class.ilNewsItem.php");
41 $this->dynamic =
false;
42 include_once(
"./Services/News/classes/class.ilNewsCache.php");
44 $cres = $this->acache->getEntry($ilUser->getId().
":".
$_GET[
"ref_id"]);
45 $this->cache_hit =
false;
47 if ($this->acache->getLastAccessStatus() ==
"hit")
49 self::$st_data = unserialize($cres);
50 $this->cache_hit =
true;
54 $this->dynamic =
true;
59 if (!empty(self::$st_data))
61 $data = self::$st_data;
66 self::$st_data =
$data;
74 $this->
setTitle($lng->txt(
"news_internal_news"));
75 $this->
setRowTemplate(
"tpl.block_row_news_for_context.html",
"Services/News");
77 $this->allow_moving =
false;
88 include_once(
"./Services/News/classes/class.ilNewsCache.php");
98 $news_item->setContextObjId($ilCtrl->getContextObjId());
99 $news_item->setContextObjType($ilCtrl->getContextObjType());
103 $prevent_aggregation =
true;
104 if ($ilCtrl->getContextObjType() !=
"frm")
106 $forum_grouping =
true;
110 $forum_grouping =
false;
114 $news_data = $news_item->getNewsForRefId(
$_GET[
"ref_id"],
false,
false, 0,
115 $prevent_aggregation, $forum_grouping);
117 $this->acache->storeEntry($ilUser->getId().
":".
$_GET[
"ref_id"],
118 serialize($news_data));
132 return self::$block_type;
152 if ($ilCtrl->getCmdClass() ==
"ilnewsitemgui")
157 switch($ilCtrl->getCmd())
182 $next_class = $ilCtrl->getNextClass();
183 $cmd = $ilCtrl->getCmd(
"getHTML");
187 case "ilnewsitemgui":
188 include_once(
"./Services/News/classes/class.ilNewsItemGUI.php");
191 $html = $ilCtrl->forwardCommand($news_item_gui);
195 return $this->
$cmd();
206 $this->enable_edit = $a_enable_edit;
216 return $this->enable_edit;
230 parent::fillDataSection();
246 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
264 if ($enable_internal_rss)
266 include_once(
"./Services/News/classes/class.ilRSSButtonGUI.php");
268 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&".
269 "ref_id=".
$_GET[
"ref_id"],
296 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"editNews"),
299 $ilCtrl->setParameter($this,
"add_mode",
"block");
301 $ilCtrl->getLinkTargetByClass(
"ilnewsitemgui",
"createNewsItem"),
303 $ilCtrl->setParameter($this,
"add_mode",
"");
309 $ilCtrl->getLinkTarget($this,
"editSettings"),
310 $lng->txt(
"settings"));
326 && (!$news_set->get(
"enable_rss_for_internal") ||
328 0, $this->block_id)))
334 if ($ilUser->getPref(
"il_feed_js") ==
"n")
339 return parent::getHTML().$en;
349 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
354 $got_notices = $got_messages =
false;
355 foreach($this->data as
$row)
357 if ($row[
"priority"] == 0) $got_notices =
true;
358 if ($row[
"priority"] == 1) $got_messages =
true;
360 $this->show_view_selection =
false;
362 if ($got_notices && $got_messages)
364 $this->show_view_selection =
true;
366 else if ($got_notices)
397 $this->tpl->setCurrentBlock(
"long");
399 $this->tpl->setVariable(
"VAL_CREATION_DATE",
401 $this->tpl->parseCurrentBlock();
405 if ($news[
"priority"] == 0)
416 if ($news[
"ref_id"] > 0)
418 if ($news[
"agg_ref_id"] > 0)
422 $context_ref = $news[
"agg_ref_id"];
426 $obj_id = $news[
"context_obj_id"];
427 $type = $news[
"context_obj_type"];
428 $context_ref = $news[
"ref_id"];
431 $lang_type = in_array($type, array(
"sahs",
"lm",
"dbk",
"htlm"))
435 $this->tpl->setCurrentBlock(
"news_context");
436 $this->tpl->setVariable(
"TYPE", $lng->txt($lang_type));
437 $this->tpl->setVariable(
"IMG_TYPE",
439 $this->tpl->setVariable(
"TITLE",
441 if ($news[
"user_read"] > 0)
443 $this->tpl->setVariable(
"TITLE_CLASS",
'class="light"');
446 $this->tpl->parseCurrentBlock();
447 $ilCtrl->setParameter($this,
"news_context", $context_ref);
451 $ilCtrl->setParameter($this,
"news_context",
"");
455 $this->tpl->setVariable(
"VAL_TITLE",
457 ($news[
"context_obj_type"], $news[
"title"], $news[
"content_is_lang_var"],
458 $news[
"agg_ref_id"], $news[
"aggregation"])));
461 if ($news[
"user_read"] > 0)
463 $this->tpl->setVariable(
"A_CLASS",
'class="light"');
466 $ilCtrl->setParameter($this,
"news_id", $news[
"id"]);
467 $this->tpl->setVariable(
"HREF_SHOW",
468 $ilCtrl->getLinkTarget($this,
"showNews"));
469 $ilCtrl->clearParameters($this);
479 return '<div class="small">'.((int) count($this->
getData())).
" ".$lng->txt(
"news_news_items").
"</div>";
490 if (empty(self::$st_data))
496 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
498 include_once(
"./Services/News/classes/class.ilNewsItem.php");
501 $tpl =
new ilTemplate(
"tpl.show_news.html",
true,
true,
"Services/News");
504 $previous = $next =
"";
506 $c = current($this->data);
509 while($c[
"id"] > 0 &&
510 $c[
"id"] !=
$_GET[
"news_id"])
513 $c = next($this->data);
518 $news_list = array();
519 if (is_array($c[
"aggregation"]))
521 $news_list[] = array(
"ref_id" => $c[
"agg_ref_id"],
522 "agg_ref_id" => $c[
"agg_ref_id"],
523 "aggregation" => $c[
"aggregation"],
525 "content_type" =>
"text",
529 "content_long" =>
"",
530 "update_date" => $news->getUpdateDate(),
531 "creation_date" =>
"",
532 "content_is_lang_var" =>
false,
533 "loc_context" =>
$_GET[
"news_context"],
534 "context_obj_type" => $news->getContextObjType(),
537 foreach($c[
"aggregation"] as $c_item)
540 $c_item[
"loc_context"] = $c_item[
"ref_id"];
541 $c_item[
"loc_stop"] =
$_GET[
"news_context"];
542 $news_list[] = $c_item;
547 $news_list[] = array(
"ref_id" =>
$_GET[
"news_context"],
548 "user_id" => $news->getUserId(),
549 "content_type" => $news->getContentType(),
550 "mob_id" => $news->getMobId(),
551 "visibility" => $news->getVisibility(),
552 "priority" => $news->getPriority(),
553 "content" => $news->getContent(),
554 "content_long" => $news->getContentLong(),
555 "update_date" => $news->getUpdateDate(),
556 "creation_date" => $news->getCreationDate(),
557 "context_sub_obj_type" => $news->getContextSubObjType(),
558 "context_obj_type" => $news->getContextObjType(),
559 "context_sub_obj_id" => $news->getContextSubObjId(),
560 "content_is_lang_var" => $news->getContentIsLangVar(),
561 "content_text_is_lang_var" => $news->getContentTextIsLangVar(),
562 "loc_context" =>
$_GET[
"news_context"],
563 "title" => $news->getTitle());
567 foreach ($news_list as $item)
576 $displayname = $user->getLogin();
581 $displayname =
"<". strtolower($lng->txt(
"deleted")) .
">";
584 $tpl->setCurrentBlock(
"user_info");
585 $tpl->setVariable(
"VAL_AUTHOR", $displayname);
586 $tpl->setVariable(
"TXT_AUTHOR", $lng->txt(
"author"));
587 $tpl->parseCurrentBlock();
594 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
595 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
597 $med = $mob->getMediaItem(
"Standard");
599 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
600 $mpl->setFile($med->getLocation());
603 $mpl->setDisplayHeight($med->getHeight());
604 $tpl->setCurrentBlock(
"player");
605 $tpl->setVariable(
"PLAYER",
606 $mpl->getMp3PlayerHtml());
607 $tpl->parseCurrentBlock();
611 if ($enable_internal_rss && $item[
"visibility"] !=
"")
614 $tpl->setCurrentBlock(
"access");
615 $tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
617 ($item[
"priority"] == 0 &&
621 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
625 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
627 $tpl->parseCurrentBlock();
631 if (trim($item[
"content"]) !=
"")
633 $tpl->setCurrentBlock(
"content");
634 $tpl->setVariable(
"VAL_CONTENT",
639 $tpl->parseCurrentBlock();
641 if (trim($item[
"content_long"]) !=
"")
643 $tpl->setCurrentBlock(
"long");
644 $tpl->setVariable(
"VAL_LONG_CONTENT", $this->
makeClickable($item[
"content_long"]));
645 $tpl->parseCurrentBlock();
647 if ($item[
"update_date"] != $item[
"creation_date"])
649 $tpl->setCurrentBlock(
"ni_update");
650 $tpl->setVariable(
"TXT_LAST_UPDATE", $lng->txt(
"last_update"));
651 $tpl->setVariable(
"VAL_LAST_UPDATE",
653 $tpl->parseCurrentBlock();
657 if ($item[
"creation_date"] !=
"")
659 $tpl->setCurrentBlock(
"ni_update");
660 $tpl->setVariable(
"VAL_CREATION_DATE",
662 $tpl->setVariable(
"TXT_CREATED", $lng->txt(
"created"));
663 $tpl->parseCurrentBlock();
668 if (
$_GET[
"news_context"] > 0)
676 if ($obj_type ==
"file")
678 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $item[
"ref_id"]);
679 $url = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"sendfile");
680 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
682 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
684 $button->setUrl($url);
685 $button->setCaption(
"download");
687 $tpl->setCurrentBlock(
"download");
688 $tpl->setVariable(
"BUTTON_DOWNLOAD", $button->render());
689 $tpl->parseCurrentBlock();
694 if ($obj_type ==
"frm" && $item[
"context_sub_obj_type"] ==
"pos" 695 && $item[
"context_sub_obj_id"] > 0)
697 include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
698 $pos = $item[
"context_sub_obj_id"];
699 $thread = ilObjForumAccess::_getThreadForPosting($pos);
702 $add =
"_".$thread.
"_".$pos;
707 if ($obj_type ==
"wiki" && $item[
"context_sub_obj_type"] ==
"wpg" 708 && $item[
"context_sub_obj_id"] > 0)
710 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
714 $add =
"_".ilWikiUtil::makeUrlTitle($wptitle);
718 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
719 $obj_type.
"_".$item[
"ref_id"].$add;
722 if (in_array($obj_type, array(
"dbk",
"lm")) && $item[
"context_sub_obj_type"] ==
"pg" 723 && $item[
"context_sub_obj_id"] > 0)
725 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
726 "pg_".$item[
"context_sub_obj_id"].
"_".$item[
"ref_id"];
730 $context_opened =
false;
731 if ($item[
"loc_context"] != null && $item[
"loc_context"] != $item[
"loc_stop"])
734 $tpl->setCurrentBlock(
"context");
735 $context_opened =
true;
737 $cont_loc->addContextItems($item[
"loc_context"],
true, $item[
"loc_stop"]);
738 $tpl->setVariable(
"CONTEXT_LOCATOR", $cont_loc->getHTML());
742 if ($item[
"no_context_title"] !==
true)
744 if (!$context_opened)
746 $tpl->setCurrentBlock(
"context");
748 $tpl->setVariable(
"HREF_CONTEXT_TITLE", $url_target);
749 $tpl->setVariable(
"CONTEXT_TITLE", $obj_title);
754 $tpl->parseCurrentBlock();
757 $tpl->setVariable(
"HREF_TITLE", $url_target);
761 $tpl->setVariable(
"VAL_TITLE",
763 $item[
"title"], $item[
"content_is_lang_var"], $item[
"agg_ref_id"],
764 $item[
"aggregation"]));
766 $row_css = ($row_css !=
"tblrow1")
770 $tpl->setCurrentBlock(
"item");
771 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
772 $tpl->parseCurrentBlock();
775 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
777 $content_block->setContent(
$tpl->get());
780 $content_block->setTitle($this->
getProperty(
"title"));
784 $content_block->setTitle($lng->txt(
"news_internal_news"));
791 if ($previous[
"ref_id"] > 0)
793 $ilCtrl->setParameter($this,
"news_context", $previous[
"ref_id"]);
795 $ilCtrl->setParameter($this,
"news_id", $previous[
"id"]);
796 $content_block->addFooterLink($lng->txt(
"previous"),
797 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
798 $ilCtrl->setParameter($this,
"news_context",
"");
802 if ($c = next($this->data))
804 if ($c[
"ref_id"] > 0)
806 $ilCtrl->setParameter($this,
"news_context", $c[
"ref_id"]);
808 $ilCtrl->setParameter($this,
"news_id", $c[
"id"]);
809 $content_block->addFooterLink($lng->txt(
"next"),
810 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
812 $ilCtrl->setParameter($this,
"news_context",
"");
813 $ilCtrl->setParameter($this,
"news_id",
"");
814 $content_block->setCurrentItemNumber($curr_cnt);
815 $content_block->setEnableNumInfo(
true);
816 $content_block->setData($this->
getData());
818 return $content_block->getHTML();
831 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<")))
847 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
849 $ilCtrl->returnToParent($this);
859 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
861 $ilCtrl->returnToParent($this);
871 parent::fillFooter();
873 if ($this->show_view_selection)
889 $this->
addFooterLink(
"[".$lng->txt(
"news_first_letter_of_word_notification").
"] ".
890 $lng->txt(
"news_notifications").
": ",
"",
"",
"",
false,
true);
891 if ($this->view ==
"hide_notifications")
894 $ilCtrl->getLinkTarget($this,
895 "showNotifications"),
896 $ilCtrl->getLinkTarget($this,
897 "showNotifications",
"",
true),
906 $ilCtrl->getLinkTarget($this,
907 "hideNotifications"),
908 $ilCtrl->getLinkTarget($this,
909 "hideNotifications",
"",
true),
921 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
930 if ($ilCtrl->isAsynch())
937 $ilCtrl->returnToParent($this);
945 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
954 if ($ilCtrl->isAsynch())
961 $ilCtrl->returnToParent($this);
971 return $this->settings_form->getHTML();
981 $ilTabs->clearTargets();
984 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
997 if ($hide_news_date !=
"")
999 $hide_news_date = explode(
" ", $hide_news_date);
1002 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1004 $this->settings_form->setTitle($lng->txt(
"news_settings"));
1011 $ch->
setInfo($lng->txt(
"news_hide_news_block_info"));
1012 $ch->setChecked($hide_block);
1013 $this->settings_form->addItem($ch);
1016 "hide_news_per_date");
1017 $hnpd->
setInfo($lng->txt(
"news_hide_news_per_date_info"));
1018 $hnpd->setChecked($hide_news_per_date);
1022 if ($hide_news_date !=
"")
1026 #$dt_prop->setDate($hide_news_date[0]); 1027 #$dt_prop->setTime($hide_news_date[1]); 1028 $dt_prop->setShowTime(
true);
1030 $hnpd->addSubItem($dt_prop);
1032 $this->settings_form->addItem($hnpd);
1037 if ($this->
getProperty(
"default_visibility_option") &&
1038 $enable_internal_rss)
1041 0, $this->block_id);
1042 if ($default_visibility ==
"")
1044 $default_visibility =
1049 $radio_group =
new ilRadioGroupInputGUI($lng->txt(
"news_default_visibility"),
"default_visibility");
1050 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_users"),
"users");
1051 $radio_group->addOption($radio_option);
1052 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_public"),
"public");
1053 $radio_group->addOption($radio_option);
1054 $radio_group->
setInfo($lng->txt(
"news_news_item_visibility_info"));
1055 $radio_group->setRequired(
false);
1056 $radio_group->setValue($default_visibility);
1057 $this->settings_form->addItem($radio_group);
1061 if ($this->
getProperty(
"public_notifications_option") &&
1062 $enable_internal_rss)
1065 "notifications_public");
1066 $ch->
setInfo($lng->txt(
"news_notifications_public_info"));
1067 $ch->setChecked($public);
1068 $this->settings_form->addItem($ch);
1072 if ($enable_internal_rss)
1075 "notifications_public_feed");
1076 $ch->
setInfo($lng->txt(
"news_public_feed_info"));
1077 $ch->setChecked($public_feed);
1078 $this->settings_form->addItem($ch);
1089 $this->settings_form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
1090 $this->settings_form->addCommandButton(
"cancelSettings", $lng->txt(
"cancel"));
1091 $this->settings_form->setFormAction($ilCtrl->getFormaction($this));
1101 $ilCtrl->returnToParent($this);
1113 if ($this->settings_form->checkInput())
1116 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1118 if ($enable_internal_rss)
1121 0, $this->block_id);
1123 0, $this->block_id);
1125 0, $this->block_id);
1131 0, $this->block_id);
1133 0, $this->block_id);
1136 $hd = $this->settings_form->getInput(
"hide_news_date");
1144 include_once(
"./Services/News/classes/class.ilNewsCache.php");
1146 $cache->deleteEntry($ilUser->getId().
":".
$_GET[
"ref_id"]);
1148 $ilCtrl->returnToParent($this);
1152 $this->settings_form->setValuesByPost();
1153 return $this->settings_form->getHtml();
1164 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1168 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"Services/News");
1169 $tpl->setVariable(
"TXT_TITLE",
1170 sprintf($lng->txt(
"news_feed_url_for"), $title));
1171 $tpl->setVariable(
"TXT_INFO", $lng->txt(
"news_get_feed_info"));
1172 $tpl->setVariable(
"TXT_FEED_URL", $lng->txt(
"news_feed_url"));
1173 $tpl->setVariable(
"VAL_FEED_URL",
1174 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&user_id=".$ilUser->getId().
1175 "&obj_id=".$this->block_id.
1176 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1177 $tpl->setVariable(
"VAL_FEED_URL_TXT",
1178 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&<br />user_id=".$ilUser->getId().
1179 "&obj_id=".$this->block_id.
1180 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1182 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
1184 $content_block->setContent(
$tpl->get());
1185 $content_block->setTitle($lng->txt(
"news_internal_news"));
1186 $content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1187 $lng->txt(
"close"),
true);
1189 return $content_block->getHTML();
1196 $a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1197 $lng->txt(
"close"),
true);
1204 if ($ilCtrl->getCmd() ==
"hideNotifications" ||
1205 $ilCtrl->getCmd() ==
"showNotifications")
1210 if ($ilCtrl->getCmdClass() !=
"ilcolumngui" && $ilCtrl->getCmd() !=
"enableJS")
1215 $sess_feed_js =
$_SESSION[
"il_feed_js"];
1218 if ($sess_feed_js !=
"n" &&
1219 ($ilUser->getPref(
"il_feed_js") !=
"n" || $sess_feed_js ==
"y"))
1236 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1239 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"Services/News");
1240 $rel_tpl->setVariable(
"TXT_LOADING", $lng->txt(
"news_loading_news"));
1242 $rel_tpl->setVariable(
"TARGET",
1243 $ilCtrl->getLinkTargetByClass(
"ilcolumngui",
"updateBlock",
"",
true));
1246 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE", $lng->txt(
"news_no_js_click_here"));
1247 $rel_tpl->setVariable(
"TARGET_NO_JS",
1248 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"disableJS"));
1250 return $rel_tpl->get();
1257 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1260 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"Services/News");
1262 $rel_tpl->setVariable(
"TARGET",
1263 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"enableJS",
true,
"",
false));
1265 return $rel_tpl->get();
1274 $ilUser->writePref(
"il_feed_js",
"n");
1275 $ilCtrl->returnToParent($this);
1284 $ilUser->writePref(
"il_feed_js",
"y");
static determineNewsTitle($a_context_obj_type, $a_title, $a_content_is_lang_var, $a_agg_ref_id=0, $a_aggregation="")
Determine title for news item entry.
clearFooterLinks()
Clear footer links.
This class represents an option in a radio group.
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static shortenWords($a_str, $a_len=30, $a_dots=true)
Ensure that the maximum word lenght within a text is not longer than $a_len.
static _write($a_type, $a_setting, $a_value, $a_user=0, $a_block_id=0)
Write setting to database.
addFooterLink($a_text, $a_href="", $a_onclick="", $a_block_id="", $a_top=false, $a_omit_separator=false, $a_checked=false)
Add a footer text/link.
getOverview()
Get overview.
setEnableEdit($a_enable_edit=0)
Set EnableEdit.
_setRead($a_user_id, $a_news_id)
Set item read.
handleView()
Handles show/hide notification view and removes notifications if hidden.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data
setDataSection($a_content)
Call this from overwritten fillDataSection(), if standard row based data is not used.
setFooterInfo($a_footerinfo, $a_hide_and_icon=false)
Set Footer Info.
User Interface for NewsItem entities.
fillFooterLinks($a_top=false, $a_numinfo="")
Fill footer links.
addBlockCommand($a_href, $a_text, $a_target="", $a_img="", $a_right_aligned=false, $a_checked=false, $a_html="")
Add Block Command.
static _lookupTitle($a_id)
lookup object title
editSettings()
Show settings screen.
getHTML()
Get bloch HTML code.
setEnableNumInfo($a_enablenuminfo)
Set Enable Item Number Info.
BlockGUI class for block NewsForContext.
getRepositoryMode()
Get RepositoryMode.
setInfo($a_info)
Set Info.
makeClickable($a_str)
Make clickable.
static _unsubscribe($a_ref_id, $a_user_id)
Unsubscribe a user from an object (ref id).
fillDataSection()
Fill data section.
fillRow($news)
get flat bookmark list for personal desktop
subscribeNews()
Subscribe current user from news.
setTitle($a_title)
Set Title.
static determineNewsContent($a_context_obj_type, $a_content, $a_is_lang_var)
Determine new content.
setBlockId($a_block_id=0)
Set Block Id.
setData($a_data)
Set Data.
& executeCommand()
execute command
static _lookupObjId($a_id)
static makeClickable($a_text, $detectGotoLinks=false)
makeClickable In Texten enthaltene URLs und Mail-Adressen klickbar machen
special template class to simplify handling of ITX/PEAR
setAvailableDetailLevels($a_max, $a_min=0)
Set Available Detail Levels.
static _lookup($a_type, $a_setting, $a_user=0, $a_block_id=0)
Lookup setting from database.
static formatDate(ilDateTime $date)
Format a date public.
showFeedUrl()
Show feed URL.
initSettingsForm()
Init setting form.
static _lookupType($a_id, $a_reference=false)
lookup object type
saveSettings()
Save settings.
getBlockId()
Get Block Id.
unsubscribeNews()
Unsubscribe current user from news.
addCloseCommand($a_content_block)
ilNewsForContextBlockGUI()
Constructor.
showViewFooter()
Show additional footer for show/hide notifications.
setLimit($a_limit)
Set Limit.
getEnableEdit()
Get EnableEdit.
static _subscribe($a_ref_id, $a_user_id)
Subscribe a user to an object (ref id).
static _getDefaultVisibilityForRefId($a_ref_id)
Get default visibility for reference id.
getNewsData()
Get news for context.
static isRepositoryObject()
Is this a repository object.
This class represents a block method of a block.
static getScreenMode()
Get Screen Mode for current command.
cancelSettings()
Cancel settings.
BlockGUI class for (centered) Content on Personal Desktop.
static getBlockType()
Get block type.
setRowTemplate($a_rowtemplatename, $a_rowtemplatedir="")
Set Row Template Name.
getCurrentDetailLevel()
Get Current Detail Level.