Definition

blog_page_last()
drupal-5/modules/blog/blog.module, line 167

Description

Displays a Drupal page containing recent blog entries of all users.

Code

<?php
function blog_page_last() {
  global $user;

  $output = '';

  $result = pager_query(db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.sticky DESC, 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));
  drupal_add_feed(url('blog/feed'), t('RSS - blogs'));

  return $output;
}
?>