5include_once(
"./Services/News/classes/class.ilNewsItem.php");
 
    6include_once(
"./Services/Feeds/classes/class.ilFeedItem.php");
 
    7include_once(
"./Services/Feeds/classes/class.ilFeedWriter.php");
 
   21        function __construct($a_ref_id, $a_userid = 
false, $a_purpose = 
false)
 
   25                parent::__construct();
 
   32                include_once(
"./Services/Block/classes/class.ilBlockSetting.php");
 
   34                if (!$news_set->get(
"enable_rss_for_internal"))
 
   53                                $this->prepareStr($loc.
" ".$obj_title));
 
   58                                $this->
prepareStr($loc.
" ".$obj_title.($a_purpose ? 
" - ".$a_purpose : 
"")));
 
   63                if ($obj_type == 
"mcst")
 
   65                        include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
 
   69                                $lng->loadLanguageModule(
"mcst");
 
   72                                $feed_item->setTitle(
$lng->txt(
"mcst_media_cast_not_online"));
 
   73                                $feed_item->setDescription(
$lng->txt(
"mcst_media_cast_not_online_text"));
 
   74                                $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
   75                                        "&target=".$item[
"context_obj_type"]);
 
   86                $news_item->setContextObjId($obj_id);
 
   87                $news_item->setContextObjType($obj_type);
 
   88                $items = $news_item->getNewsForRefId($a_ref_id, 
true, 
false, $rss_period, 
true);
 
   91                        include_once(
"./Services/MediaObjects/classes/class.ilMediaItem.php");
 
   99                        if ($a_purpose != 
false && $obj_type == 
"mcst") 
 
  115                                ($item[
"context_obj_type"], $item[
"title"], $item[
"content_is_lang_var"],
 
  116                                $item[
"agg_ref_id"], $item[
"aggregation"]);
 
  120                        if ($news_set->get(
"rss_title_format") == 
"news_obj")
 
  131                                        ": ".$this->prepareStr(
$title));
 
  133                        $feed_item->setDescription($this->
prepareStr(nl2br(
 
  137                        if (in_array($item[
"context_obj_type"], array(
"lm")) && $item[
"context_sub_obj_type"] == 
"pg" 
  138                                && $item[
"context_sub_obj_id"] > 0)
 
  140                                $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
  141                                        "&target=pg_".$item[
"context_sub_obj_id"].
"_".$item[
"ref_id"]);
 
  143                        else if ($item[
"context_obj_type"] == 
"wiki" && $item[
"context_sub_obj_type"] == 
"wpg" 
  144                                && $item[
"context_sub_obj_id"] > 0)
 
  146                                include_once(
"./Modules/Wiki/classes/class.ilWikiPage.php");
 
  147                                include_once(
"./Modules/Wiki/classes/class.ilWikiUtil.php");
 
  149                                $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
  150                                        "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"].
"_".$wptitle);
 
  152                        else if (in_array($item[
"context_obj_type"], array(
"frm")) && $item[
"context_sub_obj_type"] == 
"pos" 
  153                                && $item[
"context_sub_obj_id"] > 0)
 
  156                                include_once(
"./Modules/Forum/classes/class.ilObjForumAccess.php");
 
  157                                $thread_id = ilObjForumAccess::_getThreadForPosting($item[
"context_sub_obj_id"]);
 
  160                                        $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
  161                                                "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"].
"_".$thread_id.
"_".$item[
"context_sub_obj_id"]);
 
  165                                        $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
  166                                                "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"]);
 
  171                                $feed_item->setLink(ILIAS_HTTP_PATH.
"/goto.php?client_id=".CLIENT_ID.
 
  172                                        "&target=".$item[
"context_obj_type"].
"_".$item[
"ref_id"]);
 
  177                        $feed_item->setAbout($feed_item->getLink().
"&il_about_feed=".$item[
"id"]);
 
  178                        $feed_item->setDate($item[
"creation_date"]);
 
  185                                if ($obj_type == 
"mcst")
 
  187                                        include_once(
"./Modules/MediaCast/classes/class.ilObjMediaCastAccess.php");
 
  197                                        include_once(
"./Services/MediaObjects/classes/class.ilObjMediaObject.php");
 
  204                                        $feed_item->setEnclosureUrl(
$url);
 
  205                                        $feed_item->setEnclosureType((isset($mob[
"format"]))?$mob[
"format"]:
"audio/mpeg");
 
  206                                        $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 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 setPrivateFeedId($a_userId)
__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