News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

SSI Help

Started by -MunDy-, January 20, 2005, 02:43:12 AM

Previous topic - Next topic

-MunDy-

I've tried searching around here but can't really find exactly what it is I'm looking for (either that, or its not in enough detail). What I want to do is edit how some of the SSI is outputted. For example, for the boardnews function, I want to make it output in tables and whatnot and make it look a little more proffesional instead of just plain text. Also, I'm using the ssi_welcome function too, but I only want it on a single line. When a guest visits the page, it show two lines of text and messes around etc with the layout.

Could someone point me in the direction of where I can find out and learn how to do all that?

mytreo

The SSI FAQs will tell you what you need to know.

Remember the criticial thing is that there is NO NEED to edit SSI.php
Treo forum - Powered by SMF, of course
Treo news - powered by MovableType and integrated with SMF
Treo downloads - hacked from phpNuke and integrated with SMF
Treo knowledge base - powered by Wikka and integrated with SMF
Treo 650 | Treo 700w | Treo 700p

-MunDy-

I've read those and they dont really touch on what I want to do. I want to change the actual way its displayed, not just give it a few parameters so it will limit the amount of posts show etc.

Do you understand what I mean?

mytreo

#3
Yes I understand. The FAQs do explain it, here's a quote from them that does exactly what you need.

Quote from: [Unknown] on June 24, 2004, 06:58:26 PM
To get from a specific board and display it specially, CALL it like this:

$array = ssi_boardNews(5, null, null, null, 'array');

foreach ($array as $news)
{
echo '
<table border="0" width="100%" align="center" class="ssi_table">
<tr>
<td><b>', $news['subject'], '</b></td>
</tr>
<tr>
<td>', $news['body'], '<br /><br /></td>
</tr>
</table>
<br />';

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


This requires zero modifications in SSI.php.

-[Unknown]

You can alter the HTML tables as you wish to provide whatever layout.

You can also call different values from the $news array.

You can also specify different parameters - the example above uses news from board=5, to use news from all boards just change the way you call it e.g.

$array = ssi_boardNews(null, null, null, null, 'array');

Chris
Treo forum - Powered by SMF, of course
Treo news - powered by MovableType and integrated with SMF
Treo downloads - hacked from phpNuke and integrated with SMF
Treo knowledge base - powered by Wikka and integrated with SMF
Treo 650 | Treo 700w | Treo 700p

-MunDy-


Advertisement: