how to pass variable from releated story to featured story?

Register an Account
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-26-2008, 07:09 PM
New Pligger
 
Join Date: Feb 2008
Posts: 9
in story.php,we have
PHP Code:
      $main_smarty->assign('related_title_url'getmyurl('storytitle'""));
  
$main_smarty->assign('related_story'related_stories($id$link->tags$link->category)); 
just want to pass $related_story to featured story in story_center.tpl:
PHP Code:
    {php}
        require_once(
mnminclude.'link.php');
        
$link = new Link;
        
        
// Edit this line here to change the story
        // to figure out what number a story is, hover your mouse over the votebox for the story
        // you'll see   javascript:vote(A, B, C, 'D', E)
        // the 2nd number (B) will be the number you enter below
        // a better version of this module will come with Pligg V1.0
        
        
$link->id=6;
        
        
        
$link->read();
        
$link->print_summary('summary');
    {/
php
want to replace id=6 with id =$releated_story,how to make this?
setup a global variable in story.php?
just wnat to transfer variable to featured story,make releated story printed like summary

thanks
Reply With Quote
  #2 (permalink)  
Old 03-01-2008, 07:20 AM
New Pligger
 
Join Date: Feb 2008
Posts: 9
PHP Code:
    {php}
        require_once(
mnminclude.'link.php');

$vardas $this->get_template_vars('related_story');
echo 
$vardas1;

        
$link = new Link;
        
        
// Edit this line here to change the story
        // to figure out what number a story is, hover your mouse over the votebox for the story
        // you'll see   javascript:vote(A, B, C, 'D', E)
        // the 2nd number (B) will be the number you enter below
        // a better version of this module will come with Pligg V1.0

        
$link->id=$vardas;
        
        
        
$link->read();
        
$link->print_summary('summary');
    {/
php
I add a $vardas = $this->get_template_vars('related_story');
but only display array,still have problem to pass the related_story id
maybe need a foreach?what I wanted is make related story display like summary
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Featured Story with radom id popsantiago Questions and Comments 11 12-16-2008 12:15 PM
Featured Story Geoserv Questions and Comments 2 01-18-2008 07:49 AM
Featured Story Module - Multiple Stories spartacus Questions and Comments 4 10-07-2007 08:20 PM
Pass a Variable to story_center.tpl? DarrenS Questions and Comments 2 07-28-2007 10:18 PM
story page category links wrong? how to pass to out? puffyz Questions and Comments 3 01-27-2007 09:37 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development