You are here

function theme_video_page in Video 6.2

Displays a Drupal page containing recently added videos

Return value

string HTML output

1 theme call to theme_video_page()
video_page in ./video.module
Displays a Drupal page containing recently added videos

File

./video.module, line 211
video.module

Code

function theme_video_page() {
  $output = '';
  if (arg(1) != 'help') {

    //We are not reading help so output a list of recent video nodes.
    $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'video' AND n.status = 1 ORDER BY n.created DESC"), variable_get('default_nodes_main', 10));
    while ($node = db_fetch_object($result)) {
      $output .= node_view(node_load($node->nid), 1);
    }
    $output .= theme('pager', NULL, variable_get('default_nodes_main', 10));

    // adds feed icon and link
    drupal_add_link(array(
      'rel' => 'alternate',
      'type' => 'application/rss+xml',
      'title' => variable_get('site_name', 'drupal') . ' ' . t('videos'),
      'href' => url('video/feed/'),
    ));
    $output .= '<br />' . theme('feed_icon', url('video/feed'), t('Syndicate'));
  }
  return $output;
}