Do pierwszego kodu:
Otwórz plik: admin/sources/classes/output/formats/html/htmlOutput.php
Znajdź:
$text = str_replace( "{style_images_url}" , $this->settings['img_url'] , $text );
Dodaj poniżej:
$jakas_zmienna = "<br>";
$this->DB->build( 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->DB->execute();
while ($rowrm = $this->DB->fetch())
{
$jakas_zmienna .= "<b><a href=\"{$this->settings['board_url']}/index.php?showtopic=" . $rowrm['tid'] . "\">" . IPSText::truncate( $rowrm['title'], 50 ) . "</a></b><br> ";
}
$jakas_zmienna .= "</marquee>";
$text = str_replace( "<% NAZWADZIALU %>", $jakas_zmienna , $text);
Zapisz i wyślij.
Do drugiego kodu:
$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->DB->build( 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->DB->execute();
while ($rowrm = $this->DB->fetch())
{
$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>";
$text = str_replace( "<% POZDRO %>", $jakas_zmienna, $text );
Nie testowane. Chyba się nie pomyliłem.