5 include_once(
"./Services/News/classes/class.ilNewsItem.php");
6 include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
7 include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
30 if ($a_user_id ==
"" || $a_hash ==
"")
36 if (!$news_set->get(
"enable_rss_for_internal"))
43 include_once(
"./Services/News/classes/class.ilNewsItem.php");
53 if ($ilSetting->get(
'short_inst_name') !=
"")
73 if ($obj_type ==
"mcst")
75 include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
85 ($item[
"context_obj_type"], $item[
"title"], $item[
"content_is_lang_var"],
86 $item[
"agg_ref_id"], $item[
"aggregation"]);
90 $cont_loc->addContextItems($item[
"ref_id"],
true);
91 $cont_loc->setTextOnly(
true);
92 $loc =
"[".$cont_loc->getHTML().
"]";
95 if ($news_set->get(
"rss_title_format") ==
"news_obj")
108 $content = $this->
prepareStr(nl2br($item[
"content"]));
109 $feed_item->setDescription($content);
112 if (in_array($item[
"context_obj_type"], array(
"dbk",
"lm")) && $item[
"context_sub_obj_type"] ==
"pg"
113 && $item[
"context_sub_obj_id"] > 0)
115 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
116 "&target=pg_".$item[
"context_sub_obj_id"].
"_".$item[
"ref_id"]);
118 else if (in_array($item[
"context_obj_type"], array(
"frm")) && $item[
"context_sub_obj_type"] ==
"pos"
119 && $item[
"context_sub_obj_id"] > 0)
122 include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
123 $thread_id = ilObjForumAccess::_getThreadForPosting($item[
"context_sub_obj_id"]);
126 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
127 "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"].
"_".$thread_id.
"_".$item[
"context_sub_obj_id"]);
131 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
132 "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"]);
137 $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
138 "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"]);
140 $feed_item->setAbout($feed_item->getLink().
"&il_about_feed=".$item[
"id"]);