Thanks to some of the forum gods, I figured this out and am using this now.
To show 5 (you can select any number) of the top rated stories in an un-numbered list.
Add this to html1.php:
PHP Code:
//this is for the top 5 stories list. change LIMIT 0,5 to the number u want
$storytopSql = "SELECT link_id, link_title, link_title_url from " . table_links . " where link_status = 'published' or link_status = 'queued' ORDER BY link_votes DESC LIMIT 0,5;";
$stories1 = $db->get_results($storytopSql);
//store the id and title in an array
$storytoplist = array();
foreach ( $stories1 as $storytop )
$storytoplist[] = array($storytop->link_id,$storytop->link_title,$storytop->link_title_url);
//pass the array to the template
$var_smarty->assign('topStories',$storytoplist);
PHP Code:
<ul>
{foreach from=$topStories value=topstory}
<li> <a href="http://yoursite.com/story.php?title={$topstory[2]}">{$topstory[1]}</a></li>
{/foreach}
</ul>




Linear Mode




