Additional Info
Package ID
First Created
April 08, 2007, 02:33:18 AM
Last Updated
August 06, 2007, 02:49:03 AM

ssi_boardNews Multiple Boards v1.0

Allow multiple board IDs to be passed to ssi_boardNews
Compatible With 1.1.2, 1.1.3
Latest version v1.0
Downloads 32,116
Reviews 0
Rating 0/5
Subscribers 3
License (View License)
ssi_boardNews Multiple Boards

This mod will modify ssi_boardNews so that multiple board IDs can be passed to it as an array. This allows you to get news from more than one board.

How to use?
Instead of calling ssi_boardNews with a single number, call it with an array. For example:
echo ssi_boardNews(array(1,2,3));
will output the latest news from boards 1, 2 and 3.

Additionally, if the first parameter of ssi_boardNews is left blank, it will try and use the "board" GET variable. Go to,2,3,4,5 for an example of this.

Advanced Use - Example script
Below is an example script, using the ssi_boardNews "array" output method. This allows you to format the output in whatever way you'd like to.

// Require SSI

// Some variables. Change these to test this script :)
$boards = array(123); // Boards to use
$number 10// Number of items to return
$length 300// Return this number of characters, followed by "...".

// Get the news
$news_items ssi_boardNews($boards$numbernull$length'array'); // array(boards), number of items, item to start at, number of characters, output method
// Loop through all items
foreach ($news_items as $news)
// Output this item
echo '
<a href="'
$news['href'], '">'$news['icon'], '</a> <b>'$news['subject'], '</b>
<div class="smaller">'
$news['time'], ' by '$news['poster']['link'], ' in '$news['board']['link'], '</div>

<div class="post" style="padding: 2ex 0;">'
$news['body'], '</div>

$news['link'], $news['locked'] ? '' ' | ' $news['comment_link'], '

// If it isn't the last item, output a <hr />
if (!$news['is_last'])
echo '
<hr style="margin: 2ex 0;" width="100%" />'

Version 1.0
- Initial release
Manual installation info
You have to register or login to be able to leave a review
There are currently no reviews on this customization