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")
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());
568 $cache_deleted =
false;
569 foreach ($news_list as $item)
571 $row_css = ($row_css !=
"tblrow1")
575 if ($item[
"ref_id"] > 0 && !$ilAccess->checkAccess(
"read",
"", $item[
"ref_id"]))
577 $tpl->setCurrentBlock(
"content");
578 $tpl->setVariable(
"VAL_CONTENT", $lng->txt(
"news_sorry_not_accessible_anymore"));
579 $tpl->parseCurrentBlock();
580 $tpl->setCurrentBlock(
"item");
581 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
582 $tpl->parseCurrentBlock();
585 $this->acache->deleteEntry($ilUser->getId() .
":" .
$_GET[
"ref_id"]);
586 $cache_deleted =
true;
598 $displayname = $user->getLogin();
603 $displayname =
"<". strtolower($lng->txt(
"deleted")) .
">";
606 $tpl->setCurrentBlock(
"user_info");
607 $tpl->setVariable(
"VAL_AUTHOR", $displayname);
608 $tpl->setVariable(
"TXT_AUTHOR", $lng->txt(
"author"));
609 $tpl->parseCurrentBlock();
616 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
617 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
619 $med = $mob->getMediaItem(
"Standard");
621 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
622 $mpl->setFile($med->getLocation());
625 $mpl->setDisplayHeight($med->getHeight());
626 $tpl->setCurrentBlock(
"player");
627 $tpl->setVariable(
"PLAYER",
628 $mpl->getMp3PlayerHtml());
629 $tpl->parseCurrentBlock();
633 if ($enable_internal_rss && $item[
"visibility"] !=
"")
636 $tpl->setCurrentBlock(
"access");
637 $tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
639 ($item[
"priority"] == 0 &&
643 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
647 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
649 $tpl->parseCurrentBlock();
653 if (trim($item[
"content"]) !=
"")
655 $tpl->setCurrentBlock(
"content");
656 $tpl->setVariable(
"VAL_CONTENT",
661 $tpl->parseCurrentBlock();
663 if (trim($item[
"content_long"]) !=
"")
665 $tpl->setCurrentBlock(
"long");
666 $tpl->setVariable(
"VAL_LONG_CONTENT", $this->
makeClickable($item[
"content_long"]));
667 $tpl->parseCurrentBlock();
669 if ($item[
"update_date"] != $item[
"creation_date"])
671 $tpl->setCurrentBlock(
"ni_update");
672 $tpl->setVariable(
"TXT_LAST_UPDATE", $lng->txt(
"last_update"));
673 $tpl->setVariable(
"VAL_LAST_UPDATE",
675 $tpl->parseCurrentBlock();
679 if ($item[
"creation_date"] !=
"")
681 $tpl->setCurrentBlock(
"ni_update");
682 $tpl->setVariable(
"VAL_CREATION_DATE",
684 $tpl->setVariable(
"TXT_CREATED", $lng->txt(
"created"));
685 $tpl->parseCurrentBlock();
690 if (
$_GET[
"news_context"] > 0)
698 if ($obj_type ==
"file")
700 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $item[
"ref_id"]);
701 $url = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"sendfile");
702 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id",
$_GET[
"ref_id"]);
704 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
706 $button->setUrl(
$url);
707 $button->setCaption(
"download");
709 $tpl->setCurrentBlock(
"download");
710 $tpl->setVariable(
"BUTTON_DOWNLOAD", $button->render());
711 $tpl->parseCurrentBlock();
716 if ($obj_type ==
"frm" && $item[
"context_sub_obj_type"] ==
"pos" 717 && $item[
"context_sub_obj_id"] > 0)
719 include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
720 $pos = $item[
"context_sub_obj_id"];
721 $thread = ilObjForumAccess::_getThreadForPosting($pos);
724 $add =
"_".$thread.
"_".$pos;
729 if ($obj_type ==
"wiki" && $item[
"context_sub_obj_type"] ==
"wpg" 730 && $item[
"context_sub_obj_id"] > 0)
732 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
736 $add =
"_".ilWikiUtil::makeUrlTitle($wptitle);
740 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
741 $obj_type.
"_".$item[
"ref_id"].$add;
744 if (in_array($obj_type, array(
"dbk",
"lm")) && $item[
"context_sub_obj_type"] ==
"pg" 745 && $item[
"context_sub_obj_id"] > 0)
747 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
748 "pg_".$item[
"context_sub_obj_id"].
"_".$item[
"ref_id"];
752 $context_opened =
false;
753 if ($item[
"loc_context"] != null && $item[
"loc_context"] != $item[
"loc_stop"])
756 $tpl->setCurrentBlock(
"context");
757 $context_opened =
true;
759 $cont_loc->addContextItems($item[
"loc_context"],
true, $item[
"loc_stop"]);
760 $tpl->setVariable(
"CONTEXT_LOCATOR", $cont_loc->getHTML());
764 if ($item[
"no_context_title"] !==
true)
766 if (!$context_opened)
768 $tpl->setCurrentBlock(
"context");
770 $tpl->setVariable(
"HREF_CONTEXT_TITLE", $url_target);
771 $tpl->setVariable(
"CONTEXT_TITLE", $obj_title);
776 $tpl->parseCurrentBlock();
779 $tpl->setVariable(
"HREF_TITLE", $url_target);
783 $tpl->setVariable(
"VAL_TITLE",
785 $item[
"title"], $item[
"content_is_lang_var"], $item[
"agg_ref_id"],
786 $item[
"aggregation"]));
789 $tpl->setCurrentBlock(
"item");
790 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
791 $tpl->parseCurrentBlock();
794 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
796 $content_block->setContent(
$tpl->get());
799 $content_block->setTitle($this->
getProperty(
"title"));
803 $content_block->setTitle($lng->txt(
"news_internal_news"));
810 if ($previous[
"ref_id"] > 0)
812 $ilCtrl->setParameter($this,
"news_context", $previous[
"ref_id"]);
814 $ilCtrl->setParameter($this,
"news_id", $previous[
"id"]);
815 $content_block->addFooterLink($lng->txt(
"previous"),
816 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
817 $ilCtrl->setParameter($this,
"news_context",
"");
821 if ($c = next($this->data))
823 if ($c[
"ref_id"] > 0)
825 $ilCtrl->setParameter($this,
"news_context", $c[
"ref_id"]);
827 $ilCtrl->setParameter($this,
"news_id", $c[
"id"]);
828 $content_block->addFooterLink($lng->txt(
"next"),
829 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
831 $ilCtrl->setParameter($this,
"news_context",
"");
832 $ilCtrl->setParameter($this,
"news_id",
"");
833 $content_block->setCurrentItemNumber($curr_cnt);
834 $content_block->setEnableNumInfo(
true);
835 $content_block->setData($this->
getData());
837 return $content_block->getHTML();
850 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<")))
866 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
868 $ilCtrl->returnToParent($this);
878 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
880 $ilCtrl->returnToParent($this);
890 parent::fillFooter();
892 if ($this->show_view_selection)
908 $this->
addFooterLink(
"[".$lng->txt(
"news_first_letter_of_word_notification").
"] ".
909 $lng->txt(
"news_notifications").
": ",
"",
"",
"",
false,
true);
910 if ($this->view ==
"hide_notifications")
913 $ilCtrl->getLinkTarget($this,
914 "showNotifications"),
915 $ilCtrl->getLinkTarget($this,
916 "showNotifications",
"",
true),
925 $ilCtrl->getLinkTarget($this,
926 "hideNotifications"),
927 $ilCtrl->getLinkTarget($this,
928 "hideNotifications",
"",
true),
940 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
949 if ($ilCtrl->isAsynch())
956 $ilCtrl->returnToParent($this);
964 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
973 if ($ilCtrl->isAsynch())
980 $ilCtrl->returnToParent($this);
990 return $this->settings_form->getHTML();
1000 $ilTabs->clearTargets();
1003 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1006 0, $this->block_id);
1008 0, $this->block_id);
1010 0, $this->block_id);
1012 0, $this->block_id);
1014 0, $this->block_id);
1016 if ($hide_news_date !=
"")
1018 $hide_news_date = explode(
" ", $hide_news_date);
1021 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1023 $this->settings_form->setTitle($lng->txt(
"news_settings"));
1030 $ch->
setInfo($lng->txt(
"news_hide_news_block_info"));
1031 $ch->setChecked($hide_block);
1032 $this->settings_form->addItem($ch);
1035 "hide_news_per_date");
1036 $hnpd->
setInfo($lng->txt(
"news_hide_news_per_date_info"));
1037 $hnpd->setChecked($hide_news_per_date);
1041 if ($hide_news_date !=
"")
1045 #$dt_prop->setDate($hide_news_date[0]); 1046 #$dt_prop->setTime($hide_news_date[1]); 1047 $dt_prop->setShowTime(
true);
1049 $hnpd->addSubItem($dt_prop);
1051 $this->settings_form->addItem($hnpd);
1056 if ($this->
getProperty(
"default_visibility_option") &&
1057 $enable_internal_rss)
1060 0, $this->block_id);
1061 if ($default_visibility ==
"")
1063 $default_visibility =
1068 $radio_group =
new ilRadioGroupInputGUI($lng->txt(
"news_default_visibility"),
"default_visibility");
1069 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_users"),
"users");
1070 $radio_group->addOption($radio_option);
1071 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_public"),
"public");
1072 $radio_group->addOption($radio_option);
1073 $radio_group->
setInfo($lng->txt(
"news_news_item_visibility_info"));
1074 $radio_group->setRequired(
false);
1075 $radio_group->setValue($default_visibility);
1076 $this->settings_form->addItem($radio_group);
1080 if ($this->
getProperty(
"public_notifications_option") &&
1081 $enable_internal_rss)
1084 "notifications_public");
1085 $ch->
setInfo($lng->txt(
"news_notifications_public_info"));
1086 $ch->setChecked($public);
1087 $this->settings_form->addItem($ch);
1091 if ($enable_internal_rss)
1094 "notifications_public_feed");
1095 $ch->
setInfo($lng->txt(
"news_public_feed_info"));
1096 $ch->setChecked($public_feed);
1097 $this->settings_form->addItem($ch);
1108 $this->settings_form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
1109 $this->settings_form->addCommandButton(
"cancelSettings", $lng->txt(
"cancel"));
1110 $this->settings_form->setFormAction($ilCtrl->getFormaction($this));
1120 $ilCtrl->returnToParent($this);
1132 if ($this->settings_form->checkInput())
1135 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1137 if ($enable_internal_rss)
1140 0, $this->block_id);
1142 0, $this->block_id);
1144 0, $this->block_id);
1150 0, $this->block_id);
1152 0, $this->block_id);
1155 $hd = $this->settings_form->getInput(
"hide_news_date");
1163 include_once(
"./Services/News/classes/class.ilNewsCache.php");
1165 $cache->deleteEntry($ilUser->getId().
":".
$_GET[
"ref_id"]);
1167 $ilCtrl->returnToParent($this);
1171 $this->settings_form->setValuesByPost();
1172 return $this->settings_form->getHtml();
1183 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1187 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"Services/News");
1188 $tpl->setVariable(
"TXT_TITLE",
1189 sprintf($lng->txt(
"news_feed_url_for"), $title));
1190 $tpl->setVariable(
"TXT_INFO", $lng->txt(
"news_get_feed_info"));
1191 $tpl->setVariable(
"TXT_FEED_URL", $lng->txt(
"news_feed_url"));
1192 $tpl->setVariable(
"VAL_FEED_URL",
1193 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&user_id=".$ilUser->getId().
1194 "&obj_id=".$this->block_id.
1195 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1196 $tpl->setVariable(
"VAL_FEED_URL_TXT",
1197 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&<br />user_id=".$ilUser->getId().
1198 "&obj_id=".$this->block_id.
1199 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1201 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
1203 $content_block->setContent(
$tpl->get());
1204 $content_block->setTitle($lng->txt(
"news_internal_news"));
1205 $content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1206 $lng->txt(
"close"),
true);
1208 return $content_block->getHTML();
1215 $a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1216 $lng->txt(
"close"),
true);
1223 if ($ilCtrl->getCmd() ==
"hideNotifications" ||
1224 $ilCtrl->getCmd() ==
"showNotifications")
1229 if ($ilCtrl->getCmdClass() !=
"ilcolumngui" && $ilCtrl->getCmd() !=
"enableJS")
1234 $sess_feed_js =
$_SESSION[
"il_feed_js"];
1237 if ($sess_feed_js !=
"n" &&
1238 ($ilUser->getPref(
"il_feed_js") !=
"n" || $sess_feed_js ==
"y"))
1255 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1258 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"Services/News");
1259 $rel_tpl->setVariable(
"TXT_LOADING", $lng->txt(
"news_loading_news"));
1261 $rel_tpl->setVariable(
"TARGET",
1262 $ilCtrl->getLinkTargetByClass(
"ilcolumngui",
"updateBlock",
"",
true));
1265 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE", $lng->txt(
"news_no_js_click_here"));
1266 $rel_tpl->setVariable(
"TARGET_NO_JS",
1267 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"disableJS"));
1269 return $rel_tpl->get();
1276 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1279 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"Services/News");
1281 $rel_tpl->setVariable(
"TARGET",
1282 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"enableJS",
true,
"",
false));
1284 return $rel_tpl->get();
1293 $ilUser->writePref(
"il_feed_js",
"n");
1294 $ilCtrl->returnToParent($this);
1303 $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.
static prepareNewsDataFromCache($a_cres)
Prepare news data from cache.
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.