I've done this once. I hope this helps.
First you query from streams and accounts table. For example:
[code]
select
s.id,
s.message,
s.wall_id,
s.uid,
s.attachment,
s.created,
a.username
from
jcow_streams s,
jcow_accounts a
where
a.id=s.uid [and other clauses]
[/code]
and then you compose an array, for example:
[code]
$arr = array();
while($row = sql_fetch_array($res)){
$arr['id'] = $row['id'];
$arr['uid'] = $row['uid'];
$arr['wall_id'] = $row['wall_id'];
$arr['message'] = $row['message'];
$arr['username'] = $row['username'];
$arr['attachment'] = $row['attachment'];
$arr['created'] = $row['created'];
c(stream_display($arr, 'row'));
}[/code]
The last step is to invoke stream_display function. Make sure the second argument is 'row' so that it will render the comment section. The other argument is 'simple' and 'mobile'. I've never tested it though.
|