You are here

function vote_storylink_feed_new in Vote Up/Down 5

Displays an RSS feed containing recent storylink entries of all users.

1 call to vote_storylink_feed_new()
vote_storylink_page in ./vote_storylink.module
Menu callback; displays a Drupal page containing recent story links entries.

File

./vote_storylink.module, line 472

Code

function vote_storylink_feed_new() {
  $sql = db_rewrite_sql("SELECT n.nid, n.title, n.created, r.teaser FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid WHERE n.type = 'storylink' AND n.status = 1 ORDER BY n.created DESC");
  $result = db_query_range($sql, 0, variable_get('feed_default_items', 10));
  $channel['title'] = variable_get('site_name', 'drupal') . ' new';
  $channel['link'] = url('storylink/new', NULL, NULL, TRUE);
  $channel['description'] = t('New storylinks');
  node_feed($result, $channel);
}