function vote_storylink_feed_top in Vote Up/Down 5
1 call to vote_storylink_feed_top()
- vote_storylink_page in ./
vote_storylink.module - Menu callback; displays a Drupal page containing recent story links entries.
File
- ./
vote_storylink.module, line 490
Code
function vote_storylink_feed_top() {
$sql = db_rewrite_sql("SELECT n.nid, n.created, n.title, r.teaser, v.content_id, v.value, v.tag, v.function FROM {node} n INNER JOIN {node_revisions} r ON n.vid = r.vid INNER JOIN {votingapi_cache} v ON n.nid = v.content_id WHERE n.type = 'storylink' AND n.status = 1 AND v.tag = 'vote' AND v.function = 'sum' AND v.content_type = 'node' ORDER BY v.value DESC, n.created DESC");
$result = db_query_range($sql, 0, variable_get('feed_default_items', 10));
$channel['title'] = variable_get('site_name', 'drupal') . ' popular';
$channel['link'] = url('storylink/top', NULL, NULL, TRUE);
$channel['description'] = t('Popular storylinks');
node_feed($result, $channel);
}