News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

[Resolved] Last Posts from Specific Board (And another question)

Started by Xinil, May 02, 2006, 12:05:28 PM

Previous topic - Next topic

Xinil

So I've been searching the forums for a way to show the lasts posts from any specific board on my forum. Specifically board 2.0.

This thread here, made back on March 2005 has a similar issue: http://www.simplemachines.org/community/index.php?topic=31123.0

Turns out what they wanted to do is exactly what I want to do now. Is this feature still disabled for "security" reasons? That makes little sense.

The ssi function "recentTopics();" has the first 3 arguments "limit", exclude boards, and output method. How is the 2nd argument used? All I want is to show board 2.0 posts. I've tried providing the id's for all the other boards in exlude boards, but that returned a mysql error.

What I could do to get around this problem is return all the posts to my own array, traverse the array and only output posts where the board = 2.0. That's not very practical though because I'll be pulling useless information and only displaying half of it (continue; where board!=2.0).

Any help is appreciated.

Also, I want to integrate my board into my site layout. Exactly like SMF has their board here (it sits inside their current layout with "Home, Download, Support, Community, About" links up top). Is there a simple method to doing this (say just put a 'require(<insert ssi page here>.php)') Or do I have to do some serious theme modification?

Thanks much.
Xinil
hxxp:www.myanimelist.net [nonactive] - Create your own Animelist.

Xinil

Figured it out by myself:


$updates = ssi_boardNews(2.0,3,null,null,'return');
echo '<strong>Recent Site Updates and Announcements</strong><br>';

foreach ($updates as $update)
        {
        echo '<div style="padding: 3px 0px 3px 0px;">';
        echo '<a href="'.$update['href'].'">'.$update['subject'].'</a><br>';
        echo 'Posted ' . date("m-d-y, g:ia",$update['timestamp']);
        echo '</div>';
        }


Now to figure out how to get my forum inside my layout...
Edit1: Design is here: hxxp:myanimelist.net [nonactive]

Edit2: Figured it out. Just did some simple includes in forums/index.php.
Xinil
hxxp:www.myanimelist.net [nonactive] - Create your own Animelist.

Jim R

Xinil,

Where did you put that code?  SSI.php or on the page you wanted the output?

Advertisement: