24 include_once(
"./Services/News/classes/class.ilNewsItem.php");
25 include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
26 include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
51 include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
53 if (!$news_set->get(
"enable_rss_for_internal"))
66 if ($ilSetting->get(
'short_inst_name') !=
"")
74 $this->
prepareStr($loc.$obj_title.($a_purpose ?
" - ".$a_purpose :
"")));
79 if ($obj_type ==
"mcst")
81 include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
85 $lng->loadLanguageModule(
"mcst");
88 $feed_item->setTitle($lng->txt(
"mcst_media_cast_not_online"));
89 $feed_item->setDescription($lng->txt(
"mcst_media_cast_not_online_text"));
90 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
91 "&target=".$item[
"context_obj_type"]);
98 $cont_loc->addContextItems($a_ref_id,
true);
99 $cont_loc->setTextOnly(
true);
100 $loc = $cont_loc->getHTML();
101 if (trim($loc) !=
"")
103 $loc =
" [".$loc.
"] ";
108 $news_item->setContextObjId($obj_id);
109 $news_item->setContextObjType($obj_type);
110 $items = $news_item->getNewsForRefId($a_ref_id,
true,
false, 0,
true);
113 include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
121 if ($a_purpose !=
false && $obj_type ==
"mcst")
137 ($item[
"context_obj_type"], $item[
"title"], $item[
"content_is_lang_var"],
138 $item[
"agg_ref_id"], $item[
"aggregation"]);
142 $cont_loc->addContextItems($item[
"ref_id"],
true, $a_ref_id);
143 $cont_loc->setTextOnly(
true);
144 $loc = $cont_loc->getHTML();
145 if (trim($loc) !=
"")
152 $feed_item->setDescription($this->
prepareStr(nl2br($item[
"content"])));
153 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
154 "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"]);
155 $feed_item->setAbout($feed_item->getLink().
"&il_about_feed=".$item[
"id"]);
156 $feed_item->setDate($item[
"creation_date"]);
163 if ($obj_type ==
"mcst")
165 include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
175 include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
182 $feed_item->setEnclosureUrl($url);
183 $feed_item->setEnclosureType((isset($mob[
"format"]))?$mob[
"format"]:
"audio/mpeg");
184 $feed_item->setEnclosureLength(
$size);