News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

TinyPortal Block: Display topic from single forum...

Started by foolish frost, September 04, 2006, 06:59:43 PM

Previous topic - Next topic

foolish frost

The two variables at the top allow you to change the forum and the number of characters displayed.  Good for 'message of the moment' displays in a block on the website...

$ff_boardname = 'Tips and Tricks';
$ff_maxlength = 1024;

$ff_boards = ssi_topBoards( 100, 'return' );

foreach ($ff_boards as $ff_board)
{
if ($ff_board['name'] == $ff_boardname)
{
$ff_numtopics = $ff_board['num_topics'];
$ff_boardID = $ff_board['id'];
}

}

$ff_randomtopic = rand( 0, $ff_numtopics - 1 );

ssi_boardNews($ff_boardID, 1, $ff_randomtopic, $ff_maxlength, 'echo');

Advertisement: