5 include_once(
"Services/Block/classes/class.ilBlockGUI.php");
30 parent::__construct();
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 = unserialize($this->acache->getEntry($ilUser->getId().
":".
$_GET[
"ref_id"]));
45 $this->cache_hit =
false;
47 if ($this->acache->getLastAccessStatus() ==
"hit" && is_array($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;
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",
"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);
517 if (!is_array($c) && is_object($news) && $news->getId() > 0
520 throw new ilException(
"News ID does not match object context.");
525 $news_list =
array();
526 if (is_array($c[
"aggregation"]))
528 $news_list[] =
array(
"ref_id" => $c[
"agg_ref_id"],
529 "agg_ref_id" => $c[
"agg_ref_id"],
530 "aggregation" => $c[
"aggregation"],
532 "content_type" =>
"text",
536 "content_long" =>
"",
537 "update_date" => $news->getUpdateDate(),
538 "creation_date" =>
"",
539 "content_is_lang_var" =>
false,
540 "loc_context" => $_GET[
"news_context"],
541 "context_obj_type" => $news->getContextObjType(),
544 foreach($c[
"aggregation"] as $c_item)
547 $c_item[
"loc_context"] = $c_item[
"ref_id"];
548 $c_item[
"loc_stop"] = $_GET[
"news_context"];
549 $news_list[] = $c_item;
554 $news_list[] =
array(
555 "id" => $news->getId(),
556 "ref_id" => $_GET[
"news_context"],
557 "user_id" => $news->getUserId(),
558 "content_type" => $news->getContentType(),
559 "mob_id" => $news->getMobId(),
560 "visibility" => $news->getVisibility(),
561 "priority" => $news->getPriority(),
562 "content" => $news->getContent(),
563 "content_long" => $news->getContentLong(),
564 "update_date" => $news->getUpdateDate(),
565 "creation_date" => $news->getCreationDate(),
566 "context_sub_obj_type" => $news->getContextSubObjType(),
567 "context_obj_type" => $news->getContextObjType(),
568 "context_sub_obj_id" => $news->getContextSubObjId(),
569 "content_is_lang_var" => $news->getContentIsLangVar(),
570 "content_text_is_lang_var" => $news->getContentTextIsLangVar(),
571 "loc_context" => $_GET[
"news_context"],
572 "title" => $news->getTitle());
577 $cache_deleted =
false;
578 foreach ($news_list as $item)
580 $row_css = ($row_css !=
"tblrow1")
584 if ($item[
"ref_id"] > 0 && !$ilAccess->checkAccess(
"read",
"", $item[
"ref_id"]))
586 $tpl->setCurrentBlock(
"content");
587 $tpl->setVariable(
"VAL_CONTENT", $lng->txt(
"news_sorry_not_accessible_anymore"));
588 $tpl->parseCurrentBlock();
589 $tpl->setCurrentBlock(
"item");
590 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
591 $tpl->parseCurrentBlock();
594 $this->acache->deleteEntry($ilUser->getId() .
":" . $_GET[
"ref_id"]);
595 $cache_deleted =
true;
607 $displayname = $user->getLogin();
612 $displayname =
"<". strtolower($lng->txt(
"deleted")) .
">";
615 $tpl->setCurrentBlock(
"user_info");
616 $tpl->setVariable(
"VAL_AUTHOR", $displayname);
617 $tpl->setVariable(
"TXT_AUTHOR", $lng->txt(
"author"));
618 $tpl->parseCurrentBlock();
625 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
626 include_once(
"./Services/MediaObjects/classes/class.ilMediaPlayerGUI.php");
628 $med = $mob->getMediaItem(
"Standard");
630 if (strcasecmp(
"Reference", $med->getLocationType()) == 0)
631 $mpl->setFile($med->getLocation());
634 $mpl->setDisplayHeight($med->getHeight());
635 $tpl->setCurrentBlock(
"player");
636 $tpl->setVariable(
"PLAYER",
637 $mpl->getMp3PlayerHtml());
638 $tpl->parseCurrentBlock();
642 if ($enable_internal_rss && $item[
"visibility"] !=
"")
645 $tpl->setCurrentBlock(
"access");
646 $tpl->setVariable(
"TXT_ACCESS", $lng->txt(
"news_news_item_visibility"));
648 ($item[
"priority"] == 0 &&
652 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_public"));
656 $tpl->setVariable(
"VAL_ACCESS", $lng->txt(
"news_visibility_users"));
658 $tpl->parseCurrentBlock();
662 include_once(
"./Services/News/classes/class.ilNewsRendererFactory.php");
664 if (trim($item[
"content"]) !=
"")
667 $renderer->setNewsItem($it, $item[
"ref_id"]);
668 $tpl->setCurrentBlock(
"content");
669 $tpl->setVariable(
"VAL_CONTENT", $renderer->getDetailContent());
670 $tpl->parseCurrentBlock();
672 if (trim($item[
"content_long"]) !=
"")
674 $tpl->setCurrentBlock(
"long");
675 $tpl->setVariable(
"VAL_LONG_CONTENT", $this->
makeClickable($item[
"content_long"]));
676 $tpl->parseCurrentBlock();
678 if ($item[
"update_date"] != $item[
"creation_date"])
680 $tpl->setCurrentBlock(
"ni_update");
681 $tpl->setVariable(
"TXT_LAST_UPDATE", $lng->txt(
"last_update"));
682 $tpl->setVariable(
"VAL_LAST_UPDATE",
684 $tpl->parseCurrentBlock();
688 if ($item[
"creation_date"] !=
"")
690 $tpl->setCurrentBlock(
"ni_update");
691 $tpl->setVariable(
"VAL_CREATION_DATE",
693 $tpl->setVariable(
"TXT_CREATED", $lng->txt(
"created"));
694 $tpl->parseCurrentBlock();
699 if ($_GET[
"news_context"] > 0)
707 if ($obj_type ==
"file")
709 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $item[
"ref_id"]);
710 $url = $ilCtrl->getLinkTargetByClass(
"ilrepositorygui",
"sendfile");
711 $ilCtrl->setParameterByClass(
"ilrepositorygui",
"ref_id", $_GET[
"ref_id"]);
713 include_once
"Services/UIComponent/Button/classes/class.ilLinkButton.php";
715 $button->setUrl(
$url);
716 $button->setCaption(
"download");
718 $tpl->setCurrentBlock(
"download");
719 $tpl->setVariable(
"BUTTON_DOWNLOAD", $button->render());
720 $tpl->parseCurrentBlock();
725 if ($obj_type ==
"frm" && $item[
"context_sub_obj_type"] ==
"pos" 726 && $item[
"context_sub_obj_id"] > 0)
728 include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
729 $pos = $item[
"context_sub_obj_id"];
730 $thread = ilObjForumAccess::_getThreadForPosting($pos);
733 $add =
"_".$thread.
"_".$pos;
738 if ($obj_type ==
"wiki" && $item[
"context_sub_obj_type"] ==
"wpg" 739 && $item[
"context_sub_obj_id"] > 0)
741 include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
745 $add =
"_".ilWikiUtil::makeUrlTitle($wptitle);
749 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
750 $obj_type.
"_".$item[
"ref_id"].$add;
753 if (in_array($obj_type,
array(
"lm")) && $item[
"context_sub_obj_type"] ==
"pg" 754 && $item[
"context_sub_obj_id"] > 0)
756 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
757 "pg_".$item[
"context_sub_obj_id"].
"_".$item[
"ref_id"];
761 if ($obj_type ==
"blog" && $item[
"context_sub_obj_type"] ==
"blp" 762 && $item[
"context_sub_obj_id"] > 0)
764 $url_target =
"./goto.php?client_id=".rawurlencode(CLIENT_ID).
"&target=".
765 "blog_".$item[
"ref_id"].
"_".$item[
"context_sub_obj_id"];
768 $context_opened =
false;
769 if ($item[
"loc_context"] != null && $item[
"loc_context"] != $item[
"loc_stop"])
772 $tpl->setCurrentBlock(
"context");
773 $context_opened =
true;
775 $cont_loc->addContextItems($item[
"loc_context"],
true, $item[
"loc_stop"]);
776 $tpl->setVariable(
"CONTEXT_LOCATOR", $cont_loc->getHTML());
780 if ($item[
"no_context_title"] !==
true)
782 if (!$context_opened)
784 $tpl->setCurrentBlock(
"context");
786 $tpl->setVariable(
"HREF_CONTEXT_TITLE", $url_target);
787 $tpl->setVariable(
"CONTEXT_TITLE", $obj_title);
792 $tpl->parseCurrentBlock();
795 $tpl->setVariable(
"HREF_TITLE", $url_target);
799 $tpl->setVariable(
"VAL_TITLE",
801 $item[
"title"], $item[
"content_is_lang_var"], $item[
"agg_ref_id"],
802 $item[
"aggregation"]));
805 $tpl->setCurrentBlock(
"item");
806 $tpl->setVariable(
"ITEM_ROW_CSS", $row_css);
807 $tpl->parseCurrentBlock();
810 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
812 $content_block->setContent(
$tpl->get());
815 $content_block->setTitle($this->
getProperty(
"title"));
819 $content_block->setTitle($lng->txt(
"news_internal_news"));
826 if ($previous[
"ref_id"] > 0)
828 $ilCtrl->setParameter($this,
"news_context", $previous[
"ref_id"]);
830 $ilCtrl->setParameter($this,
"news_id", $previous[
"id"]);
831 $content_block->addFooterLink($lng->txt(
"previous"),
832 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
833 $ilCtrl->setParameter($this,
"news_context",
"");
837 if ($c = next($this->
data))
839 if ($c[
"ref_id"] > 0)
841 $ilCtrl->setParameter($this,
"news_context", $c[
"ref_id"]);
843 $ilCtrl->setParameter($this,
"news_id", $c[
"id"]);
844 $content_block->addFooterLink($lng->txt(
"next"),
845 $ilCtrl->getLinkTarget($this,
"showNews"),
"",
"",
true);
847 $ilCtrl->setParameter($this,
"news_context",
"");
848 $ilCtrl->setParameter($this,
"news_id",
"");
849 $content_block->setCurrentItemNumber($curr_cnt);
850 $content_block->setEnableNumInfo(
true);
851 $content_block->setData($this->
getData());
853 return $content_block->getHTML();
866 if (is_int(strpos($a_str,
">")) && is_int(strpos($a_str,
"<")))
882 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
884 $ilCtrl->returnToParent($this);
894 include_once(
"./Services/News/classes/class.ilNewsSubscription.php");
896 $ilCtrl->returnToParent($this);
906 parent::fillFooter();
908 if ($this->show_view_selection)
924 $this->
addFooterLink(
"[".$lng->txt(
"news_first_letter_of_word_notification").
"] ".
925 $lng->txt(
"news_notifications").
": ",
"",
"",
"",
false,
true);
926 if ($this->view ==
"hide_notifications")
929 $ilCtrl->getLinkTarget($this,
930 "showNotifications"),
931 $ilCtrl->getLinkTarget($this,
932 "showNotifications",
"",
true),
941 $ilCtrl->getLinkTarget($this,
942 "hideNotifications"),
943 $ilCtrl->getLinkTarget($this,
944 "hideNotifications",
"",
true),
956 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
965 if ($ilCtrl->isAsynch())
972 $ilCtrl->returnToParent($this);
980 include_once(
"Services/Block/classes/class.ilBlockSetting.php");
989 if ($ilCtrl->isAsynch())
996 $ilCtrl->returnToParent($this);
1006 return $this->settings_form->getHTML();
1016 $ilTabs->clearTargets();
1019 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1022 0, $this->block_id);
1024 0, $this->block_id);
1026 0, $this->block_id);
1028 0, $this->block_id);
1030 0, $this->block_id);
1032 if ($hide_news_date !=
"")
1034 $hide_news_date = explode(
" ", $hide_news_date);
1037 include_once(
"./Services/Form/classes/class.ilPropertyFormGUI.php");
1039 $this->settings_form->setTitle($lng->txt(
"news_settings"));
1046 $ch->
setInfo($lng->txt(
"news_hide_news_block_info"));
1047 $ch->setChecked($hide_block);
1048 $this->settings_form->addItem($ch);
1051 "hide_news_per_date");
1052 $hnpd->
setInfo($lng->txt(
"news_hide_news_per_date_info"));
1053 $hnpd->setChecked($hide_news_per_date);
1058 if ($hide_news_date !=
"")
1062 #$dt_prop->setDate($hide_news_date[0]); 1063 #$dt_prop->setTime($hide_news_date[1]); 1064 $dt_prop->setShowTime(
true);
1066 $hnpd->addSubItem($dt_prop);
1068 $this->settings_form->addItem($hnpd);
1073 if ($this->
getProperty(
"default_visibility_option") &&
1074 $enable_internal_rss)
1077 0, $this->block_id);
1078 if ($default_visibility ==
"")
1080 $default_visibility =
1085 $radio_group =
new ilRadioGroupInputGUI($lng->txt(
"news_default_visibility"),
"default_visibility");
1086 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_users"),
"users");
1087 $radio_group->addOption($radio_option);
1088 $radio_option =
new ilRadioOption($lng->txt(
"news_visibility_public"),
"public");
1089 $radio_group->addOption($radio_option);
1090 $radio_group->
setInfo($lng->txt(
"news_news_item_visibility_info"));
1091 $radio_group->setRequired(
false);
1092 $radio_group->setValue($default_visibility);
1093 $this->settings_form->addItem($radio_group);
1097 if ($this->
getProperty(
"public_notifications_option") &&
1098 $enable_internal_rss)
1101 "notifications_public");
1102 $ch->
setInfo($lng->txt(
"news_notifications_public_info"));
1103 $ch->setChecked($public);
1104 $this->settings_form->addItem($ch);
1108 if ($enable_internal_rss)
1111 "notifications_public_feed");
1112 $ch->
setInfo($lng->txt(
"news_public_feed_info"));
1113 $ch->setChecked($public_feed);
1114 $this->settings_form->addItem($ch);
1125 $this->settings_form->addCommandButton(
"saveSettings", $lng->txt(
"save"));
1126 $this->settings_form->addCommandButton(
"cancelSettings", $lng->txt(
"cancel"));
1127 $this->settings_form->setFormAction($ilCtrl->getFormaction($this));
1137 $ilCtrl->returnToParent($this);
1149 if ($this->settings_form->checkInput())
1152 $enable_internal_rss = $news_set->get(
"enable_rss_for_internal");
1154 if ($enable_internal_rss)
1157 0, $this->block_id);
1159 0, $this->block_id);
1161 0, $this->block_id);
1167 0, $this->block_id);
1169 0, $this->block_id);
1172 $hd = $this->settings_form->getItemByPostVar(
"hide_news_date");
1173 $hide_date = $hd->getDate();
1174 if (
$_POST[
"hide_news_per_date"] && $hide_date != null)
1184 0, $this->block_id);
1188 include_once(
"./Services/News/classes/class.ilNewsCache.php");
1190 $cache->deleteEntry($ilUser->getId().
":".
$_GET[
"ref_id"]);
1192 $ilCtrl->returnToParent($this);
1196 $this->settings_form->setValuesByPost();
1197 return $this->settings_form->getHtml();
1208 include_once(
"./Services/News/classes/class.ilNewsItem.php");
1212 $tpl =
new ilTemplate(
"tpl.show_feed_url.html",
true,
true,
"Services/News");
1213 $tpl->setVariable(
"TXT_TITLE",
1214 sprintf($lng->txt(
"news_feed_url_for"),
$title));
1215 $tpl->setVariable(
"TXT_INFO", $lng->txt(
"news_get_feed_info"));
1216 $tpl->setVariable(
"TXT_FEED_URL", $lng->txt(
"news_feed_url"));
1217 $tpl->setVariable(
"VAL_FEED_URL",
1218 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&user_id=".$ilUser->getId().
1219 "&obj_id=".$this->block_id.
1220 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1221 $tpl->setVariable(
"VAL_FEED_URL_TXT",
1222 ILIAS_HTTP_PATH.
"/feed.php?client_id=".rawurlencode(CLIENT_ID).
"&<br />user_id=".$ilUser->getId().
1223 "&obj_id=".$this->block_id.
1224 "&hash=".ilObjUser::_lookupFeedHash($ilUser->getId(),
true));
1226 include_once(
"./Services/PersonalDesktop/classes/class.ilPDContentBlockGUI.php");
1228 $content_block->setContent(
$tpl->get());
1229 $content_block->setTitle($lng->txt(
"news_internal_news"));
1230 $content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1231 $lng->txt(
"close"),
true);
1233 return $content_block->getHTML();
1240 $a_content_block->addHeaderCommand($ilCtrl->getParentReturn($this),
1241 $lng->txt(
"close"),
true);
1248 if ($ilCtrl->getCmd() ==
"hideNotifications" ||
1249 $ilCtrl->getCmd() ==
"showNotifications")
1254 if ($ilCtrl->getCmdClass() !=
"ilcolumngui" && $ilCtrl->getCmd() !=
"enableJS")
1259 $sess_feed_js =
$_SESSION[
"il_feed_js"];
1262 if ($sess_feed_js !=
"n" &&
1263 ($ilUser->getPref(
"il_feed_js") !=
"n" || $sess_feed_js ==
"y"))
1280 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1283 $rel_tpl =
new ilTemplate(
"tpl.dynamic_reload.html",
true,
true,
"Services/News");
1284 $rel_tpl->setVariable(
"TXT_LOADING", $lng->txt(
"news_loading_news"));
1286 $rel_tpl->setVariable(
"TARGET",
1287 $ilCtrl->getLinkTargetByClass(
"ilcolumngui",
"updateBlock",
"",
true));
1290 $rel_tpl->setVariable(
"TXT_NEWS_CLICK_HERE", $lng->txt(
"news_no_js_click_here"));
1291 $rel_tpl->setVariable(
"TARGET_NO_JS",
1292 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"disableJS"));
1294 return $rel_tpl->get();
1301 $ilCtrl->setParameterByClass(
"ilcolumngui",
"block_id",
1304 $rel_tpl =
new ilTemplate(
"tpl.js_enabler.html",
true,
true,
"Services/News");
1306 $rel_tpl->setVariable(
"TARGET",
1307 $ilCtrl->getLinkTargetByClass(strtolower(get_class($this)),
"enableJS",
true,
"",
false));
1309 return $rel_tpl->get();
1318 $ilUser->writePref(
"il_feed_js",
"n");
1319 $ilCtrl->returnToParent($this);
1328 $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.
executeCommand()
execute command
Base class for ILIAS Exception handling.
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.
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 _setRead($a_user_id, $a_news_id)
Set item read.
setBlockId($a_block_id=0)
Set Block Id.
setData($a_data)
Set Data.
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.
__construct()
Constructor.
initSettingsForm()
Init setting form.
Create styles array
The data for the language used.
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)
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 getRenderer($a_context_obj_type)
Get renderer.
static _getDefaultVisibilityForRefId($a_ref_id)
Get default visibility for reference id.
static _lookupContextObjId($a_news_id)
Context Object 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.