View Single Post
  #2 (permalink)  
Old 09-14-2006, 11:16 AM
savant's Avatar
savant savant is offline
Constant Pligger
 
Join Date: Apr 2006
Location: UK
Posts: 1,218
Thanks: 64
Thanked 207 Times in 148 Posts
what page are you planning to display the stories.

first you'll need to get the category id.

select category_id from categories where category_safe_name = 'pligg'

once you have the category id you can find all the stories
PHP Code:
$links $db->get_col("select link_id from links where link_category=$category_id order by link_votes desc");
if(
$links){
        
$story = new Link;
        foreach(
$links as $link){
            
$story->id $link;
            
$story->read();
                }

the read will retrieve all the story data, and you can assign the values to smarty.

maybe if you can say more about what the page is, i can give you some code snippets to play with
__________________
Anatomy of the Pligg template Help needed
Reply With Quote
The Following User Says Thank You to savant For This Useful Post: