przypomnialo mi się gdzie był kod w pliku we wcześniejszej wersji forum o to caly kodzik
$jakas_zmienna = "<br>";
$this->ipsclass->DB->simple_construct( array(
'select' => 'tid, title, last_post',
'from' => 'topics',
'where' => 'forum_id IN ( 54,220 ) AND approved = 1',
'order' => 'start_date DESC',
'limit' => array( 0, 10 )
) );
$this->ipsclass->DB->simple_exec();
while ($rowrm = $this->ipsclass->DB->fetch_row())
{
$jakas_zmienna .= "<b><a href=\"{$this->ipsclass->vars['board_url']}/index.php?showtopic=".$rowrm['tid']."\">".$this->ipsclass->txt_truncate($rowrm['title'], 50 )."</a></b><br> ";
}
$jakas_zmienna .= "</marquee>";
$this->ipsclass->skin['_wrapper'] = str_replace( "<% NAZWADZIALU %>" , $jakas_zmienna , $this->ipsclass->skin['_wrapper']);
i jeszcze potrzebowałbym coś podobnego ale wyciąganie treści z twmatów, też to dla mnie robiłeś
o to kodzik z wcześniejszej wersji
IdTematu = 8919; // Wpisz ID tematu z którego ma pobrać posty
$IlePostow = 10; // Wpisz ile ma pobrać postów
$jakas_zmienna = "<marquee direction=left scrollamount=2 scrolldelay=1 onMouseOver='this.stop()' onMouseOut='this.start()' >";
$this->ipsclass->DB->simple_construct( array(
'select' => 'p.author_name,p.*',
'from' => array( 'posts' => 'p'),
'where' => 'p.queued = 0',
'add_join' => array( 0 => array( 'select' => 't.*',
'from' => array( 'topics' => 't' ),
'where' => 't.tid=p.topic_id AND t.tid = '.$IdTematu,
'type' => 'inner' ) ),
'order' => 'p.pid DESC',
'limit' => array( 0, $IlePostow )
) );
$this->ipsclass->DB->simple_exec();
while ($rowrm = $this->ipsclass->DB->fetch_row())
{
$rowrm['post'] = str_replace( '<br />' ,'' , $rowrm['post']);
$rowrm['post'] = str_replace( '<br>' ,'' , $rowrm['post']);
$jakas_zmienna .= "<img src='http://www.trancegeneration.com/ikonki/tg.png'><b>" .$rowrm['author_name'] . " - </b> ";
$jakas_zmienna .= $rowrm['post'] . " ";
}
$jakas_zmienna .= "</marquee>";
$this->ipsclass->skin['_wrapper'] = str_replace( "<% POZDRO %>" , $jakas_zmienna , $this->ipsclass->skin['_wrapper']);