News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

SSI Help Please?

Started by TheGamer, July 25, 2006, 12:20:49 AM

Previous topic - Next topic

TheGamer

Hey guys. I have

<?php

$array ssi_boardNews(129.05null250'array');

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td>'
$news['icon'], ' <b>'$news['subject'], '</b><span class="smaller"><br />'$news['time'], ' '$txt[525], ' '$news['poster']['link'], '<br /></span></td>
</tr>
<tr>
<td>'
$news['link'], ' | '$news['new_comment'], '</td>
</tr>
</table>
<br />'
;

if (!$news['is_last'])
echo '
<hr width="100%" />
<br />'
;

}



?>


And it's set up to display threads from board 129.0, and ONLY 129.0... Well lets say I want to make it display threads from 129.0, 85.0 and 96.0... How would I go about coding that?

Thanks!

TheGamer

Hey. Doesn't anyone know how to do this, or if it's even possible?

Raxx

#2
Should work. Add as many boards as you want into the $board_array array.


<?php
include(
"SSI.php");
$board_array = array("129.0""85.0""96.0");
for ($i 0$i count($board_array); $i++)
/* could also be "foreach ($board_array as $board) */
{
  $array ssi_boardNews($board_array[$i/*if used foreach, would be $board instead*/5null250'array');

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td>'
$news['icon'], ' <b>'$news['subject'], '</b><span class="smaller"><br />'$news['time'], ' '$txt[525], ' '$news['poster']['link'], '<br /></span></td>
</tr>
<tr>
<td>'
$news['link'], ' | '$news['new_comment'], '</td>
</tr>
</table>
<br />'
;

if (!$news['is_last'])
echo '
<hr width="100%" />
<br />'
;

}
if ($i != count($board_array) -1)
{
echo '
<hr width="100%" />
<br />'
;
}
}



?>



[edit] I tried the code out, it works fine

TheGamer

#3
Perfect. Thanks a bunch.

EDIT:

Wow, thanks again. This really turned out great to pull all of my forums features together on the portal. :) www.gamerunlimited.com/reviews.php www.gamerunlimited.com/previews.php www.gamerunlimited.com/articles.php

Thanks!

Raxx

No problem, you have a nice looking site there :)

Advertisement: