You are here

function _feedapi_node_load in FeedAPI 5

Add to the feed item object some data to identify the node assigned

File

feedapi_node/feedapi_node.module, line 343
Handle how the feed items are represented as a content Handle the processing of the feed items

Code

function _feedapi_node_load($feed_item, $feed_nid) {
  $item = db_fetch_object(db_query("SELECT * FROM {feedapi_node_item} WHERE nid = %d", $feed_item->nid));
  $feed_item->nid = $item->nid;
  $feed_item->arrived = $item->arrived;
  $feed_item->options->original_url = $item->url;
  $feed_item->options->guid = $item->guid;
  $feed_item->options->timestamp = $item->timestamp;
  $content = node_load($item->nid);
  $feed_item->description = $content->body;
  $feed_item->title = $content->title;
  $feed_item->teaser = $content->teaser;
  return $feed_item;
}