Uutiset:

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

Main Menu
Advertisement:

Board News Template

Aloittaja GLiO, heinäkuu 25, 2006, 02:47:34 AP

« edellinen - seuraava »

GLiO

I've searched all kinds of keyword combos for this but I can't seem to find it.

I want to change the way SMF outputs my news to the main page of my website. The board news function that is. Is this something contain deep in the code somewhere or can it be easily changed?

Thanks in advance for your help.

Dannii

You're using SSI? Just change the output to 'array', and then use the array the function returns however you like.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GLiO

I'm sorry I don't quite understand what you mean. I'm not familiar with an array or anything. I was hoping there was an HTML file I could tinker with. I want to change the formating of the text and the image and such. Can this be done with the array?

Dannii

Are you using SSI.php? In php? in shtml?
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

GLiO

Yes I am using ssi.php in a .php document.

I've got this on line 1:
<?php require("/home/.olin/glio/cotl/forums/SSI.php"); ?>

and this on the part of the page i have my news showing:
<?php ssi_boardNews($board 8.0$limit 5); ?>

But I wouldn't think any of that would matter. The script has to be pulling out the HTML code to format and make the tables from somewhere, I just want to be able to go in there and change it to what I need it to be.

Dannii

change it to <?php $new ssi_boardNews($board 8.0$limit 5$output_method 'array'); ?>

Then you can use $new in any code you like. The following is the original foreach ($return as $news)
{
echo '
<div>
<a href="', $news['href'], '">', $news['icon'], '</a> <b>', $news['subject'], '</b>
<div class="smaller">', $news['time'], ' ', $txt[525], ' ', $news['poster']['link'], '</div>

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

', $news['link'], $news['locked'] ? '' : ' | ' . $news['comment_link'], '
</div>';

if (!$news['is_last'])
echo '
<hr style="margin: 2ex 0;" width="100%" />';
}
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

Advertisement: