function vote_storylink_page_new in Vote Up/Down 5
Display views of the storylinks
1 call to vote_storylink_page_new()
- vote_storylink_page in ./
vote_storylink.module - Menu callback; displays a Drupal page containing recent story links entries.
File
- ./
vote_storylink.module, line 376
Code
function vote_storylink_page_new() {
drupal_set_title($title = t('New story links'));
$sql = db_rewrite_sql("SELECT n.nid, n.created FROM {node} n WHERE n.type = 'storylink' AND n.status = 1 ORDER BY n.created DESC");
$result = pager_query($sql, 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));
$output .= theme('feed_icon', url('storylink/new/feed'));
$feed_url = url('storylink/new/feed', NULL, NULL, TRUE);
drupal_add_feed($feed_url, t('RSS - @title', array(
'@title' => $title,
)));
return $output;
}