You are here

function video_feed in Video 5

Same name and namespace in other branches
  1. 6 video.module \video_feed()
  2. 6.2 video.module \video_feed()

Generate an RSS feed for videos

Return value

feed

1 string reference to 'video_feed'
video_menu in ./video.module
Implementation of hook_menu().

File

./video.module, line 219
Display video in Quicktime MOV, Realmedia RM, Flash FLV & SWF, or Windows Media WMV formats.

Code

function video_feed() {
  $channel = array(
    'title' => variable_get('site_name', 'drupal') . ' ' . t('videos'),
    'description' => t('Latest videos on') . ' ' . variable_get('site_name', 'drupal'),
    'link' => url('video', NULL, NULL, TRUE),
  );
  $result = db_query('SELECT n.nid FROM {node} n WHERE n.type = "video" AND n.status = 1 ORDER BY n.created DESC');
  node_feed($result, $channel);
}