5include_once(
"./Services/News/classes/class.ilNewsItem.php");
 
    6include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
 
    7include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
 
   31    public function __construct($a_ref_id, $a_userid = 
false, $a_purpose = 
false)
 
   36        $this->lng = 
$DIC->language();
 
   40        parent::__construct();
 
   46        include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
 
   48        if (!$news_set->get(
"enable_rss_for_internal")) {
 
   62        if (
$ilSetting->get(
'short_inst_name') != 
"") {
 
   64                $this->prepareStr($loc . 
" " . $obj_title));
 
   67                $this->
prepareStr($loc . 
" " . $obj_title . ($a_purpose ? 
" - " . $a_purpose : 
"")));
 
   72        if ($obj_type == 
"mcst") {
 
   73            include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
 
   76                $lng->loadLanguageModule(
"mcst");
 
   79                $feed_item->setTitle(
$lng->txt(
"mcst_media_cast_not_online"));
 
   80                $feed_item->setDescription(
$lng->txt(
"mcst_media_cast_not_online_text"));
 
   81                $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
   82                    "&target=" . $item[
"context_obj_type"]);
 
   93        $news_item->setContextObjId($obj_id);
 
   94        $news_item->setContextObjType($obj_type);
 
   95        $items = $news_item->getNewsForRefId($a_ref_id, 
true, 
false, $rss_period, 
true);
 
   98            include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
 
  102        foreach (
$items as $item) {
 
  105            if ($a_purpose != 
false && $obj_type == 
"mcst") {
 
  118                $item[
"context_obj_type"],
 
  120                $item[
"content_is_lang_var"],
 
  127            if ($news_set->get(
"rss_title_format") == 
"news_obj") {
 
  137            $feed_item->setDescription($this->
prepareStr(nl2br(
 
  142            if (in_array($item[
"context_obj_type"], array(
"lm")) && $item[
"context_sub_obj_type"] == 
"pg" 
  143                && $item[
"context_sub_obj_id"] > 0) {
 
  144                $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  145                    "&target=pg_" . $item[
"context_sub_obj_id"] . 
"_" . $item[
"ref_id"]);
 
  146            } elseif ($item[
"context_obj_type"] == 
"wiki" && $item[
"context_sub_obj_type"] == 
"wpg" 
  147                && $item[
"context_sub_obj_id"] > 0) {
 
  148                include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
  149                include_once(
"./Modules/Wiki/classes/class.ilWikiUtil.php");
 
  151                $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  152                    "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"] . 
"_" . $wptitle);
 
  153            } elseif (in_array($item[
"context_obj_type"], array(
"frm")) && $item[
"context_sub_obj_type"] == 
"pos" 
  154                && $item[
"context_sub_obj_id"] > 0) {
 
  156                include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
 
  158                if ($thread_id > 0) {
 
  159                    $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  160                        "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"] . 
"_" . $thread_id . 
"_" . $item[
"context_sub_obj_id"]);
 
  162                    $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  163                        "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"]);
 
  166                $feed_item->setLink(ILIAS_HTTP_PATH . 
"/goto.php?client_id=" . CLIENT_ID .
 
  167                    "&target=" . $item[
"context_obj_type"] . 
"_" . $item[
"ref_id"]);
 
  172            $feed_item->setAbout($feed_item->getLink() . 
"&il_about_feed=" . $item[
"id"]);
 
  173            $feed_item->setDate($item[
"creation_date"]);
 
  179                if ($obj_type == 
"mcst") {
 
  180                    include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
 
  188                    include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
  191                    if (is_file(
$file)) {
 
  194                    $feed_item->setEnclosureUrl(
$url);
 
  195                    $feed_item->setEnclosureType((isset($mob[
"format"]))?$mob[
"format"]:
"audio/mpeg");
 
  196                    $feed_item->setEnclosureLength(
$size);
 
An exception for terminatinating execution or to throw for unit testing.
static _lookup($a_type, $a_setting, $a_user=0, $a_block_id=0)
Lookup setting from database.
A FeedItem represents an item in a News Feed.
addItem($a_item)
Add Item Item is an object of type ilFeedItem.
setChannelLink($a_link)
Channel Link URL to which an HTML rendering of the channel title will link.
setChannelAbout($a_ab)
Unique URI that defines the channel.
getContextPath($a_ref_id)
setChannelTitle($a_title)
Channel Title.
static _lookupRSSPeriod()
static determineNewsContent($a_context_obj_type, $a_content, $a_is_lang_var)
Determine new content.
static setPrivateFeedId($a_userId)
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.
static _getThreadForPosting($a_pos_id)
Get thread id for posting.
__construct($a_ref_id, $a_userid=false, $a_purpose=false)
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public
static _lookupType($a_id, $a_reference=false)
lookup object type
static lookupTitle($a_page_id)
Checks whether a page with given title exists.
static makeUrlTitle($a_par)
Set page parameter for Url Embedding.
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file