Topic: Put extern.php output into variable
Hi,
I'm using a Template System, and i want to replace {$tickerlist} (in the Template) with the 10 newest Topics of the Forum. So i need to put the "<li>foobar</li>" output from the extern.php into a variable that i can assign to $tickerlist later.
I tried to replace
echo '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
with
$ret .= '<li><a href="'.$pun_config['o_base_url'].'/viewtopic.php?id='.$cur_topic['id'].'&action=new" title="'.pun_htmlspecialchars($cur_topic['subject']).'">'.$subject_truncated.'</a></li>'."\n";
in the extern.php.
Then included the extern.php in my php file that assigns variables for the template and assigned the $ret to the tickerlist.
include 'http://localhost/pages/virtpress/forum/extern.php';
$smarty->assign('tickerlist', $ret);
(I assigned the $_GET variables directly at the beginning in the extern.php, because i must not use paramters behind the URL.)
<ul>
{$tickerlist}
</ul>
Now it puts out nothing at the page -.-
Why's that? Anyone has another idea for using extern.php with a Template System?